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

Issue 4840054052618240: Issue 1428 - Disable "Block Element" on non-HTML pages (Closed)

Created:
Sept. 25, 2014, 4:15 p.m. by Sebastian Noack
Modified:
Sept. 26, 2014, 4:07 p.m.
Reviewers:
Thomas Greiner
CC:
Wladimir Palant
Visibility:
Public.

Description

Issue 1428 - Disable "Block Element" on non-HTML pages

Patch Set 1 #

Total comments: 6

Patch Set 2 : Removed outdated comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -7 lines) Patch
M background.js View 3 chunks +7 lines, -1 line 0 comments Download
M include.postload.js View 1 2 chunks +4 lines, -5 lines 0 comments Download
M popup.js View 1 chunk +3 lines, -1 line 0 comments Download
M skin/popup.css View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 4
Sebastian Noack
Sept. 25, 2014, 4:17 p.m. (2014-09-25 16:17:44 UTC) #1
Thomas Greiner
http://codereview.adblockplus.org/4840054052618240/diff/5629499534213120/background.js File background.js (left): http://codereview.adblockplus.org/4840054052618240/diff/5629499534213120/background.js#oldcode141 background.js:141: if (Prefs.shouldShowBlockElementMenu && !whitelisted && /^https?:/.test(page.url)) Checking for HTML ...
Sept. 26, 2014, 10:03 a.m. (2014-09-26 10:03:55 UTC) #2
Sebastian Noack
http://codereview.adblockplus.org/4840054052618240/diff/5629499534213120/background.js File background.js (left): http://codereview.adblockplus.org/4840054052618240/diff/5629499534213120/background.js#oldcode141 background.js:141: if (Prefs.shouldShowBlockElementMenu && !whitelisted && /^https?:/.test(page.url)) On 2014/09/26 10:03:55, ...
Sept. 26, 2014, 10:23 a.m. (2014-09-26 10:23:43 UTC) #3
Thomas Greiner
Sept. 26, 2014, 12:48 p.m. (2014-09-26 12:48:55 UTC) #4
LGTM

http://codereview.adblockplus.org/4840054052618240/diff/5629499534213120/back...
File background.js (left):

http://codereview.adblockplus.org/4840054052618240/diff/5629499534213120/back...
background.js:141: if (Prefs.shouldShowBlockElementMenu && !whitelisted &&
/^https?:/.test(page.url))
On 2014/09/26 10:23:43, Sebastian Noack wrote:
> What's the point? When our content script, setting up "Block Element"
> functionally completed, it sends a message to the background page, which adds
> that page to htmlPages. And this is everything we care about here, whether we
> can use "Block Element" on that page.
I see what you mean. That's quite a nice solution.

http://codereview.adblockplus.org/4840054052618240/diff/5629499534213120/incl...
File include.postload.js (right):

http://codereview.adblockplus.org/4840054052618240/diff/5629499534213120/incl...
include.postload.js:472: if (document instanceof HTMLDocument)
On 2014/09/26 10:23:43, Sebastian Noack wrote:
> On 2014/09/26 10:03:55, Thomas Greiner wrote:
> > What about the comment above?
> 
> That comment is outdated. I have removed it. In fact we already changed that
> check like that, in include.preload.js.

Thanks. I'll ignore the rest of the changes in the second patch since they
belong to a different issue.

Powered by Google App Engine
This is Rietveld