Get rid of js/header.js.

Wrap the code in `noscript instead. Also move its CSS in `head`.

Signed-off-by: XhmikosR <xhmikosr@gmail.com>
This commit is contained in:
XhmikosR
2019-12-09 15:19:26 +02:00
parent cc9acd4018
commit d94ea9e8fe
2 changed files with 6 additions and 12 deletions

View File

@@ -1,9 +0,0 @@
/* Pi-hole: A black hole for Internet advertisements
* (c) 2017 Pi-hole, LLC (https://pi-hole.net)
* Network-wide ad blocking via your own hardware.
*
* This file is copyright under the latest version of the EUPL.
* Please see LICENSE file for your rights under this license. */
// Remove JS warning
var jswarn = document.getElementById("js-warn-exit");
jswarn.parentNode.removeChild(jswarn);

View File

@@ -208,25 +208,28 @@
<link href="style/vendor/AdminLTE.min.css" rel="stylesheet" type="text/css">
<link href="style/vendor/skin-blue.min.css" rel="stylesheet" type="text/css">
<noscript><link rel="stylesheet" href="style/vendor/js-warn.css"></noscript>
<link href="style/pi-hole.css" rel="stylesheet" type="text/css">
<link rel="icon" type="image/png" sizes="160x160" href="img/logo.svg">
</head>
<body class="skin-blue sidebar-mini <?php if($boxedlayout){ ?>layout-boxed<?php } ?>">
<noscript>
<!-- JS Warning -->
<div>
<link rel="stylesheet" type="text/css" href="style/vendor/js-warn.css">
<input type="checkbox" id="js-hide">
<div class="js-warn" id="js-warn-exit"><h1>JavaScript Is Disabled</h1><p>JavaScript seems to be disabled. This will break some site features.</p>
<p>To enable JavaScript click <a href="https://www.enable-javascript.com/" rel="noopener" target="_blank">here</a></p><label for="js-hide">Close</label></div>
<p>To enable JavaScript click <a href="https://www.enable-javascript.com/" rel="noopener" target="_blank">here</a></p><label for="js-hide">Close</label>
</div>
</div>
<!-- /JS Warning -->
</noscript>
<?php
if($auth) {
echo "<div id='token' hidden>$token</div>";
}
?>
<script src="scripts/pi-hole/js/header.js"></script>
<script src="scripts/vendor/jquery.min.js"></script>
<script src="scripts/vendor/jquery-ui.min.js"></script>