Left: | ||
Right: |
OLD | NEW |
---|---|
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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
501 let subscription = { | 501 let subscription = { |
502 disabled: true, | 502 disabled: true, |
503 downloadStatus: null, | 503 downloadStatus: null, |
504 homepage: null, | 504 homepage: null, |
505 specialization: element.getAttribute("specialization"), | 505 specialization: element.getAttribute("specialization"), |
506 originalTitle: element.getAttribute("title"), | 506 originalTitle: element.getAttribute("title"), |
507 recommended: type, | 507 recommended: type, |
508 url: element.getAttribute("url") | 508 url: element.getAttribute("url") |
509 }; | 509 }; |
510 | 510 |
511 let prefix = element.getAttribute("prefixes"); | 511 if (subscription.recommended != "ads") |
ire
2017/10/25 09:12:52
NIT/Suggestion: I think just checking that the typ
saroyanm
2017/10/25 13:42:32
Thanks for bringing this up, yes and no: Currently
saroyanm
2017/10/25 13:55:18
Here is also the relevant discussion where we deci
ire
2017/10/26 09:22:34
Thanks very much for the explanation. I understand
| |
512 if (prefix) | |
513 { | |
514 prefix = prefix.replace(/\W/g, "_"); | |
515 subscription.title = getMessage("options_language_" + prefix); | |
516 } | |
517 else | |
518 { | 512 { |
519 type = type.replace(/\W/g, "_"); | 513 type = type.replace(/\W/g, "_"); |
520 subscription.title = getMessage("common_feature_" + | 514 subscription.title = getMessage("common_feature_" + |
521 type + "_title"); | 515 type + "_title"); |
522 } | 516 } |
523 | 517 |
524 addSubscription(subscription); | 518 addSubscription(subscription); |
525 } | 519 } |
526 }); | 520 }); |
527 } | 521 } |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1425 }); | 1419 }); |
1426 browser.runtime.sendMessage({ | 1420 browser.runtime.sendMessage({ |
1427 type: "subscriptions.listen", | 1421 type: "subscriptions.listen", |
1428 filter: ["added", "disabled", "homepage", "lastDownload", "removed", | 1422 filter: ["added", "disabled", "homepage", "lastDownload", "removed", |
1429 "title", "downloadStatus", "downloading"] | 1423 "title", "downloadStatus", "downloading"] |
1430 }); | 1424 }); |
1431 | 1425 |
1432 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 1426 window.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
1433 window.addEventListener("hashchange", onHashChange, false); | 1427 window.addEventListener("hashchange", onHashChange, false); |
1434 } | 1428 } |
OLD | NEW |