aboutsummaryrefslogtreecommitdiffstats
path: root/linkHints.js
diff options
context:
space:
mode:
authorJez Ng2012-03-03 03:11:25 -0500
committerJez Ng2012-03-06 08:43:10 -0500
commite9366ac22ed32ef54cf949acc9f63190b04c5773 (patch)
tree02871cb32f4494eb2826087f49d27ef68aad717a /linkHints.js
parent8d85fef79ea1e50106df47f4ae652e7c4dd0f07d (diff)
downloadvimium-e9366ac22ed32ef54cf949acc9f63190b04c5773.tar.bz2
Further reduction in state -- cssAdded is unnecessary.
Diffstat (limited to 'linkHints.js')
-rw-r--r--linkHints.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/linkHints.js b/linkHints.js
index 5a8cee13..3b3fc3f9 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -18,8 +18,6 @@ var linkHints = {
linkActivator: undefined,
// Whether link hint's "open in current/new tab" setting is currently toggled
openLinkModeToggle: false,
- // Whether we have added to the page the CSS needed to display link hints.
- cssAdded: false,
// While in delayMode, all keypresses have no effect.
delayMode: false,
// Handle the link hinting marker generation and matching. Must be initialized after settings have been
@@ -54,10 +52,9 @@ var linkHints = {
activateModeWithQueue: function() { this.activateMode(true, true, false); },
activateMode: function(openInNewTab, withQueue, copyLinkUrl) {
- if (!this.cssAdded)
+ if (!document.getElementById('vimiumLinkHintCss'))
// linkHintCss is declared by vimiumFrontend.js and contains the user supplied css overrides.
- addCssToPage(linkHintCss);
- this.cssAdded = true;
+ addCssToPage(linkHintCss, 'vimiumLinkHintCss');
this.setOpenLinkMode(openInNewTab, withQueue, copyLinkUrl);
this.buildLinkHints();
handlerStack.push({ // modeKeyHandler is declared by vimiumFrontend.js