fixup! Fix: rewrite loadScript, merge onDOMscripted, injectCSS, injectScript
This commit is contained in:
parent
2506b957f8
commit
2342cc50e9
12
js/dom.js
12
js/dom.js
|
@ -80,18 +80,6 @@ function onDOMready() {
|
|||
}
|
||||
|
||||
|
||||
function injectCSS(url) {
|
||||
if (!url) {
|
||||
return;
|
||||
}
|
||||
document.head.appendChild($element({
|
||||
tag: 'link',
|
||||
rel: 'stylesheet',
|
||||
href: url
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
function scrollElementIntoView(element) {
|
||||
// align to the top/bottom of the visible area if wasn't visible
|
||||
const bounds = element.getBoundingClientRect();
|
||||
|
|
Loading…
Reference in New Issue
Block a user