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 () {
function setSettings () {
for (var key in localStorage) {
var value = localStorage.getItem(key);
if (key.startsWith('param_') && !key.endsWith('lang') && !key.endsWith('autocomplete')) {
key = key.substring(key.indexOf('param_') + 6);
var acceptedParams = ['autocomplete', 'key', 'lang', 'maps', 'newtab', 'sprueche', 'autocomplete'];
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 + '">');
}
$('#foki input[type=radio]#angepasst').attr('checked', true);
......
Markdown is supported
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