PageSourceSearch

https://exterminationdismemberment.com/js/main_new.js

js exterminationdismemberment.com collected 2026-10-08 13:15:47 UTC 4,421 bytes, 210 lines download raw bytes

1window.onload = function(){
2	let path = window.location.pathname.split("/");
3	switch(path[path.length-1])
4	{
5		case "":
6		{
7			loadPage("home");
8			break;
9		}
10		case "home":
11		{
12			loadPage("home");
13			break;
14		}
15		case "music":
16		{
17			loadPage("music");
18			break;
19		}
20		case "tour":
21		{
22			loadPage("tour");
23			break;
24		}
25		case "videos":
26		{
27			loadPage("videos");
28			break;
29		}
30		case "merch":
31		{
32			loadPage("merch");
33			break;
34		}
35		case "contact":
36		{
37			loadPage("contact");
38			break;
39		}
40		case "epk":
41		{
42			document.getElementById("single-page-app").classList.add('_show-epk');
43			loadPage("epk");
44			break;
45		}
46		default:
47		{
48			loadPage("404");
49			break;
50		}
51	}
52
53	document.querySelectorAll('.app-menu_list_i_a').forEach((item) =>
54	{
55		item.addEventListener('click', function(e){
56			e.preventDefault();
57			const path = item.getAttribute("value");
58			loadPage(path);
59			if(path == "home"){
60				window.history.pushState("", "", "");
61			}
62			window.history.pushState("", "", path);
63		});
64	});
65
66	document.querySelectorAll('.app-menu-mobile-switch').forEach((item) =>
67	{
68		item.addEventListener('click', function(e){
69			item.classList.toggle("_active");
70		})
71	});
72
73	document.querySelectorAll('.app-menu._mobile .app-menu_list_i_a').forEach((item) =>
74	{
75		item.addEventListener('click', function(e){
76		document.querySelectorAll('.app-menu-mobile-switch')[0].classList.remove("_active");
77		})
78	});
79
80
81	function loadPage($path){
82		if($path == "") return;
83		let gotoPath = $path;
84		document.getElementById('load-overlay').classList.remove('_hidden');
85
86		const container = document.getElementById("app-container");
87
88		switch($path)
89		{
90			case "home":
91			{
92				break;
93			}
94			case "music":
95			{
96				break;
97			}
98			case "tour":
99			{
100				break;
101			}
102			case "videos":
103			{
104				break;
105			}
106			case "merch":
107			{
108				break;
109			}
110			case "contact":
111			{
112				break;
113			}
114			case "epk":
115			{
116				document.getElementById("single-page-app").classList.add('_show-epk');
117				break;
118			}
119			default:
120			{
121				gotoPath = "404";
122				break;
123			}
124		}
125
126		const request = new XMLHttpRequest();
127		request.open("GET", gotoPath + ".html");
128		request.send();
129		request.onload = function(){
130			if(request.status == 200){
131				container.innerHTML = request.responseText;
132				if(document.querySelectorAll('.app-menu_list_i_a._active').length) document.querySelectorAll('.app-menu_list_i_a._active')[0].classList.remove('_active');
133				if(document.querySelectorAll('.app-menu_list_i_a[value="'+gotoPath+'"]').length) document.querySelectorAll('.app-menu_list_i_a[value="'+gotoPath+'"]')[0].classList.add('_active');
134				if(gotoPath == "tour"){
135					let tourScript = document.createElement("script");
136					tourScript.setAttribute("src", "https://widgetv3.bandsintown.com/main.min.js");
137					container.appendChild(tourScript);
138				}
139				if(gotoPath == "merch"){
140					document.querySelectorAll('.app-section_merch_list_menu_i').forEach((item) =>
141					{
142						item.addEventListener('click', function(e){
143							let catalogue = item.getAttribute('data-catalogue');
144							document.querySelectorAll('.app-section_merch_list_menu_i._active')[0].classList.remove("_active");
145							document.querySelectorAll('.app-section_merch_list._active')[0].classList.remove("_active");
146							item.classList.add("_active");
147							document.getElementById('merch-catalogue-'+catalogue).classList.add("_active");
148						})
149					});
150				}
151				document.getElementById('load-overlay').classList.add('_hidden');
152			}
153		}
154	}
155	window.onpopstate  = function(){
156		let path = window.location.pathname.split("/");
157		switch(path[path.length-1])
158		{
159			case "":
160			{
161				loadPage("home");
162				break;
163			}
164			case "home":
165			{
166				loadPage("home");
167				break;
168			}
169			case "music":
170			{
171				loadPage("music");
172				break;
173			}
174			case "tour":
175			{
176				loadPage("tour");
177				break;
178			}
179			case "videos":
180			{
181				loadPage("videos");
182				break;
183			}
184			case "merch":
185			{
186				loadPage("merch");
187				break;
188			}
189			case "contact":
190			{
191				loadPage("contact");
192				break;
193			}
194			case "epk":
195			{
196				document.getElementById("single-page-app").classList.add('_show-epk');
197				loadPage("epk");
198				break;
199			}
200			default:
201			{
202				loadPage("404");
203				break;
204			}
205		}
206	}
207
208}
209
210

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.