A privacy-first, self-hosted, fully open source personal knowledge management software, written in typescript and golang. (PERSONAL FORK)
at lambda-fork/main 15 lines 561 B view raw
1export const addStyle = (url: string, id: string) => { 2 if (!document.getElementById(id)) { 3 const styleElement = document.createElement("link"); 4 styleElement.id = id; 5 styleElement.rel = "stylesheet"; 6 styleElement.type = "text/css"; 7 styleElement.href = url; 8 const pluginsStyle = document.querySelector("#pluginsStyle"); 9 if (pluginsStyle) { 10 pluginsStyle.before(styleElement); 11 } else { 12 document.getElementsByTagName("head")[0].appendChild(styleElement); 13 } 14 } 15};