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-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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
714 case "clickhide-move": | 714 case "clickhide-move": |
715 if (clickHideFiltersDialog) | 715 if (clickHideFiltersDialog) |
716 { | 716 { |
717 clickHideFiltersDialog.style.left = (parseInt(clickHideFiltersDialog.s tyle.left, 10) + msg.x) + "px"; | 717 clickHideFiltersDialog.style.left = (parseInt(clickHideFiltersDialog.s tyle.left, 10) + msg.x) + "px"; |
718 clickHideFiltersDialog.style.top = (parseInt(clickHideFiltersDialog.st yle.top, 10) + msg.y) + "px"; | 718 clickHideFiltersDialog.style.top = (parseInt(clickHideFiltersDialog.st yle.top, 10) + msg.y) + "px"; |
719 } | 719 } |
720 break; | 720 break; |
721 case "clickhide-close": | 721 case "clickhide-close": |
722 if (currentElement && msg.remove) | 722 if (currentElement && msg.remove) |
723 { | 723 { |
724 // Explicitly get rid of currentElement | 724 checkCollapse(currentElement.prisoner || currentElement); |
kzar
2015/03/04 13:09:03
IMHO there should be a comment here to mention we'
| |
725 var element = currentElement.prisoner || currentElement; | 725 |
726 if (element && element.parentNode) | 726 var selectors = msg.selectors; |
kzar
2015/03/04 11:04:02
Shouldn't we check msg.remove is true first?
Sebastian Noack
2015/03/04 11:34:52
Well, we do above. ;)
kzar
2015/03/04 13:09:03
Gah, sorry!
kzar
2015/03/04 13:09:03
I think there should also be a comment here to say
Sebastian Noack
2015/03/04 14:02:01
I don't think it needs to be that verbose. But the
kzar
2015/03/04 14:04:14
Looks great.
| |
727 element.parentNode.removeChild(element); | 727 if (selectors.length > 0) |
728 hideElements(selectors); | |
728 } | 729 } |
729 clickHide_deactivate(); | 730 clickHide_deactivate(); |
730 break; | 731 break; |
731 case "clickhide-show-dialog": | 732 case "clickhide-show-dialog": |
732 if (window.self == window.top) | 733 if (window.self == window.top) |
733 clickHide_showDialog(msg.screenX + window.pageXOffset, | 734 clickHide_showDialog(msg.screenX + window.pageXOffset, |
734 msg.screenY + window.pageYOffset, | 735 msg.screenY + window.pageYOffset, |
735 msg.clickHideFilters); | 736 msg.clickHideFilters); |
736 break; | 737 break; |
737 case "clickhide-clear-last-right-click-event": | 738 case "clickhide-clear-last-right-click-event": |
738 if (lastRightClickEventValid) | 739 if (lastRightClickEventValid) |
739 lastRightClickEventValid = false; | 740 lastRightClickEventValid = false; |
740 else | 741 else |
741 lastRightClickEvent = null; | 742 lastRightClickEvent = null; |
742 break; | 743 break; |
743 } | 744 } |
744 }); | 745 }); |
745 | 746 |
746 if (window == window.top) | 747 if (window == window.top) |
747 ext.backgroundPage.sendMessage({type: "report-html-page"}); | 748 ext.backgroundPage.sendMessage({type: "report-html-page"}); |
748 } | 749 } |
OLD | NEW |