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

Issue 5840485868371968: Issue 616 - Add $generichide + $genericblock filter options and enforce them. (Closed)

Created:
March 6, 2015, 9:45 p.m. by kzar
Modified:
Sept. 28, 2015, 12:37 p.m.
CC:
Wladimir Palant
Visibility:
Public.

Description

Issue 616 - Add $generichide + $genericblock filter options and enforce them. If you want to you can use this page for testing http://holly.cat/genericblockhide-test.html I added these custom filters: ~somewhere.com,static.kzar.co.uk###kzarNonGenericHideWithException kzar_exception_specific_block.jpg$domain=~blah.kzar.co.uk|kzar.co.uk ||static.kzar.co.uk/genericblockhide-test/kzar_specific_block.jpg kzar.co.uk###kzarAd ~somewhere.com###kzarGenericHideOnlyExceptions ?KzarPopupBlock=$popup,domain=static.kzar.co.uk @@holly.cat$genericblock @@holly.cat$generichide Note: Now depends on this review https://codereview.adblockplus.org/5991150368325632/ because we make use of the specificOnly parameter.

Patch Set 1 #

Patch Set 2 : Rebased. #

Patch Set 3 : Tidied up genericblock logic in contentPolicy code. #

Patch Set 4 : Rebased onto typeMask changes #

Total comments: 5

Patch Set 5 : Simplified generic block logic #

Total comments: 4

Patch Set 6 : Use camelCase for genericblockMatch variable name #

Total comments: 7

Patch Set 7 : Fixed interaction with sitekey and generichide logic #

Total comments: 8

Patch Set 8 : Addressed Thomas' feedback #

Total comments: 8

Patch Set 9 : Improved logic based on Wladimir's suggestions #

Patch Set 10 : Removed duplicate comment #

Total comments: 2

Patch Set 11 : Remove extra parenthesis #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -4 lines) Patch
M lib/contentPolicy.js View 1 2 3 4 5 6 7 8 3 chunks +24 lines, -1 line 0 comments Download
M lib/filterClasses.js View 1 2 3 4 5 6 7 8 9 10 2 chunks +19 lines, -3 lines 0 comments Download

Messages

Total messages: 28
kzar
March 6, 2015, 9:47 p.m. (2015-03-06 21:47:13 UTC) #1
kzar
Patch Set 3 : Tidied up genericblock logic in contentPolicy code.
March 13, 2015, 7:25 p.m. (2015-03-13 19:25:33 UTC) #2
Sebastian Noack
I don't see anything obvious here. But I'm not too familiar with this code.
March 20, 2015, 10:02 a.m. (2015-03-20 10:02:48 UTC) #3
kzar
Patch Set 4 : Rebased onto typeMask changes
July 14, 2015, 4:44 p.m. (2015-07-14 16:44:04 UTC) #4
Sebastian Noack
https://codereview.adblockplus.org/5840485868371968/diff/29322311/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29322311/lib/contentPolicy.js#newcode165 lib/contentPolicy.js:165: let genericblock = { match: null }; Nit: We ...
July 14, 2015, 5:23 p.m. (2015-07-14 17:23:34 UTC) #5
kzar
Patch Set 5 : Simplified generic block logic https://codereview.adblockplus.org/5840485868371968/diff/29322311/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29322311/lib/contentPolicy.js#newcode165 lib/contentPolicy.js:165: let ...
July 15, 2015, 11:56 a.m. (2015-07-15 11:56:21 UTC) #6
kzar
Patch Set 5 : Simplified generic block logic (This patchset is good, sorry I had ...
July 15, 2015, noon (2015-07-15 12:00:02 UTC) #7
Sebastian Noack
https://codereview.adblockplus.org/5840485868371968/diff/29322392/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29322392/lib/contentPolicy.js#newcode187 lib/contentPolicy.js:187: let genericblock_match = defaultMatcher.matchesAny(testWndLocation, RegExpFilter.typeMap.GENERICBLOCK, parentDocDomain, false); Nit: camelcase? ...
July 15, 2015, 2:57 p.m. (2015-07-15 14:57:20 UTC) #8
kzar
Patch Set 6 : Use camelCase for genericblockMatch variable name https://codereview.adblockplus.org/5840485868371968/diff/29322392/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29322392/lib/contentPolicy.js#newcode187 ...
July 15, 2015, 3:10 p.m. (2015-07-15 15:10:42 UTC) #9
Sebastian Noack
LGTM from my side. Wladimir's go now.
July 15, 2015, 3:36 p.m. (2015-07-15 15:36:11 UTC) #10
Felix Dahlke
Talked to Wladimir: He won't find the time to review this, so we agreed to ...
Aug. 20, 2015, 10:13 a.m. (2015-08-20 10:13:49 UTC) #11
Thomas Greiner
https://codereview.adblockplus.org/5840485868371968/diff/29322428/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29322428/lib/contentPolicy.js#newcode187 lib/contentPolicy.js:187: let genericblockMatch = defaultMatcher.matchesAny(testWndLocation, RegExpFilter.typeMap.GENERICBLOCK, parentDocDomain, false); You forgot ...
Aug. 20, 2015, 11:36 a.m. (2015-08-20 11:36:07 UTC) #12
kzar
Patch Set 7 : Fixed interaction with sitekey and generichide logic https://codereview.adblockplus.org/5840485868371968/diff/29322428/lib/contentPolicy.js File lib/contentPolicy.js (right): ...
Aug. 25, 2015, 5:42 p.m. (2015-08-25 17:42:08 UTC) #13
Thomas Greiner
https://codereview.adblockplus.org/5840485868371968/diff/29324610/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29324610/lib/contentPolicy.js#newcode186 lib/contentPolicy.js:186: else if (contentType != Policy.type.ELEMHIDE) Detail: The "else" keyword ...
Aug. 28, 2015, 10:28 a.m. (2015-08-28 10:28:24 UTC) #14
kzar
Patch Set 8 : Addressed Thomas' feedback https://codereview.adblockplus.org/5840485868371968/diff/29324610/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29324610/lib/contentPolicy.js#newcode186 lib/contentPolicy.js:186: else if ...
Sept. 3, 2015, 12:37 p.m. (2015-09-03 12:37:03 UTC) #15
Wladimir Palant
https://codereview.adblockplus.org/5840485868371968/diff/29325803/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29325803/lib/contentPolicy.js#newcode166 lib/contentPolicy.js:166: let generichide = null; It's either a blocking rule ...
Sept. 3, 2015, 1:09 p.m. (2015-09-03 13:09:43 UTC) #16
kzar
https://codereview.adblockplus.org/5840485868371968/diff/29325803/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29325803/lib/contentPolicy.js#newcode298 lib/contentPolicy.js:298: if (genericblock && match.isGeneric()) On 2015/09/03 13:09:43, Wladimir Palant ...
Sept. 4, 2015, 3:49 p.m. (2015-09-04 15:49:11 UTC) #17
Wladimir Palant
https://codereview.adblockplus.org/5840485868371968/diff/29325803/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29325803/lib/contentPolicy.js#newcode298 lib/contentPolicy.js:298: if (genericblock && match.isGeneric()) On 2015/09/04 15:49:10, kzar wrote: ...
Sept. 4, 2015, 4:16 p.m. (2015-09-04 16:16:23 UTC) #18
kzar
Patch Set 9 : Improved logic based on Wladimir's suggestions https://codereview.adblockplus.org/5840485868371968/diff/29325803/lib/contentPolicy.js File lib/contentPolicy.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29325803/lib/contentPolicy.js#newcode166 ...
Sept. 5, 2015, 2:39 p.m. (2015-09-05 14:39:58 UTC) #19
Sebastian Noack
LGTM
Sept. 21, 2015, 2:27 p.m. (2015-09-21 14:27:20 UTC) #20
Thomas Greiner
https://codereview.adblockplus.org/5840485868371968/diff/29324610/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29324610/lib/filterClasses.js#newcode484 lib/filterClasses.js:484: isGeneric: function() /**Boolean*/ On 2015/09/03 12:37:02, kzar wrote: > ...
Sept. 21, 2015, 4:53 p.m. (2015-09-21 16:53:37 UTC) #21
kzar
Patch Set 10 : Removed duplicate comment https://codereview.adblockplus.org/5840485868371968/diff/29324610/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29324610/lib/filterClasses.js#newcode484 lib/filterClasses.js:484: isGeneric: function() ...
Sept. 22, 2015, 1:16 p.m. (2015-09-22 13:16:47 UTC) #22
Thomas Greiner
LGTM
Sept. 22, 2015, 2:12 p.m. (2015-09-22 14:12:35 UTC) #23
Sebastian Noack
LGTM
Sept. 22, 2015, 2:15 p.m. (2015-09-22 14:15:09 UTC) #24
Felix Dahlke
Looks good to me, just a small nit. https://codereview.adblockplus.org/5840485868371968/diff/29328484/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29328484/lib/filterClasses.js#newcode485 lib/filterClasses.js:485: return ...
Sept. 28, 2015, 8:28 a.m. (2015-09-28 08:28:45 UTC) #25
kzar
Patch Set 11 : Remove extra parenthesis https://codereview.adblockplus.org/5840485868371968/diff/29328484/lib/filterClasses.js File lib/filterClasses.js (right): https://codereview.adblockplus.org/5840485868371968/diff/29328484/lib/filterClasses.js#newcode485 lib/filterClasses.js:485: return (!(this.sitekeys ...
Sept. 28, 2015, 10:16 a.m. (2015-09-28 10:16:12 UTC) #26
Felix Dahlke
LGTM
Sept. 28, 2015, noon (2015-09-28 12:00:02 UTC) #27
Thomas Greiner
Sept. 28, 2015, 12:32 p.m. (2015-09-28 12:32:09 UTC) #28
LGTM

Powered by Google App Engine
This is Rietveld