mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +00:00
Use document.body.dataset instead of defining a hidden <div>
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
4
login.lp
4
login.lp
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
mg.include('scripts/lua/header.lp','r')
|
mg.include('scripts/lua/header.lp','r')
|
||||||
?>
|
?>
|
||||||
<body class="hold-transition layout-boxed login-page">
|
<body class="hold-transition layout-boxed login-page" data-apiurl="<?=pihole.api_url()?>">
|
||||||
<div class="box login-box" id="login-box">
|
<div class="box login-box" id="login-box">
|
||||||
<section style="padding: 15px;">
|
<section style="padding: 15px;">
|
||||||
<div class="login-logo">
|
<div class="login-logo">
|
||||||
@@ -117,8 +117,6 @@ mg.include('scripts/lua/header.lp','r')
|
|||||||
<strong><a href="https://pi-hole.net/donate/" rel="noopener" target="_blank"><i class="fa fa-heart text-red"></i> Donate</a></strong> if you found this useful.
|
<strong><a href="https://pi-hole.net/donate/" rel="noopener" target="_blank"><i class="fa fa-heart text-red"></i> Donate</a></strong> if you found this useful.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="webhome" style="display: none;"><?=webhome?></div>
|
|
||||||
<div id="api-url" style="display: none;"><?=pihole.api_url()?></div>
|
|
||||||
<script src="<?=pihole.fileversion('scripts/js/footer.js')?>"></script>
|
<script src="<?=pihole.fileversion('scripts/js/footer.js')?>"></script>
|
||||||
<script src="<?=pihole.fileversion('scripts/js/login.js')?>"></script>
|
<script src="<?=pihole.fileversion('scripts/js/login.js')?>"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
/* global utils:false, moment:false */
|
/* global utils:false, moment:false */
|
||||||
|
|
||||||
var _isLoginPage = false;
|
var _isLoginPage = false;
|
||||||
const apiUrl = document.getElementById("api-url").textContent;
|
const apiUrl = document.body.dataset.apiurl;
|
||||||
|
|
||||||
const REFRESH_INTERVAL = {
|
const REFRESH_INTERVAL = {
|
||||||
logs: 500, // 0.5 sec (logs page)
|
logs: 500, // 0.5 sec (logs page)
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ end
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- ./wrapper -->
|
<!-- ./wrapper -->
|
||||||
<div id="api-url" style="display: none;"><?=pihole.api_url()?></div>
|
|
||||||
<script src="<?=pihole.fileversion('scripts/js/footer.js')?>"></script>
|
<script src="<?=pihole.fileversion('scripts/js/footer.js')?>"></script>
|
||||||
|
|
||||||
<div id="advanced-info-data" style="display: none;" data-starttime="<?=starttime?>" data-endtime="<?=mg.time(true)?>" data-client-ip="<?=mg.request_info.remote_addr?>" data-tls="<?=tostring(is_secure)?>" data-xff="<?=x_forwarded_for?>"></div>
|
<div id="advanced-info-data" style="display: none;" data-starttime="<?=starttime?>" data-endtime="<?=mg.time(true)?>" data-client-ip="<?=mg.request_info.remote_addr?>" data-tls="<?=tostring(is_secure)?>" data-xff="<?=x_forwarded_for?>"></div>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ mg.include('header.lp','r')
|
|||||||
<script src="<?=pihole.fileversion('vendor/chartjs-plugin-zoom/chartjs-plugin-zoom.min.js')?>"></script>
|
<script src="<?=pihole.fileversion('vendor/chartjs-plugin-zoom/chartjs-plugin-zoom.min.js')?>"></script>
|
||||||
<script src="<?=pihole.fileversion('vendor/bstreeview/bstreeview.min.js')?>"></script>
|
<script src="<?=pihole.fileversion('vendor/bstreeview/bstreeview.min.js')?>"></script>
|
||||||
</head>
|
</head>
|
||||||
<body class="<?=theme.name?> hold-transition sidebar-mini <? if pihole.boxedlayout() then ?>layout-boxed<? end ?> logged-in">
|
<body class="<?=theme.name?> hold-transition sidebar-mini <? if pihole.boxedlayout() then ?>layout-boxed<? end ?> logged-in" data-apiurl="<?=pihole.api_url()?>">
|
||||||
<noscript>
|
<noscript>
|
||||||
<!-- JS Warning -->
|
<!-- JS Warning -->
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user