27 lines
970 B
JavaScript
27 lines
970 B
JavaScript
console.log('Testing toggle button functionality');
|
|
|
|
// Debug script to inspect template loading
|
|
console.log("Debug script loaded");
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
console.log("DOM loaded in debug script");
|
|
|
|
// Log raw templates
|
|
console.log("Raw Protocol Templates:", typeof rawProtocolTemplates !== 'undefined' ? rawProtocolTemplates.length : "undefined");
|
|
if (typeof rawProtocolTemplates !== 'undefined') {
|
|
console.log("Template titles:", rawProtocolTemplates.map(t => t.title));
|
|
}
|
|
|
|
// Log processed templates
|
|
setTimeout(() => {
|
|
const templateSelect = document.getElementById('protocol-template');
|
|
if (templateSelect) {
|
|
console.log("Template options:", templateSelect.options.length);
|
|
const options = Array.from(templateSelect.options).map(o => o.textContent);
|
|
console.log("Option texts:", options);
|
|
} else {
|
|
console.log("Template select element not found");
|
|
}
|
|
}, 1000);
|
|
});
|