| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 UI.openFiltersDialog(); | 264 UI.openFiltersDialog(); |
| 265 else | 265 else |
| 266 { | 266 { |
| 267 backgroundPage.openOptions(); | 267 backgroundPage.openOptions(); |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 | 270 |
| 271 function updateToggleButton(feature, isEnabled) | 271 function updateToggleButton(feature, isEnabled) |
| 272 { | 272 { |
| 273 var button = E("toggle-" + feature); | 273 var button = E("toggle-" + feature); |
| 274 if (isEnabled && button.classList.contains("off")) | 274 if (isEnabled) |
| 275 button.classList.remove("off"); | 275 button.classList.remove("off"); |
| 276 else if (!isEnabled && !button.classList.contains("off")) | 276 else |
| 277 button.classList.add("off"); | 277 button.classList.add("off"); |
|
Wladimir Palant
2013/07/08 09:37:29
classList.remove() and classList.add() already do
Thomas Greiner
2013/07/08 10:30:19
Done.
| |
| 278 } | 278 } |
| 279 | 279 |
| 280 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); | 280 document.addEventListener("DOMContentLoaded", onDOMLoaded, false); |
| 281 })(); | 281 })(); |
| LEFT | RIGHT |