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

Delta Between Two Patch Sets: js/desktop-options.js

Issue 29736629: Issue 6532 - Removes required subscription title input field (Closed) Base URL: https://hg.adblockplus.org/adblockplusui
Left Patch Set: Address PS1 comments Created April 3, 2018, 9:47 p.m.
Right Patch Set: Address PS2 comments Created April 9, 2018, 8:46 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 | « desktop-options.html ('k') | locale/en_US/desktop-options.json » ('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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 sendMessageHandleErrors({ 1221 sendMessageHandleErrors({
1222 type: "filters.add", 1222 type: "filters.add",
1223 text: "@@||" + host.toLowerCase() + "^$document" 1223 text: "@@||" + host.toLowerCase() + "^$document"
1224 }); 1224 });
1225 } 1225 }
1226 1226
1227 domain.value = ""; 1227 domain.value = "";
1228 E("whitelisting-add-button").disabled = true; 1228 E("whitelisting-add-button").disabled = true;
1229 } 1229 }
1230 1230
1231 function addEnableSubscription(url, homepage) 1231 function addEnableSubscription(url, title, homepage)
1232 { 1232 {
1233 let messageType = null; 1233 let messageType = null;
1234 let knownSubscription = subscriptionsMap[url]; 1234 let knownSubscription = subscriptionsMap[url];
1235 if (knownSubscription && knownSubscription.disabled == true) 1235 if (knownSubscription && knownSubscription.disabled == true)
1236 messageType = "subscriptions.toggle"; 1236 messageType = "subscriptions.toggle";
1237 else 1237 else
1238 messageType = "subscriptions.add"; 1238 messageType = "subscriptions.add";
1239 1239
1240 let message = { 1240 let message = {
1241 type: messageType, 1241 type: messageType,
1242 url 1242 url
1243 }; 1243 };
1244 if (title)
1245 message.title = title;
1244 if (homepage) 1246 if (homepage)
1245 message.homepage = homepage; 1247 message.homepage = homepage;
1246 1248
1247 browser.runtime.sendMessage(message); 1249 browser.runtime.sendMessage(message);
1248 } 1250 }
1249 1251
1250 function onFilterMessage(action, filter) 1252 function onFilterMessage(action, filter)
1251 { 1253 {
1252 switch (action) 1254 switch (action)
1253 { 1255 {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 "ui_warn_tracking"] 1499 "ui_warn_tracking"]
1498 }); 1500 });
1499 port.postMessage({ 1501 port.postMessage({
1500 type: "subscriptions.listen", 1502 type: "subscriptions.listen",
1501 filter: ["added", "disabled", "homepage", "lastDownload", "removed", 1503 filter: ["added", "disabled", "homepage", "lastDownload", "removed",
1502 "title", "downloadStatus", "downloading"] 1504 "title", "downloadStatus", "downloading"]
1503 }); 1505 });
1504 1506
1505 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); 1507 window.addEventListener("DOMContentLoaded", onDOMLoaded, false);
1506 window.addEventListener("hashchange", onHashChange, false); 1508 window.addEventListener("hashchange", onHashChange, false);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld