Files
web/scripts/pi-hole/js/settings.js
2023-02-09 18:41:47 +01:00

31 lines
869 B
JavaScript

/* 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. */
/* global updateHostInfo:false, updateCacheInfo:false, createDynamicConfigTabs:false */
$(function () {
updateHostInfo();
updateCacheInfo();
createDynamicConfigTabs();
});
// Change "?tab=" parameter in URL for save and reload
$(".nav-tabs a").on("shown.bs.tab", function (e) {
var tab = e.target.hash.substring(1);
window.history.pushState("", "", "?tab=" + tab);
window.scrollTo(0, 0);
});
// Handle hiding of alerts
$(function () {
$("[data-hide]").on("click", function () {
$(this)
.closest("." + $(this).attr("data-hide"))
.hide();
});
});