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

Unified Diff: composer.postload.js

Issue 29602561: Issue 5817 - Make sure to send initialization message to the Block Element pop-up only after it is … (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome
Patch Set: Created Nov. 9, 2017, 2:11 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/filterComposer.js » ('j') | lib/filterComposer.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: composer.postload.js
===================================================================
--- a/composer.postload.js
+++ b/composer.postload.js
@@ -388,26 +388,20 @@ function elementPicked(event)
let element = currentElement.prisoner || currentElement;
getFiltersForElement(element, (filters, selectors) =>
{
if (currentlyPickingElement)
stopPickingElement();
browser.runtime.sendMessage({
- type: "composer.openDialog"
- },
- popupId =>
+ type: "composer.openDialog",
+ filters
+ }, popupId =>
{
- browser.runtime.sendMessage({
- type: "forward",
- targetPageId: popupId,
- payload: {type: "composer.dialog.init", filters}
- });
-
// Only the top frame keeps a record of the popup window's ID,
// so if this isn't the top frame we need to pass the ID on.
if (window == window.top)
{
blockelementPopupId = popupId;
}
else
{
« no previous file with comments | « no previous file | lib/filterComposer.js » ('j') | lib/filterComposer.js » ('J')

Powered by Google App Engine
This is Rietveld