use storage with proper var name to manage tab duplication
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 19 Apr 2020 11:37:26 +0000 (13:37 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 19 Apr 2020 11:37:26 +0000 (13:37 +0200)
web/index.php

index 0259193..c59f016 100644 (file)
@@ -1255,6 +1255,16 @@ cookie_law(null);
    var spo_slide, sup_slide;
 
    window.onload = function() {
+       if ('localStorage' in window) {
+           var v_name = cookiepath.replace(/\//g, '') + '_index_page_id';
+           var local_page_id = window.localStorage.getItem(v_name);
+           if (local_page_id == page_id) {
+               window.location.reload();
+           }
+           else {
+               window.localStorage.setItem(v_name, page_id);
+           }
+       }
 
        if ($$('#prevent_reuse').val() == "") {
            $$('#prevent_reuse').val("first load");