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

Delta Between Two Patch Sets: firstRun.js

Issue 29339099: Noissue - Rename message type when propagating events to the content script (Closed)
Left Patch Set: Created March 29, 2016, 10:59 a.m.
Right Patch Set: Rename *.event to *.respond Created March 29, 2016, 11:11 a.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 | messageResponder.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 E("legacySafariWarning").removeAttribute("hidden"); 91 E("legacySafariWarning").removeAttribute("hidden");
92 }); 92 });
93 93
94 // Set up feature buttons linked to subscriptions 94 // Set up feature buttons linked to subscriptions
95 featureSubscriptions.forEach(initToggleSubscriptionButton); 95 featureSubscriptions.forEach(initToggleSubscriptionButton);
96 updateToggleButtons(); 96 updateToggleButtons();
97 updateSocialLinks(); 97 updateSocialLinks();
98 98
99 ext.onMessage.addListener(function(message) 99 ext.onMessage.addListener(function(message)
100 { 100 {
101 if (message.type == "subscriptions.event") 101 if (message.type == "subscriptions.respond")
102 { 102 {
103 updateToggleButtons(); 103 updateToggleButtons();
104 updateSocialLinks(); 104 updateSocialLinks();
105 } 105 }
106 }); 106 });
107 ext.backgroundPage.sendMessage({ 107 ext.backgroundPage.sendMessage({
108 type: "subscriptions.listen", 108 type: "subscriptions.listen",
109 filter: ["added", "removed", "updated", "disabled"] 109 filter: ["added", "removed", "updated", "disabled"]
110 }); 110 });
111 } 111 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 { 209 {
210 var button = E("toggle-" + feature); 210 var button = E("toggle-" + feature);
211 if (isEnabled) 211 if (isEnabled)
212 button.classList.remove("off"); 212 button.classList.remove("off");
213 else 213 else
214 button.classList.add("off"); 214 button.classList.add("off");
215 } 215 }
216 216
217 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); 217 document.addEventListener("DOMContentLoaded", onDOMLoaded, false);
218 })(); 218 })();
LEFTRIGHT

Powered by Google App Engine
This is Rietveld