diff options
| author | Stephen Blott | 2015-04-19 11:01:27 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-04-19 11:01:27 +0100 | 
| commit | b8457c39f9ac487c25c66fffebfc176e8593eaa7 (patch) | |
| tree | a2fc05ec1ee69c54c8c79e86b9e75d85596aa969 /background_scripts/main.coffee | |
| parent | 756312e9f67d73bbaf1e48cc4f9fe0439ccb7f72 (diff) | |
| parent | 0e2d65684a338f6c7a31205f34a76c6d33f46aa8 (diff) | |
| download | vimium-b8457c39f9ac487c25c66fffebfc176e8593eaa7.tar.bz2 | |
Merge branch 'remove-badges'
Conflicts:
	content_scripts/vimium_frontend.coffee
Diffstat (limited to 'background_scripts/main.coffee')
| -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" | 
