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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 } | 355 } |
356 | 356 |
357 function clickHide_deactivate() | 357 function clickHide_deactivate() |
358 { | 358 { |
359 clickHide_rulesPending(); | 359 clickHide_rulesPending(); |
360 clickHide_filters = null; | 360 clickHide_filters = null; |
361 | 361 |
362 if (currentElement) | 362 if (currentElement) |
363 { | 363 { |
364 currentElement.removeEventListener("contextmenu", clickHide_elementClickHan
dler, true); | 364 currentElement.removeEventListener("contextmenu", clickHide_elementClickHan
dler, true); |
365 unhighlightElements(); | |
366 unhighlightElement(currentElement); | 365 unhighlightElement(currentElement); |
367 currentElement = null; | 366 currentElement = null; |
368 } | 367 } |
369 unhighlightElements(); | 368 unhighlightElements(); |
370 | 369 |
371 var overlays = document.getElementsByClassName("__adblockplus__overlay"); | 370 var overlays = document.getElementsByClassName("__adblockplus__overlay"); |
372 while (overlays.length > 0) | 371 while (overlays.length > 0) |
373 overlays[0].parentNode.removeChild(overlays[0]); | 372 overlays[0].parentNode.removeChild(overlays[0]); |
374 | 373 |
375 ext.onExtensionUnloaded.removeListener(clickHide_deactivate); | 374 ext.onExtensionUnloaded.removeListener(clickHide_deactivate); |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 lastRightClickEventValid = false; | 747 lastRightClickEventValid = false; |
749 else | 748 else |
750 lastRightClickEvent = null; | 749 lastRightClickEvent = null; |
751 break; | 750 break; |
752 } | 751 } |
753 }); | 752 }); |
754 | 753 |
755 if (window == window.top) | 754 if (window == window.top) |
756 ext.backgroundPage.sendMessage({type: "report-html-page"}); | 755 ext.backgroundPage.sendMessage({type: "report-html-page"}); |
757 } | 756 } |
OLD | NEW |