prevent_reuse as input hidden DOM item
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 19 Apr 2020 10:39:25 +0000 (12:39 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sun, 19 Apr 2020 10:39:25 +0000 (12:39 +0200)
web/index.php

index 9e3efe5..8313cb9 100644 (file)
@@ -1254,21 +1254,20 @@ cookie_law(null);
    // var nonunload = false;
    var spo_slide, sup_slide;
 
-   var prevent_reuse = "";
    window.onload = function() {
 
-     if (prevent_reuse == "") {
-       prevent_reuse = "first load";
-     }
-     else {
-         location.reload();
-     }
-     g_brow = get_browser_agent();
+       if ($$('#prevent_reuse').val() == "") {
+           $$('#prevent_reuse').val("first load");
+       }
+       else {
+           location.reload();
+       }
+       g_brow = get_browser_agent();
 
-     g_prefs = new client_prefs(null);
+       g_prefs = new client_prefs(null);
 
-     spo_slide  = new sideslide($('spon_caro'), 80, 20);
-     sup_slide  = new sideslide($('supp_caro'), 80, 20);
+       spo_slide  = new sideslide($('spon_caro'), 80, 20);
+       sup_slide  = new sideslide($('supp_caro'), 80, 20);
 
 <?php
         if ($BRISK_SHOWHTML == "debugtable") {
@@ -1633,6 +1632,7 @@ type="submit" class="button" onclick="this.form.elements['realsub'].value = 'chi
 cookie_law(null);
 // -->
 </script>
+<input type="hidden" id="prevent_reuse"/>
 </body>
 </html>
 <?php