aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2014-10-26 06:40:01 +0000
committerStephen Blott2014-10-26 06:40:01 +0000
commitfc7cdcdeb46aacda448105c58964a07ed68e0d4d (patch)
treea97c9ef0c895426e2f8daa836a59c308aeee2f62
parente8f2fb67dfec05a7cc87b69e612a8d38734ef7cf (diff)
parent046650ba22ac12ebb18d1eb109fe694016eb77c0 (diff)
downloadvimium-fc7cdcdeb46aacda448105c58964a07ed68e0d4d.tar.bz2
Merge branch 'mrmr1993-fix-insertCSS-error'
-rw-r--r--background_scripts/main.coffee8
1 files changed, 5 insertions, 3 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 7b9d98b0..e611bf75 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -387,12 +387,14 @@ updateScrollPosition = (tab, scrollX, scrollY) ->
chrome.tabs.onUpdated.addListener (tabId, changeInfo, tab) ->
return unless changeInfo.status == "loading" # only do this once per URL change
- chrome.tabs.insertCSS tabId,
+ cssConf =
allFrames: true
code: Settings.get("userDefinedLinkHintCss")
runAt: "document_start"
- updateOpenTabs(tab)
- updateActiveState(tabId)
+ chrome.tabs.insertCSS tabId, cssConf, ->
+ if not chrome.runtime.lastError
+ updateOpenTabs(tab)
+ updateActiveState(tabId)
chrome.tabs.onAttached.addListener (tabId, attachedInfo) ->
# We should update all the tabs in the old window and the new window.