aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web/CheckJS.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-15 15:35:06 -0800
committerzotlabs <mike@macgirvin.com>2018-11-15 15:35:06 -0800
commita7d2f9b53005f0c27ddfe1ef32fab78591c5374f (patch)
treed6d7fc8de25e9263a9d49c9531830f5890e13181 /Zotlabs/Web/CheckJS.php
parentb11858bcaca9a5784f37e5b69eb7ca6096d0bde3 (diff)
downloadvolse-hubzilla-a7d2f9b53005f0c27ddfe1ef32fab78591c5374f.tar.gz
volse-hubzilla-a7d2f9b53005f0c27ddfe1ef32fab78591c5374f.tar.bz2
volse-hubzilla-a7d2f9b53005f0c27ddfe1ef32fab78591c5374f.zip
remove checkjs and nojs
Diffstat (limited to 'Zotlabs/Web/CheckJS.php')
-rw-r--r--Zotlabs/Web/CheckJS.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/Zotlabs/Web/CheckJS.php b/Zotlabs/Web/CheckJS.php
deleted file mode 100644
index e83ccf27b..000000000
--- a/Zotlabs/Web/CheckJS.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-namespace Zotlabs\Web;
-
-
-class CheckJS {
-
- private static $jsdisabled = 0;
-
- function __construct($test = 0) {
- if(intval($_REQUEST['jsdisabled']))
- $this->jsdisabled = 1;
- else
- $this->jsdisabled = 0;
- if(intval($_COOKIE['jsdisabled']))
- $this->jsdisabled = 1;
- else
- $this->jsdisabled = 0;
-
- $page = bin2hex(\App::$query_string);
-
- if(! $this->jsdisabled) {
- if($test) {
- $this->jsdisabled = 1;
- if(array_key_exists('jsdisabled',$_COOKIE))
- $this->jsdisabled = $_COOKIE['jsdisabled'];
-
- if(! array_key_exists('jsdisabled',$_COOKIE)) {
- \App::$page['htmlhead'] .= "\r\n" . '<script>document.cookie="jsdisabled=0; path=/"; var jsMatch = /\&jsdisabled=0/; if (!jsMatch.exec(location.href)) { location.href = "' . z_root() . '/nojs/0?f=&redir=' . $page . '" ; }</script>' . "\r\n";
- /* emulate JS cookie if cookies are not accepted */
- if (array_key_exists('jsdisabled',$_GET)) {
- $_COOKIE['jsdisabled'] = $_GET['jsdisabled'];
- }
- }
- }
- else {
- \App::$page['htmlhead'] .= "\r\n" . '<noscript><meta http-equiv="refresh" content="0; url=' . z_root() . '/nojs?f=&redir=' . $page . '"></noscript>' . "\r\n";
- }
- }
-
- }
-
- function disabled() {
- return $this->jsdisabled;
- }
-
-
-}
-
-