forked from codeigniter4/CodeIgniter4
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtoolbarstandalone.js
More file actions
37 lines (31 loc) · 1.02 KB
/
toolbarstandalone.js
File metadata and controls
37 lines (31 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Bootstrap for standalone Debug Toolbar pages (?debugbar_time=...).
*/
if (! document.getElementById('debugbar_loader')) {
if (typeof loadDoc !== 'function') {
window.loadDoc = function (time) {
if (isNaN(time)) {
return;
}
localStorage.setItem('debugbar-time', time);
localStorage.setItem('debugbar-time-new', time);
window.location.href = ciSiteURL + '?debugbar_time=' + time;
};
}
(function () {
function initStandaloneToolbar() {
if (typeof ciDebugBar !== 'object') {
return;
}
if (! document.getElementById('debug-bar') || ! document.getElementById('debug-icon')) {
return;
}
ciDebugBar.init();
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initStandaloneToolbar, false);
} else {
initStandaloneToolbar();
}
})();
}