diff options
| author | Stephen Blott | 2015-05-11 07:05:25 +0100 |
|---|---|---|
| committer | Stephen Blott | 2015-05-11 07:05:25 +0100 |
| commit | 3503b5a510416e04449272a461e6765b7e7cd3f7 (patch) | |
| tree | 8b6f883bd602fcb2d2fe05a7ba157c7731bbb667 /content_scripts/ui_component.coffee | |
| parent | 42adefc558976e2118c55f54d23e3f4e73693258 (diff) | |
| parent | ecd682bb85eeee36057444de7b055090b3468110 (diff) | |
| download | vimium-3503b5a510416e04449272a461e6765b7e7cd3f7.tar.bz2 | |
Merge pull request #1649 from mrmr1993/css-import-for-shadow-dom-styles
Use css @import rather than XMLHttpRequest for shadow DOM external style
Diffstat (limited to 'content_scripts/ui_component.coffee')
| -rw-r--r-- | content_scripts/ui_component.coffee | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/content_scripts/ui_component.coffee b/content_scripts/ui_component.coffee index 61c45136..5e0bd5d5 100644 --- a/content_scripts/ui_component.coffee +++ b/content_scripts/ui_component.coffee @@ -8,12 +8,7 @@ class UIComponent styleSheet = document.createElement "style" styleSheet.type = "text/css" # Default to everything hidden while the stylesheet loads. - styleSheet.innerHTML = "* {display: none !important;}" - # Load stylesheet. - xhr = new XMLHttpRequest() - xhr.onload = (e) -> styleSheet.innerHTML = xhr.responseText - xhr.open "GET", chrome.runtime.getURL("content_scripts/vimium.css"), true - xhr.send() + styleSheet.innerHTML = "@import url(\"#{chrome.runtime.getURL("content_scripts/vimium.css")}\");" @iframeElement = document.createElement "iframe" extend @iframeElement, |
