diff --git a/content/apply.js b/content/apply.js index c3fd540c..a399d61d 100644 --- a/content/apply.js +++ b/content/apply.js @@ -8,7 +8,7 @@ const APPLY = (() => { const CHROME = chrome.app ? parseInt(navigator.userAgent.match(/Chrom\w+\/(?:\d+\.){2}(\d+)|$/)[1]) : NaN; var ID_PREFIX = 'stylus-'; - var ROOT = document.documentElement; + var ROOT; var isOwnPage = location.protocol.endsWith('-extension:'); var disableAll = false; var styleElements = new Map(); @@ -43,6 +43,7 @@ const APPLY = (() => { } return API.getSectionsByUrl(getMatchUrl()) .then(result => { + ROOT = document.documentElement; const styles = Object.values(result); // CSS transition bug workaround: since we insert styles asynchronously, // the browsers, especially Firefox, may apply all transitions on page load diff --git a/manifest.json b/manifest.json index 0550b064..c7020297 100644 --- a/manifest.json +++ b/manifest.json @@ -29,7 +29,6 @@ "js/storage-util.js", "js/sections-util.js", "js/worker-util.js", - "background/storage.js", "js/prefs.js", "js/script-loader.js", "js/usercss.js",