| LEFT | RIGHT |
| 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 Loading... |
| 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 Loading... |
| 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 })(); |
| LEFT | RIGHT |