-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.php
More file actions
29 lines (28 loc) · 1.09 KB
/
Copy pathscript.php
File metadata and controls
29 lines (28 loc) · 1.09 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
<?php
return <<<'JS'
<script>
function switchDebugTab(tabName) {
var bar = document.getElementById('pet-debug-bar');
bar.classList.remove('collapsed');
var tabs = bar.querySelectorAll('.pet-debug-tab');
tabs.forEach(function(t) { t.classList.remove('active'); });
var contents = bar.querySelectorAll('.pet-debug-content');
contents.forEach(function(c) { c.classList.remove('active'); });
var activeTab = bar.querySelector('.pet-debug-tab[data-tab="' + tabName + '"]');
if (activeTab) activeTab.classList.add('active');
var activeContent = document.getElementById('pet-debug-tab-' + tabName);
if (activeContent) activeContent.classList.add('active');
}
function toggleDebugBar() {
var bar = document.getElementById('pet-debug-bar');
bar.classList.toggle('collapsed');
}
function toggleVendorFiles() {
var vendorTable = document.getElementById('pet-debug-vendor-files');
var checkbox = document.getElementById('pet-debug-show-vendor');
if (vendorTable && checkbox) {
vendorTable.style.display = checkbox.checked ? 'table' : 'none';
}
}
</script>
JS;