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

Side by Side Diff: include.postload.js

Issue 4767690782670848: Issue 2466 - Disable element selection in all frames when showing "Block element" dialog (Closed)
Patch Set: Created May 7, 2015, 3:34 p.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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 // elt.parentNode.appendChild(overlay, elt); 259 // elt.parentNode.appendChild(overlay, elt);
260 document.documentElement.appendChild(overlay); 260 document.documentElement.appendChild(overlay);
261 return overlay; 261 return overlay;
262 } 262 }
263 263
264 // Show dialog asking user whether she wants to add the proposed filters derived 264 // Show dialog asking user whether she wants to add the proposed filters derived
265 // from selected page element 265 // from selected page element
266 function clickHide_showDialog(filters) 266 function clickHide_showDialog(filters)
267 { 267 {
268 // If we are already selecting, abort now
269 if (clickHide_activated)
270 clickHide_rulesPending();
271
272 clickHide_filters = filters; 268 clickHide_filters = filters;
273 269
274 clickHideFiltersDialog = document.createElement("iframe"); 270 clickHideFiltersDialog = document.createElement("iframe");
275 clickHideFiltersDialog.src = ext.getURL("block.html"); 271 clickHideFiltersDialog.src = ext.getURL("block.html");
276 clickHideFiltersDialog.setAttribute("style", "position: fixed !important; visi bility: hidden; display: block !important; border: 0px !important;"); 272 clickHideFiltersDialog.setAttribute("style", "position: fixed !important; visi bility: hidden; display: block !important; border: 0px !important;");
277 clickHideFiltersDialog.style.WebkitBoxShadow = "5px 5px 20px rgba(0,0,0,0.5)"; 273 clickHideFiltersDialog.style.WebkitBoxShadow = "5px 5px 20px rgba(0,0,0,0.5)";
278 clickHideFiltersDialog.style.zIndex = 0x7FFFFFFF; 274 clickHideFiltersDialog.style.zIndex = 0x7FFFFFFF;
279 275
280 // Position in upper-left all the time 276 // Position in upper-left all the time
281 clickHideFiltersDialog.style.left = "50px"; 277 clickHideFiltersDialog.style.left = "50px";
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 // e.g. if an added blocking filter matches other elements, 731 // e.g. if an added blocking filter matches other elements,
736 // the effect won't be visible until the page is is reloaded. 732 // the effect won't be visible until the page is is reloaded.
737 checkCollapse(currentElement.prisoner || currentElement); 733 checkCollapse(currentElement.prisoner || currentElement);
738 734
739 // Apply added element hiding filters. 735 // Apply added element hiding filters.
740 updateStylesheet(); 736 updateStylesheet();
741 } 737 }
742 clickHide_deactivate(); 738 clickHide_deactivate();
743 break; 739 break;
744 case "clickhide-show-dialog": 740 case "clickhide-show-dialog":
741 clickHide_rulesPending();
745 if (window.self == window.top) 742 if (window.self == window.top)
746 clickHide_showDialog(msg.clickHideFilters); 743 clickHide_showDialog(msg.clickHideFilters);
747 break; 744 break;
748 case "clickhide-clear-last-right-click-event": 745 case "clickhide-clear-last-right-click-event":
749 if (lastRightClickEventValid) 746 if (lastRightClickEventValid)
750 lastRightClickEventValid = false; 747 lastRightClickEventValid = false;
751 else 748 else
752 lastRightClickEvent = null; 749 lastRightClickEvent = null;
753 break; 750 break;
754 } 751 }
755 }); 752 });
756 753
757 if (window == window.top) 754 if (window == window.top)
758 ext.backgroundPage.sendMessage({type: "report-html-page"}); 755 ext.backgroundPage.sendMessage({type: "report-html-page"});
759 } 756 }
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