Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 5099207639695360: Made browser actions per tab on Safari (Closed)

Created:
Dec. 27, 2013, 7:22 p.m. by Sebastian Noack
Modified:
Jan. 17, 2014, 3:15 p.m.
Visibility:
Public.

Description

This patch set fixes two issues with browser actions on Safari: * The title, icon and badge were set globally with Tab.browserAction.set*. So the badge was always set for the last loaded tab instead for the active tab. * We mistakenly assumed that there can only be one toolbar item. But in fact there is one toolbar item per window, and we have to get the right one, in order to set its title, icon or badge.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Rebased, addressed comment and enabled to set global browser actions #

Total comments: 16

Patch Set 3 : Addressed comments #

Patch Set 4 : Addressed comments #

Patch Set 5 : Forgot to set tab in BrowserAction constructor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -27 lines) Patch
M background.js View 1 2 3 1 chunk +0 lines, -2 lines 0 comments Download
M safari/ext/background.js View 1 2 3 4 4 chunks +97 lines, -25 lines 0 comments Download

Messages

Total messages: 10
Sebastian Noack
Dec. 27, 2013, 7:48 p.m. (2013-12-27 19:48:27 UTC) #1
Wladimir Palant
http://codereview.adblockplus.org/5099207639695360/diff/5629499534213120/safari/ext/background.js File safari/ext/background.js (right): http://codereview.adblockplus.org/5099207639695360/diff/5629499534213120/safari/ext/background.js#newcode193 safari/ext/background.js:193: var tooltipItemPropertiesPerTab = new TabMap(); You meant toolbarItem, not ...
Jan. 15, 2014, 3:24 p.m. (2014-01-15 15:24:46 UTC) #2
Sebastian Noack
Beside that I have added ext.browserAction (in additon to Tab.browserAction), in order to set global ...
Jan. 15, 2014, 7:25 p.m. (2014-01-15 19:25:47 UTC) #3
Wladimir Palant
http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js File background.js (right): http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js#newcode413 background.js:413: ext.browserAction.setTitle(ext.i18n.getMessage("name")); If you take this route then there should ...
Jan. 16, 2014, 9:10 a.m. (2014-01-16 09:10:04 UTC) #4
Sebastian Noack
http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js File background.js (right): http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js#newcode413 background.js:413: ext.browserAction.setTitle(ext.i18n.getMessage("name")); On 2014/01/16 09:10:05, Wladimir Palant wrote: > If ...
Jan. 16, 2014, 12:45 p.m. (2014-01-16 12:45:02 UTC) #5
Wladimir Palant
http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js File background.js (right): http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js#newcode413 background.js:413: ext.browserAction.setTitle(ext.i18n.getMessage("name")); On 2014/01/16 12:45:02, Sebastian Noack wrote: > I ...
Jan. 16, 2014, 12:55 p.m. (2014-01-16 12:55:17 UTC) #6
Sebastian Noack
http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js File background.js (right): http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js#newcode413 background.js:413: ext.browserAction.setTitle(ext.i18n.getMessage("name")); On 2014/01/16 12:55:18, Wladimir Palant wrote: > The ...
Jan. 16, 2014, 2:01 p.m. (2014-01-16 14:01:52 UTC) #7
Wladimir Palant
http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js File background.js (right): http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/background.js#newcode413 background.js:413: ext.browserAction.setTitle(ext.i18n.getMessage("name")); On 2014/01/16 14:01:52, Sebastian Noack wrote: > Yes, ...
Jan. 17, 2014, 7:54 a.m. (2014-01-17 07:54:35 UTC) #8
Sebastian Noack
http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/chrome/ext/background.js File chrome/ext/background.js (right): http://codereview.adblockplus.org/5099207639695360/diff/5639274879778816/chrome/ext/background.js#newcode541 chrome/ext/background.js:541: ext.browserAction = new BrowserAction(); My main concern is having ...
Jan. 17, 2014, 12:56 p.m. (2014-01-17 12:56:14 UTC) #9
Wladimir Palant
Jan. 17, 2014, 2:53 p.m. (2014-01-17 14:53:48 UTC) #10
LGTM

Powered by Google App Engine
This is Rietveld