diff options
Diffstat (limited to 'index.php')
-rwxr-xr-x | index.php | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -62,8 +62,6 @@ else { } - - /** * * Important stuff we always need to do. @@ -247,7 +245,11 @@ if(! x($a->page,'content')) /* set JS cookie */ if($_COOKIE['jsAvailable'] != 1) { - $a->page['content'] .= '<script>document.cookie="jsAvailable=1; path=/"; location.reload();</script>'; + $a->page['content'] .= '<script>document.cookie="jsAvailable=1; path=/"; var jsMatch = /\&JS=1/; if (!jsMatch.exec(location.href)) { location.href = location.href + "&JS=1"; }</script>'; + /* emulate JS cookie if cookies are not accepted */ + if ($_GET['JS'] == 1) { + $_COOKIE['jsAvailable'] = 1; + } } |