From 5fecd7e91bcf498585ea84926182820b38ee89d9 Mon Sep 17 00:00:00 2001 From: eight Date: Tue, 12 Sep 2017 04:10:20 +0800 Subject: [PATCH] Drop .before, .after, .prepend, .append --- content/install-user-css.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/install-user-css.js b/content/install-user-css.js index 63eeba92..512c8785 100644 --- a/content/install-user-css.js +++ b/content/install-user-css.js @@ -89,9 +89,9 @@ function initInstallPage({style, dup}, sourceLoader) { `)); if (versionTest < 0) { - $('.actions').before(tHTML(` + $('.actions').parentNode.insertBefore(tHTML(`
- `)); + `), $('.actions')); } $('.code').textContent = style.source; $('button.install').onclick = () => { @@ -130,7 +130,7 @@ function initLiveReload(sourceLoader) { if (oldWarning) { oldWarning.replaceWith(warning); } else { - $('.main').prepend(warning); + $('.main').insertBefore(warning, $('.main').childNodes[0]); } }); }); @@ -140,7 +140,7 @@ function initLiveReload(sourceLoader) { watcher.start(); } }); - $('.actions').append(tHTML(` + $('.actions').appendChild(tHTML(`