1jQuery(window).on("load", function () { 2 //setTimeout(function () { 3 // Remove the # from the hash, as different browsers may or may not include it 4 var hash = location.hash.replace("#", ""); 5 var uri = window.location.toString(); 6 if (uri.indexOf("#") > 0) { 7 var clean_uri = uri.substring(0,uri.indexOf("#")); 8 window.history.replaceState({},document.title, clean_uri); 9 } 10 if (hash != "") { 11 setTimeout(function () { 12 // Clear the hash in the URL 13 if (hash == "store") { 14 // var myDiv = document.getElementById("store"); 15 // myDiv.scrollTop = myDiv.scrollHeight; 16 $("html, body").animate({ scrollTop: $("#" + hash).offset().top + 470 }, 1000); 17 } else { 18 // location.hash = ''; // delete front "//" if you want to change the address bar 19 $("html, body").animate({ scrollTop: $("#" + hash).offset().top }, 1000); 20 } 21 }, 1500); 22 } 23 24 //}, 2500); 25}); 26 27document.addEventListener("DOMContentLoaded", function () { 28 /**Add Id **/ 29 if (checkIsNull(".block-views-blockmusic-section-block-1 h2") === true) { 30 document.querySelector(".block-views-blockmusic-section-block-1 h2").setAttribute("id", "music"); 31 } 32 if (checkIsNull(".block-block-content94494f89-f543-4a43-96b9-da48b7ddd212 h2") === true) { 33 document.querySelector(".block-block-content94494f89-f543-4a43-96b9-da48b7ddd212 h2").setAttribute("id", "tour"); 34 } 35 if (checkIsNull(".block-views-blockvideos-section-block-1 h2") === true) { 36 document.querySelector(".block-views-blockvideos-section-block-1 h2").setAttribute("id", "video"); 37 } 38 if (checkIsNull(".block-views-blockmerch-section-block-1 h2") === true) { 39 document.querySelector(".block-views-blockmerch-section-block-1 h2").setAttribute("id", "merch"); 40 } 41 if (checkIsNull(".block-block-contentf6fc4ed8-a994-452b-b756-d0239ced392b") === true) { 42 document.querySelector(".block-block-contentf6fc4ed8-a994-452b-b756-d0239ced392b").setAttribute("id", "mlist"); 43 } 44 if (checkIsNull(".scroll-desktop") === true) { 45 jQuery(".scroll-desktop").click(function () { 46 var oftop = jQuery("#music").offset().top; 47 jQuery("html, body").stop().animate( 48 { 49 scrollTop: oftop, 50 }, 51 3000 52 ); 53 }); 54 } 55 56 /**Menu Scroll**/ 57 58 if (checkIsNull(".path-frontpage .menu-wrapper a") === true) { 59 jQuery('.path-frontpage .menu-wrapper a[href*="#"]') 60 // Remove links that don't actually link to anything 61 .not('[href="#"]') 62 .not('[href="#0"]') 63 .click(function (e) { 64 e.preventDefault(); 65 if (location.pathname.replace(/^\//, "") == this.pathname.replace(/^\//, "") && location.hostname == this.hostname) { 66 var target = jQuery(this.hash); 67 var blockOffset; 68 hashValue = this.hash.substr(1); 69 var current_width = jQuery(window).width(); 70 /*if (current_width < 767) { 71 jQuery("#block-menu-menu-home-one-page-linked .content ul.menu").hide(); 72 }*/ 73 target = target.length ? target : jQuery("[name=" + this.hash.slice(1) + "]"); 74 jQuery(".menu-wrapper a").removeClass("active"); 75 var navActiveCurrent = "/#" + hashValue; 76 jQuery('.menu-wrapper a[href="' + navActiveCurrent + '"]').addClass("active"); 77 jQuery(this).addClass("active"); 78 if (target.length) { 79 jQuery("html,body").animate( 80 { 81 scrollTop: target.offset().top, 82 }, 83 1000, 84 function () { 85 // Callback after animation 86 // Must change focus! 87 var $target = jQuery(target);
88 $target.focus(); 89 if ($target.is(":focus")) { 90 // Checking if the target was focused 91 return false; 92 } else { 93 $target.attr("tabindex", "-1"); // Adding tabindex for elements not focusable 94 $target.focus(); // Set focus again 95 } 96 } 97 ); 98 //return false; 99 } 100 } 101 }); 102 } 103}); 104 105function checkIsNull(elementName) { 106 var element = document.querySelector(elementName); 107 if (typeof element != "undefined" && element != null) { 108 return true; 109 } else { 110 return false; 111 } 112} 113 114if (checkIsNull(".scroll-desktop") === true) { 115 jQuery(".scroll-desktop").click(function () { 116 var oftop = jQuery(".menu-total-wrapper").offset().top; 117 jQuery("html, body").stop().animate( 118 { 119 scrollTop: oftop, 120 }, 121 3000 122 ); 123 }); 124} 125
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.