removed unused processesseessess
This commit is contained in:
parent
348f355eb2
commit
4fdc567e08
158 changed files with 1317 additions and 3351 deletions
|
|
@ -5,29 +5,5 @@
|
|||
return String(value ?? "").replace(/[&<>"']/g, ch => ({ "&": "&", "<": "<", ">": ">", "\"": """, "'": "'" }[ch] || ch));
|
||||
}
|
||||
|
||||
function ensureStyle(id, cssText = "") {
|
||||
if (!id) return null;
|
||||
let style = document.getElementById(id);
|
||||
if (style) return style;
|
||||
style = document.createElement("style");
|
||||
style.id = id;
|
||||
style.textContent = cssText;
|
||||
document.head.appendChild(style);
|
||||
return style;
|
||||
}
|
||||
|
||||
function createPanel({ id, className = "", html = "", after = null, parent = document.body } = {}) {
|
||||
if (!id) return null;
|
||||
let panel = document.getElementById(id);
|
||||
if (panel) return panel;
|
||||
panel = document.createElement("section");
|
||||
panel.id = id;
|
||||
if (className) panel.className = className;
|
||||
panel.innerHTML = html;
|
||||
if (after?.parentNode) after.parentNode.insertBefore(panel, after.nextSibling);
|
||||
else parent.appendChild(panel);
|
||||
return panel;
|
||||
}
|
||||
|
||||
global.TarinaiUIHelpers = { htmlEscape, ensureStyle, createPanel };
|
||||
global.TarinaiUIHelpers = { htmlEscape };
|
||||
})(typeof window !== "undefined" ? window : globalThis);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue