fixup! Fix: rewrite loadScript, merge onDOMscripted, injectCSS, injectScript

This commit is contained in:
eight 2017-09-12 23:19:55 +08:00
parent 2506b957f8
commit 2342cc50e9

View File

@ -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();