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

Issue 29340571: Issue 3687 - Add experimental support for Safari content blockers (Closed)

Created:
April 19, 2016, 1:59 p.m. by kzar
Modified:
May 18, 2016, 12:47 p.m.
Reviewers:
Sebastian Noack
Visibility:
Public.

Description

Issue 3687 - Add experimental support for Safari content blockers

Patch Set 1 #

Total comments: 49

Patch Set 2 : Rebased #

Patch Set 3 : Addressed feedback #

Patch Set 4 : Improve comment about strange API behaviour #

Patch Set 5 : Added note about bug report #

Total comments: 7

Patch Set 6 : Improve comments about buggy behavouir #

Total comments: 4

Patch Set 7 : Addressed further feedback #

Patch Set 8 : Don't reuse strings from new options page #

Patch Set 9 : Avoid type conversion when handling Safari bug #

Total comments: 4

Patch Set 10 : Don't avoid type conversion #

Patch Set 11 : Remove onChange logic for checkboxes #

Total comments: 13

Patch Set 12 : Addressed Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+405 lines, -151 lines) Patch
M _locales/en_US/messages.json View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M dependencies View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M lib/prefs.js View 1 chunk +5 lines, -0 lines 0 comments Download
M lib/punycode.js View 1 2 3 chunks +3 lines, -37 lines 0 comments Download
A lib/tldjs.js View 1 2 3 4 5 6 1 chunk +47 lines, -0 lines 0 comments Download
M lib/url.js View 1 2 3 chunks +4 lines, -23 lines 0 comments Download
M metadata.chrome View 1 chunk +3 lines, -0 lines 0 comments Download
M metadata.common View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +5 lines, -3 lines 0 comments Download
M options.html View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M options.js View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +32 lines, -18 lines 0 comments Download
M popup.js View 1 chunk +11 lines, -0 lines 0 comments Download
A safari/contentBlocking.js View 1 2 3 4 5 6 9 1 chunk +162 lines, -0 lines 0 comments Download
M safari/ext/background.js View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M safari/ext/content.js View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +91 lines, -69 lines 0 comments Download
M safari/include.youtube.js View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +17 lines, -1 line 0 comments Download
M skin/popup.css View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 21
kzar
Patch Set 1 https://codereview.adblockplus.org/29340571/diff/29340572/metadata.chrome File metadata.chrome (right): https://codereview.adblockplus.org/29340571/diff/29340572/metadata.chrome#newcode45 metadata.chrome:45: lib/adblockplus.js -= abp2blocklist/lib/abp2blocklist.js safari/contentBlocking.js I'm guessing ...
April 19, 2016, 2:03 p.m. (2016-04-19 14:03:49 UTC) #1
Sebastian Noack
https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json File _locales/en_US/messages.json (left): https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json#oldcode124 _locales/en_US/messages.json:124: "safari_content_blocker": { Why did you remove the message? Also ...
May 12, 2016, 11:12 a.m. (2016-05-12 11:12:24 UTC) #2
kzar
Patch Set 2 : Rebased (edit) https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json File _locales/en_US/messages.json (left): https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json#oldcode124 _locales/en_US/messages.json:124: "safari_content_blocker": { On ...
May 17, 2016, 3:15 p.m. (2016-05-17 15:15:41 UTC) #3
kzar
Patch Set 3 : Addressed feedback
May 17, 2016, 3:16 p.m. (2016-05-17 15:16:02 UTC) #4
kzar
Patch Set 4 : Improve comment about strange API behaviour
May 17, 2016, 3:53 p.m. (2016-05-17 15:53:43 UTC) #5
kzar
Patch Set 5 : Added note about bug report
May 17, 2016, 4:19 p.m. (2016-05-17 16:19:55 UTC) #6
kzar
https://codereview.adblockplus.org/29340571/diff/29342098/safari/contentBlocking.js File safari/contentBlocking.js (right): https://codereview.adblockplus.org/29340571/diff/29342098/safari/contentBlocking.js#newcode78 safari/contentBlocking.js:78: // Safari 9 performs the callback twice under some ...
May 17, 2016, 5:13 p.m. (2016-05-17 17:13:06 UTC) #7
kzar
Patch Set 6 : Improve comments about buggy behaviour
May 17, 2016, 6:23 p.m. (2016-05-17 18:23:31 UTC) #8
Sebastian Noack
https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json File _locales/en_US/messages.json (left): https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json#oldcode124 _locales/en_US/messages.json:124: "safari_content_blocker": { On 2016/05/17 15:15:36, kzar wrote: > On ...
May 17, 2016, 6:35 p.m. (2016-05-17 18:35:26 UTC) #9
kzar
Patch Set 7 : Addressed further feedback https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json File _locales/en_US/messages.json (left): https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json#oldcode124 _locales/en_US/messages.json:124: "safari_content_blocker": { ...
May 17, 2016, 7:20 p.m. (2016-05-17 19:20:23 UTC) #10
Sebastian Noack
https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json File _locales/en_US/messages.json (left): https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json#oldcode124 _locales/en_US/messages.json:124: "safari_content_blocker": { On 2016/05/17 19:20:21, kzar wrote: > On ...
May 18, 2016, 7:03 a.m. (2016-05-18 07:03:30 UTC) #11
kzar
Patch Set 8 : Don't reuse strings from new options page https://codereview.adblockplus.org/29340571/diff/29340572/_locales/en_US/messages.json File _locales/en_US/messages.json (left): ...
May 18, 2016, 8:02 a.m. (2016-05-18 08:02:49 UTC) #12
kzar
Patch Set 9 : Avoid type conversion when handling Safari bug
May 18, 2016, 8:06 a.m. (2016-05-18 08:06:30 UTC) #13
Sebastian Noack
https://codereview.adblockplus.org/29340571/diff/29340572/options.js File options.js (right): https://codereview.adblockplus.org/29340571/diff/29340572/options.js#newcode544 options.js:544: // Apparently modifying the checked attribute for a checkbox ...
May 18, 2016, 8:13 a.m. (2016-05-18 08:13:38 UTC) #14
kzar
Patch Set 10 : Don't avoid type conversion https://codereview.adblockplus.org/29340571/diff/29340572/options.js File options.js (right): https://codereview.adblockplus.org/29340571/diff/29340572/options.js#newcode544 options.js:544: // ...
May 18, 2016, 9:28 a.m. (2016-05-18 09:28:49 UTC) #15
Sebastian Noack
https://codereview.adblockplus.org/29340571/diff/29340572/options.js File options.js (right): https://codereview.adblockplus.org/29340571/diff/29340572/options.js#newcode544 options.js:544: // Apparently modifying the checked attribute for a checkbox ...
May 18, 2016, 10:07 a.m. (2016-05-18 10:07:25 UTC) #16
Sebastian Noack
https://codereview.adblockplus.org/29340571/diff/29342686/safari/contentBlocking.js File safari/contentBlocking.js (right): https://codereview.adblockplus.org/29340571/diff/29342686/safari/contentBlocking.js#newcode84 safari/contentBlocking.js:84: if (error === "") On 2016/05/18 10:07:24, Sebastian Noack ...
May 18, 2016, 10:11 a.m. (2016-05-18 10:11:46 UTC) #17
kzar
Patch Set 11 : Remove onChange logic for checkboxes https://codereview.adblockplus.org/29340571/diff/29340572/options.js File options.js (right): https://codereview.adblockplus.org/29340571/diff/29340572/options.js#newcode544 options.js:544: ...
May 18, 2016, 10:43 a.m. (2016-05-18 10:43:41 UTC) #18
Sebastian Noack
https://codereview.adblockplus.org/29340571/diff/29342736/metadata.common File metadata.common (right): https://codereview.adblockplus.org/29340571/diff/29342736/metadata.common#newcode151 metadata.common:151: adblockplusui/locale/*/firstRun.json = =* Nit: It seems you removed the ...
May 18, 2016, 11:16 a.m. (2016-05-18 11:16:34 UTC) #19
kzar
Patch Set 12 : Addressed Nits https://codereview.adblockplus.org/29340571/diff/29342736/metadata.common File metadata.common (right): https://codereview.adblockplus.org/29340571/diff/29342736/metadata.common#newcode151 metadata.common:151: adblockplusui/locale/*/firstRun.json = =* ...
May 18, 2016, 11:32 a.m. (2016-05-18 11:32:10 UTC) #20
Sebastian Noack
May 18, 2016, 11:36 a.m. (2016-05-18 11:36:46 UTC) #21
LGTM

https://codereview.adblockplus.org/29340571/diff/29342736/options.js
File options.js (right):

https://codereview.adblockplus.org/29340571/diff/29342736/options.js#newcode248
options.js:248: key = key || id;
On 2016/05/18 11:32:07, kzar wrote:
> On 2016/05/18 11:16:32, Sebastian Noack wrote:
> > Note that when we retrieve the checkbox later in onPrefMessage() we assume
the
> > key and id to be the same, which will fail for
> > "notifications_ignoredcategories". So perhaps remove that logic here as well
> and
> > just rename the ID in the HTML?
> 
> Actually onPrefMessage already handles that, changing the key to
> shouldShowNotifications.

Hm, seems that logic could be simplified altogether then, by just adapting the
HTML ID. But up to you, as it's not directly related to your changes.

Powered by Google App Engine
This is Rietveld