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

Delta Between Two Patch Sets: ext/content.js

Issue 29531596: Issue 5590 - [webextension] Custom filters in the options page aren't updated (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome
Left Patch Set: Created Aug. 30, 2017, 9:14 a.m.
Right Patch Set: Improved comment Created Aug. 30, 2017, 12:54 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 "use strict"; 1 "use strict";
2 2
3 // Firefox 55 erroneously sends messages from the content script to the 3 // Firefox 55 erroneously sends messages from the content script to the
4 // devtools panel: 4 // devtools panel:
5 // https://bugzilla.mozilla.org/show_bug.cgi?id=1383310 5 // https://bugzilla.mozilla.org/show_bug.cgi?id=1383310
6 // As a workaround, listen for messages only if this isn't the devtools panel. 6 // As a workaround, listen for messages only if this isn't the devtools panel.
7 // Note that Firefox processes API access lazily, so chrome.devtools will always
8 // exist but will have undefined as its value on other pages.
7 if (!chrome.devtools) 9 if (!chrome.devtools)
Manish Jethani 2017/08/30 10:38:44 Maybe add a comment about why chrome.devtools and
Wladimir Palant 2017/08/30 12:54:54 Done.
8 { 10 {
9 // Listen for messages from the background page. 11 // Listen for messages from the background page.
10 chrome.runtime.onMessage.addListener((message, sender, sendResponse) => 12 chrome.runtime.onMessage.addListener((message, sender, sendResponse) =>
11 { 13 {
12 return ext.onMessage._dispatch(message, {}, sendResponse).includes(true); 14 return ext.onMessage._dispatch(message, {}, sendResponse).includes(true);
13 }); 15 });
14 } 16 }
15 17
16 (function() 18 (function()
17 { 19 {
(...skipping 17 matching lines...) Expand all
35 37
36 if (!port.onDisconnect.hasListeners()) 38 if (!port.onDisconnect.hasListeners())
37 { 39 {
38 port.disconnect(); 40 port.disconnect();
39 port = null; 41 port = null;
40 } 42 }
41 } 43 }
42 } 44 }
43 }; 45 };
44 }()); 46 }());
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld