feat: Some refinements

This commit is contained in:
2026-05-22 10:36:41 +02:00
parent d8254773a6
commit 6b53597d03
8 changed files with 859 additions and 36 deletions
+56
View File
@@ -0,0 +1,56 @@
(function() {
if (typeof Handlebars === 'undefined') {
const script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.js';
document.head.appendChild(script);
}
const tempDefine = window.define;
window.define = undefined;
const script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.js';
script.onload = function() {
window.define = tempDefine;
if (eval("(function() {\n return window.location.pathname === \"\";\n})()\n")) {
(function() {
const parsedData = eval("" || "(() => ({}))");
const template = Handlebars.compile("");
const rendered = template(parsedData);
const targetElement = document.querySelector(".foo { color: red; }");
const temp = document.createElement('template');
temp.innerHTML = rendered;
const newElement = temp.content.firstElementChild;
targetElement.replaceWith(newElement);
newElement.classList.add("template-style-762112231");
(function() {
})();
})();
}
if (eval("(function() {\n return window.location.pathname === \"\";\n})()\n")) {
}
const domReadyEvent = new Event('DOMContentLoaded', {
bubbles: true,
cancelable: true,
});
document.dispatchEvent(domReadyEvent);
window.dispatchEvent(domReadyEvent);
};
document.head.appendChild(script);
})()