Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions background_scripts/main.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,18 @@ Frames =
enabledState = Exclusions.isEnabledForUrl request.url

if request.frameIsFocused
chrome.browserAction.setIcon? tabId: tabId, imageData: do ->
enabledStateIcon =
if not enabledState.isEnabledForUrl
DISABLED_ICON
else if 0 < enabledState.passKeys.length
PARTIAL_ICON
else
ENABLED_ICON
iconImageData[enabledStateIcon]
enabledStateIcon =
if not enabledState.isEnabledForUrl
DISABLED_ICON
else if 0 < enabledState.passKeys.length
PARTIAL_ICON
else
ENABLED_ICON
if Utils.isChrome()
iconInfo = tabId: tabId, imageData: iconImageData[enabledStateIcon]
else
iconInfo = tabId: tabId, path: enabledStateIcon
chrome.browserAction.setIcon? iconInfo

port.postMessage extend request, enabledState

Expand Down
2 changes: 1 addition & 1 deletion lib/dom_utils.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ DomUtils =
eventSequence = ["mouseover", "mousedown", "mouseup", "click"]
for event in eventSequence
defaultActionShouldTrigger = @simulateMouseEvent event, element, modifiers
if event == "click" and defaultActionShouldTrigger and Utils.isFirefox()
if event == "click" and defaultActionShouldTrigger and not Utils.isChrome()
# Firefox doesn't (currently) trigger the default action for modified keys.
DomUtils.simulateClickDefaultAction element, modifiers
defaultActionShouldTrigger # return the values returned by each @simulateMouseEvent call.
Expand Down
Loading