Updated visuals and expanded website.
This commit is contained in:
@@ -93,19 +93,26 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var lang='en'
|
||||
if (urlParams.has('lang')) {
|
||||
lang=urlParams.get('lang');
|
||||
}
|
||||
|
||||
var perfEntries = performance.getEntriesByType("navigation");
|
||||
for (var i = 0; i < perfEntries.length; i++) {
|
||||
if (perfEntries[i].type === 'back_forward') {
|
||||
window.location.href = '/'
|
||||
window.location.href = '/?lang='+lang;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
if (urlParams.has('reload')) {
|
||||
// if (Object.keys(localStorage).length > 1) {
|
||||
localStorage.clear();
|
||||
window.location.href = '/'
|
||||
window.location.href = '/?lang='+lang;
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -162,5 +169,22 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
storeValuesToLocalstorage();
|
||||
return true;
|
||||
});
|
||||
$("#switch-language").click(function(e) {
|
||||
var spans = $(".noUi-tooltip").find('span');
|
||||
var tree_size_min = spans[0].innerText;
|
||||
var tree_size_max = spans[1].innerText;
|
||||
console.log('amm');
|
||||
$("<input />").attr("type", "hidden")
|
||||
.attr("name", "tree_size_min")
|
||||
.attr("value", tree_size_min)
|
||||
.appendTo("#submit-form");
|
||||
$("<input />").attr("type", "hidden")
|
||||
.attr("name", "tree_size_max")
|
||||
.attr("value", tree_size_max)
|
||||
.appendTo("#submit-form");
|
||||
|
||||
storeValuesToLocalstorage();
|
||||
return true;
|
||||
});
|
||||
})(jQuery); // end of jQuery name space
|
||||
|
||||
|
||||
Reference in New Issue
Block a user