X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex.php;h=c59f016e2cf834c19169deefda9daae75f491a9d;hb=8197fc17752e4504bb2857fcea3f2e032916d9b3;hp=9e3efe59447bfec47eeca3daf0f2cc31e0a474c1;hpb=adca8c40390c5086ec21b01e5e9d191503b6cf40;p=brisk.git diff --git a/web/index.php b/web/index.php index 9e3efe5..c59f016 100644 --- a/web/index.php +++ b/web/index.php @@ -1254,21 +1254,30 @@ 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(); - - g_prefs = new client_prefs(null); - - spo_slide = new sideslide($('spon_caro'), 80, 20); - sup_slide = new sideslide($('supp_caro'), 80, 20); + 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"); + } + else { + location.reload(); + } + g_brow = get_browser_agent(); + + g_prefs = new client_prefs(null); + + spo_slide = new sideslide($('spon_caro'), 80, 20); + sup_slide = new sideslide($('supp_caro'), 80, 20); +
+ +