Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: include.postload.js

Issue 6194342989398016: Issue 2298 - Fixed: "Block element" from context menu doesn't reset previous state (Closed)
Patch Set: Cleanup lastRightClickEvent Created April 10, 2015, 11:32 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 break; 690 break;
691 case "clickhide-activate": 691 case "clickhide-activate":
692 clickHide_activate(); 692 clickHide_activate();
693 break; 693 break;
694 case "clickhide-deactivate": 694 case "clickhide-deactivate":
695 clickHide_deactivate(); 695 clickHide_deactivate();
696 break; 696 break;
697 case "clickhide-new-filter": 697 case "clickhide-new-filter":
698 if(lastRightClickEvent) 698 if(lastRightClickEvent)
699 { 699 {
700 getBlockableElementOrAncestor(lastRightClickEvent.target, function(ele ment) 700 var event = lastRightClickEvent;
701 getBlockableElementOrAncestor(event.target, function(element)
701 { 702 {
702 clickHide_activated = true; 703 clickHide_activate();
703 currentElement = element; 704 currentElement = element;
704 clickHide_mouseClick(lastRightClickEvent); 705 clickHide_mouseClick(event);
705 }); 706 });
706 } 707 }
707 break; 708 break;
708 case "clickhide-init": 709 case "clickhide-init":
709 if (clickHideFiltersDialog) 710 if (clickHideFiltersDialog)
710 { 711 {
711 sendResponse({filters: clickHide_filters}); 712 sendResponse({filters: clickHide_filters});
712 713
713 clickHideFiltersDialog.style.width = msg.width + "px"; 714 clickHideFiltersDialog.style.width = msg.width + "px";
714 clickHideFiltersDialog.style.height = msg.height + "px"; 715 clickHideFiltersDialog.style.height = msg.height + "px";
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 lastRightClickEventValid = false; 751 lastRightClickEventValid = false;
751 else 752 else
752 lastRightClickEvent = null; 753 lastRightClickEvent = null;
753 break; 754 break;
754 } 755 }
755 }); 756 });
756 757
757 if (window == window.top) 758 if (window == window.top)
758 ext.backgroundPage.sendMessage({type: "report-html-page"}); 759 ext.backgroundPage.sendMessage({type: "report-html-page"});
759 } 760 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld