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

Side by Side Diff: include.postload.js

Issue 5896265296510976: Issue 1609 - Handle the case of no selectors in "Block Element" (Closed)
Patch Set: Created Nov. 26, 2014, 9:49 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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 { 450 {
451 var style = elt.getAttribute("style"); 451 var style = elt.getAttribute("style");
452 if (style) 452 if (style)
453 addSelector(escapeCSS(elt.localName) + '[style=' + quote(style) + ']'); 453 addSelector(escapeCSS(elt.localName) + '[style=' + quote(style) + ']');
454 } 454 }
455 455
456 // Show popup 456 // Show popup
457 clickHide_showDialog(e.clientX, e.clientY, clickHideFilters); 457 clickHide_showDialog(e.clientX, e.clientY, clickHideFilters);
458 458
459 // Highlight the elements specified by selector in yellow 459 // Highlight the elements specified by selector in yellow
460 highlightElements(selectorList.join(",")); 460 if (selectorList.length > 0)
461 highlightElements(selectorList.join(","));
461 // Now, actually highlight the element the user clicked on in red 462 // Now, actually highlight the element the user clicked on in red
462 highlightElement(currentElement, "#fd1708", "#f6a1b5"); 463 highlightElement(currentElement, "#fd1708", "#f6a1b5");
463 464
464 // Make sure the browser doesn't handle this click 465 // Make sure the browser doesn't handle this click
465 e.preventDefault(); 466 e.preventDefault();
466 e.stopPropagation(); 467 e.stopPropagation();
467 } 468 }
468 469
469 function parseSrcSet(element) 470 function parseSrcSet(element)
470 { 471 {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 break; 712 break;
712 default: 713 default:
713 sendResponse({}); 714 sendResponse({});
714 break; 715 break;
715 } 716 }
716 }); 717 });
717 718
718 if (window == window.top) 719 if (window == window.top)
719 ext.backgroundPage.sendMessage({type: "report-html-page"}); 720 ext.backgroundPage.sendMessage({type: "report-html-page"});
720 } 721 }
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