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

Issue 29333344: Issue 3472 - Made sure that "Block element" option is shown after page load (Closed)

Created:
Jan. 8, 2016, 5:50 p.m. by Thomas Greiner
Modified:
Jan. 12, 2016, 6:01 p.m.
Reviewers:
Sebastian Noack
Visibility:
Public.

Description

Issue 3472 - Made sure that "Block element" option is shown after page load

Patch Set 1 #

Total comments: 3

Patch Set 2 : Replaced check #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -2 lines) Patch
M popup.js View 1 4 chunks +16 lines, -2 lines 0 comments Download

Messages

Total messages: 4
Thomas Greiner
Jan. 8, 2016, 5:55 p.m. (2016-01-08 17:55:09 UTC) #1
Sebastian Noack
https://codereview.adblockplus.org/29333344/diff/29333345/popup.js File popup.js (right): https://codereview.adblockplus.org/29333344/diff/29333345/popup.js#newcode88 popup.js:88: && backgroundPage.htmlPages.has(page)) This check is redundant. Or if you ...
Jan. 9, 2016, 12:01 a.m. (2016-01-09 00:01:50 UTC) #2
Thomas Greiner
https://codereview.adblockplus.org/29333344/diff/29333345/popup.js File popup.js (right): https://codereview.adblockplus.org/29333344/diff/29333345/popup.js#newcode88 popup.js:88: && backgroundPage.htmlPages.has(page)) On 2016/01/09 00:01:50, Sebastian Noack wrote: > ...
Jan. 12, 2016, 11:35 a.m. (2016-01-12 11:35:18 UTC) #3
Sebastian Noack
Jan. 12, 2016, 4:09 p.m. (2016-01-12 16:09:17 UTC) #4
https://codereview.adblockplus.org/29333344/diff/29333345/popup.js
File popup.js (right):

https://codereview.adblockplus.org/29333344/diff/29333345/popup.js#newcode88
popup.js:88: && backgroundPage.htmlPages.has(page))
On 2016/01/12 11:35:17, Thomas Greiner wrote:
> On 2016/01/09 00:01:50, Sebastian Noack wrote:
> > This check is redundant. Or if you want to keep it for consistence, please
> move
> > that logic including the DOM manipulation below to a function that is called
> > here as well when checking initially.
> 
> Unfortunately, it's not redundant. Any page could've sent this message so
there
> needs to be an extra check to ensure that it concerns the page the popup is
> associated with.

Acknowledged.

> Generally, I'd like to avoid creating a function for one line of code,
> especially since I can't use `document.body.classList.toggle("nohtml",
> !backgroundPage.htmlPages.has(page))` due to Safari 6.1. Therefore I'm
checking
> the origin of the page because comparing `sender.page == page` doesn't work
and
> implementing it doesn't appear to be worth it.

I don't think that I agree. But it's probably not too important. LGTM

Powered by Google App Engine
This is Rietveld