diff options
| author | Stephen Blott | 2015-04-18 07:45:30 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-04-18 07:45:30 +0100 | 
| commit | 6224319dcfa5eed1d9d9fab3a5fc2d0c20b70c2e (patch) | |
| tree | 36927befe9dac34897df94aee76c6086676407ab /background_scripts | |
| parent | e5a2dee7d1a09d593cc721d9a6c8d95638270a76 (diff) | |
| download | vimium-6224319dcfa5eed1d9d9fab3a5fc2d0c20b70c2e.tar.bz2 | |
Mode indicator: strip all references to badges.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/main.coffee | 23 | 
1 files changed, 1 insertions, 22 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 72fe1092..31ada357 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -355,32 +355,12 @@ updateOpenTabs = (tab, deleteFrames = false) ->    # Frames are recreated on refresh    delete frameIdsForTab[tab.id] if deleteFrames -chrome.browserAction.setBadgeBackgroundColor -  # This is Vimium blue (from the icon). -  # color: [102, 176, 226, 255] -  # This is a slightly darker blue. It makes the badge more striking in the corner of the eye, and the symbol -  # easier to read. -  color: [82, 156, 206, 255] - -setBadge = do -> -  current = null -  timer = null -  updateBadge = (badge, tabId) -> -> chrome.browserAction.setBadgeText text: badge, tabId: tabId -  (request, sender) -> -    badge = request.badge -    if badge? and badge != current -      current = badge -      clearTimeout timer if timer -      # We wait a few moments. This avoids badge flicker when there are rapid changes. -      timer = setTimeout updateBadge(badge, sender.tab.id), 50 -  # Here's how we set the page icon.  The default is "disabled", so if we do nothing else, then we get the  # grey-out disabled icon.  Thereafter, we only set tab-specific icons, so there's no need to update the icon  # when we visit a tab on which Vimium isn't running.  #  # For active tabs, when a frame starts, it requests its active state via isEnabledForUrl.  We also check the -# state every time a frame gets the focus.  Once the frame learns its active state, it updates the current -# tab's badge (but only if that frame has the focus). +# state every time a frame gets the focus.  In both cases, the frame then updates the tab's icon accordingly.  #  # Exclusion rule changes (from either the options page or the page popup) propagate via the subsequent focus  # change.  In particular, whenever a frame next gets the focus, it requests its new state and sets the icon @@ -647,7 +627,6 @@ sendRequestHandlers =    createMark: Marks.create.bind(Marks)    gotoMark: Marks.goto.bind(Marks)    setIcon: setIcon -  setBadge: setBadge  # We always remove chrome.storage.local/findModeRawQueryListIncognito on startup.  chrome.storage.local.remove "findModeRawQueryListIncognito"  | 
