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

Side by Side Diff: ext/content.js

Issue 29403564: Issue 5083 - Merges chrome subdirectory to top level directory (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome
Patch Set: Created April 10, 2017, 6:52 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ext/common.js ('k') | ext/devtools.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 "use strict";
2
3 chrome.runtime.onMessage.addListener((message, sender, sendResponse) =>
4 {
5 return ext.onMessage._dispatch(message, {}, sendResponse).indexOf(true) != -1;
6 });
7
8 (function()
9 {
10 let port = null;
11
12 ext.onExtensionUnloaded = {
13 addListener(listener)
14 {
15 if (!port)
16 port = chrome.runtime.connect();
17
18 // When the extension is reloaded, disabled or uninstalled the
19 // background page dies and automatically disconnects all ports
20 port.onDisconnect.addListener(listener);
21 },
22 removeListener(listener)
23 {
24 if (port)
25 {
26 port.onDisconnect.removeListener(listener);
27
28 if (!port.onDisconnect.hasListeners())
29 {
30 port.disconnect();
31 port = null;
32 }
33 }
34 }
35 };
36 }());
OLDNEW
« no previous file with comments | « ext/common.js ('k') | ext/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld