mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Fix Javascript error that appears when there is no hash part on the URL
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -164,8 +164,11 @@ $("button[id^='adlist-btn-']").on("click", function (e) {
|
||||
|
||||
// Javascript to go to specified tab on save or hyperlink
|
||||
$(function () {
|
||||
var activeTab = $("[href=" + location.hash + "]");
|
||||
activeTab && activeTab.tab("show");
|
||||
if(location.hash.length > 0)
|
||||
{
|
||||
var activeTab = $("[href=" + location.hash + "]");
|
||||
activeTab && activeTab.tab("show");
|
||||
}
|
||||
});
|
||||
// Change hash for save and reload
|
||||
$(".nav-tabs a").on("shown.bs.tab", function (e) {
|
||||
|
||||
Reference in New Issue
Block a user