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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
543 if(msg.filter === url) | 543 if(msg.filter === url) |
544 { | 544 { |
545 // This request would have come from the chrome.contextMenu handler, s o we | 545 // This request would have come from the chrome.contextMenu handler, s o we |
546 // simulate the user having chosen the element to get rid of via the u sual means. | 546 // simulate the user having chosen the element to get rid of via the u sual means. |
547 clickHide_activated = true; | 547 clickHide_activated = true; |
548 // FIXME: clickHideFilters is erased in clickHide_mouseClick anyway, s o why set it? | 548 // FIXME: clickHideFilters is erased in clickHide_mouseClick anyway, s o why set it? |
549 clickHideFilters = [msg.filter]; | 549 clickHideFilters = [msg.filter]; |
550 // Coerce red highlighted overlay on top of element to remove. | 550 // Coerce red highlighted overlay on top of element to remove. |
551 // TODO: Wow, the design of the clickHide stuff is really dumb - gotta fix it sometime | 551 // TODO: Wow, the design of the clickHide stuff is really dumb - gotta fix it sometime |
552 currentElement = addElementOverlay(target); | 552 currentElement = addElementOverlay(target); |
553 currentElement_backgroundColor = currentElement.style.backgroundColor; | 553 currentElement_backgroundColor = target.style.backgroundColor; |
Wladimir Palant
2013/12/18 12:19:25
From the look of it, this won't work correctly. Yo
Thomas Greiner
2013/12/18 12:24:02
Done, you are right. We should change the variable
| |
554 // clickHide_mouseOver(lastRightClickEvent); | 554 // clickHide_mouseOver(lastRightClickEvent); |
555 clickHide_mouseClick(lastRightClickEvent); | 555 clickHide_mouseClick(lastRightClickEvent); |
556 } | 556 } |
557 else | 557 else |
558 console.log("clickhide-new-filter: URLs don't match. Couldn't find tha t element.", request.filter, url, lastRightClickEvent.target.src); | 558 console.log("clickhide-new-filter: URLs don't match. Couldn't find tha t element.", request.filter, url, lastRightClickEvent.target.src); |
559 break; | 559 break; |
560 case "clickhide-init": | 560 case "clickhide-init": |
561 if (clickHideFiltersDialog) | 561 if (clickHideFiltersDialog) |
562 { | 562 { |
563 sendResponse({filters: clickHide_filters}); | 563 sendResponse({filters: clickHide_filters}); |
(...skipping 19 matching lines...) Expand all Loading... | |
583 | 583 |
584 clickHide_deactivate(); | 584 clickHide_deactivate(); |
585 } | 585 } |
586 break; | 586 break; |
587 default: | 587 default: |
588 sendResponse({}); | 588 sendResponse({}); |
589 break; | 589 break; |
590 } | 590 } |
591 }); | 591 }); |
592 } | 592 } |
LEFT | RIGHT |