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:
@@ -8,7 +8,7 @@
|
||||
/* global utils:false, moment:false */
|
||||
|
||||
var _isLoginPage = false;
|
||||
const apiUrl = document.getElementById("api-url").textContent;
|
||||
const apiUrl = document.body.dataset.apiurl;
|
||||
|
||||
const REFRESH_INTERVAL = {
|
||||
logs: 500, // 0.5 sec (logs page)
|
||||
|
||||
@@ -66,7 +66,6 @@ end
|
||||
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
<div id="api-url" style="display: none;"><?=pihole.api_url()?></div>
|
||||
<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>
|
||||
|
||||
@@ -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/bstreeview/bstreeview.min.js')?>"></script>
|
||||
</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>
|
||||
<!-- JS Warning -->
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user