diff options
| -rw-r--r-- | background_scripts/main.js | 8 | ||||
| -rw-r--r-- | content_scripts/link_hints.coffee | 2 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 7 |
3 files changed, 2 insertions, 15 deletions
diff --git a/background_scripts/main.js b/background_scripts/main.js index 49790b87..4dc11181 100644 --- a/background_scripts/main.js +++ b/background_scripts/main.js @@ -24,7 +24,6 @@ var portHandlers = { var sendRequestHandlers = { getCompletionKeys: getCompletionKeysRequest, - getLinkHintCss: getLinkHintCss, openUrlInNewTab: openUrlInNewTab, openUrlInCurrentTab: openUrlInCurrentTab, openOptionsPageInNewTab: openOptionsPageInNewTab, @@ -239,13 +238,6 @@ function openCopiedUrlInCurrentTab(request) { openUrlInCurrentTab({ url: Clipboa function openCopiedUrlInNewTab(request) { openUrlInNewTab({ url: Clipboard.paste() }); } /* - * Returns the user-provided CSS overrides. - */ -function getLinkHintCss(request) { - return { linkHintCss: (Settings.get("userDefinedLinkHintCss") || "") }; -} - -/* * Called when the user has clicked the close icon on the "Vimium has been updated" message. * We should now dismiss that message in all tabs. */ diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index d2db5b12..8d5227d5 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -53,7 +53,7 @@ LinkHints = if (!document.getElementById("vimiumLinkHintCss")) # linkHintCss is declared by vimiumFrontend.js and contains the user supplied css overrides. - addCssToPage(linkHintCss, "vimiumLinkHintCss") + addCssToPage(settings.get("userDefinedLinkHintCss"), "vimiumLinkHintCss") @setOpenLinkMode(openInNewTab, withQueue, copyLinkUrl) @buildLinkHints() # handlerStack is declared by vimiumFrontend.js diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 77c9e296..21c366e9 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -19,7 +19,6 @@ isEnabledForUrl = true # The user's operating system. currentCompletionKeys = null validFirstKeys = null -linkHintCss = null activatedElement = null # The types in <input type="..."> that we consider for focusInput command. Right now this is recalculated in @@ -46,7 +45,7 @@ settings = values: {} loadedValues: 0 valuesToLoad: ["scrollStepSize", "linkHintCharacters", "filterLinkHints", "hideHud", "previousPatterns", - "nextPatterns", "findModeRawQuery"] + "nextPatterns", "findModeRawQuery", "userDefinedLinkHintCss"] isLoaded: false eventListeners: {} @@ -100,9 +99,6 @@ initializePreDomReady = -> checkIfEnabledForUrl() - chrome.extension.sendRequest { handler: "getLinkHintCss" }, (response) -> - linkHintCss = response.linkHintCss - refreshCompletionKeys() # Send the key to the key handler in the background page. @@ -1030,7 +1026,6 @@ window.onbeforeunload = -> root = exports ? window root.window = window root.settings = settings -root.linkHintCss = linkHintCss root.addCssToPage = addCssToPage root.HUD = HUD root.handlerStack = handlerStack |
