Commit a94af3bd authored by Karl Hasselbring's avatar Karl Hasselbring
Browse files

Das neue Script für die Startseite prüft jetzt mitgegebene Parameter aus dem LocalStorage auf Gültigkeit. (Alte Parameter werden nicht mehr beachtet)
parent 18b5e9e3
...@@ -80,8 +80,15 @@ function setActionListeners () { ...@@ -80,8 +80,15 @@ function setActionListeners () {
function setSettings () { function setSettings () {
for (var key in localStorage) { for (var key in localStorage) {
var value = localStorage.getItem(key); var value = localStorage.getItem(key);
if (key.startsWith('param_') && !key.endsWith('lang') && !key.endsWith('autocomplete')) { var acceptedParams = ['autocomplete', 'key', 'lang', 'maps', 'newtab', 'sprueche', 'autocomplete'];
key = key.substring(key.indexOf('param_') + 6); var accepted = false;
for (var i in acceptedParams) {
if (key === 'param_' + acceptedParams[i]) {
accepted = true;
}
}
if (accepted) {
key = key.substring(6);
$('#searchForm').append('<input type="hidden" name="' + key + '" value="' + value + '">'); $('#searchForm').append('<input type="hidden" name="' + key + '" value="' + value + '">');
} }
$('#foki input[type=radio]#angepasst').attr('checked', true); $('#foki input[type=radio]#angepasst').attr('checked', true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment