PageSourceSearch

http://www.mumbaipressclub.com/index.php?debugbar

js mumbaipressclub.com collected 2026-10-03 00:56:59 UTC 3,251 bytes, 88 lines download raw bytes

1document.addEventListener('DOMContentLoaded', loadDoc, false);
2
3function loadDoc(time) {
4	if (isNaN(time)) {
5		time = document.getElementById("debugbar_loader").getAttribute("data-time");
6		localStorage.setItem('debugbar-time', time);
7	}
8
9	localStorage.setItem('debugbar-time-new', time);
10
11	var url = "http://mumbaipressclub.com/index.php";
12
13	var xhttp = new XMLHttpRequest();
14	xhttp.onreadystatechange = function() {
15		if (this.readyState === 4 && this.status === 200) {
16			var toolbar = document.getElementById("toolbarContainer");
17			if (!toolbar) {
18				toolbar = document.createElement('div');
19				toolbar.setAttribute('id', 'toolbarContainer');
20				document.body.appendChild(toolbar);
21			}
22
23			// copy for easier manipulation
24			let responseText = this.responseText;
25
26			// get csp blocked parts
27			// the style block is the first and starts at 0
28			{
29				let PosBeg = responseText.indexOf( '>', responseText.indexOf( '<style' ) ) + 1;
30				let PosEnd = responseText.indexOf( '</style>', PosBeg );
31				document.getElementById( 'debugbar_dynamic_style' ).innerHTML = responseText.substr( PosBeg, PosEnd - PosBeg );
32				responseText = responseText.substr( PosEnd + 8 );
33			}
34			// the script block starts right after style blocks ended
35			{
36				let PosBeg = responseText.indexOf( '>', responseText.indexOf( '<script' ) ) + 1;
37				let PosEnd = responseText.indexOf( '</script>' );
38				document.getElementById( 'debugbar_dynamic_script' ).innerHTML = responseText.substr( PosBeg, PosEnd - PosBeg );
39				responseText = responseText.substr( PosEnd + 9 );
40			}
41			// check for last style block
42			{
43				let PosBeg = responseText.indexOf( '>', responseText.lastIndexOf( '<style' ) ) + 1;
44				let PosEnd = responseText.indexOf( '</style>', PosBeg );
45				document.getElementById( 'debugbar_dynamic_style' ).innerHTML += responseText.substr( PosBeg, PosEnd - PosBeg );
46				responseText = responseText.substr( 0, PosBeg + 8 );
47			}
48
49			toolbar.innerHTML = responseText;
50			if (typeof ciDebugBar === 'object') {
51				ciDebugBar.init();
52			}
53		} else if (this.readyState === 4 && this.status === 404) {
54			console.log('CodeIgniter DebugBar: File "WRITEPATH/debugbar/debugbar_' + time + '" not found.');
55		}
56	};
57
58	xhttp.open("GET", url + "?debugbar_time=" + time, true);
59	xhttp.send();
60}
61
62// Track all AJAX requests
63if (window.ActiveXObject) {
64	var oldXHR = new ActiveXObject('Microsoft.XMLHTTP');
65} else {
66	var oldXHR = window.XMLHttpRequest;
67}
68
69function newXHR() {
70	var realXHR = new oldXHR();
71	realXHR.addEventListener("readystatechange", function() {
72		// Only success responses and URLs that do not contains "debugbar_time" are tracked
73		if (realXHR.readyState === 4 && realXHR.status.toString()[0] === '2' && realXHR.responseURL.indexOf('debugbar_time') === -1) {
74			var debugbarTime = realXHR.getResponseHeader('Debugbar-Time');
75			if (debugbarTime) {
76				var h2 = document.querySelector('#ci-history > h2');
77				if(h2) {
78					h2.innerHTML = 'History <small>You have new debug data.</small> <button onclick="loadDoc(' + debugbarTime + ')">Update</button>';
79					var badge = document.querySelector('a[data-tab="ci-history"] > span > .badge');
80					badge.className += ' active';
81				}
82			}
83		}
84	}, false);
85	return realXHR;
86}
87
88window.XMLHttpRequest = newXHR;

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.