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

Side by Side Diff: composer.postload.js

Issue 29350213: Issue 4364 - Drop support for Chrome 29-40 and remove legacy code (Closed)
Patch Set: Got rid of init(), refactored element hiding code into a class Created Aug. 25, 2016, 3:10 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 | « chrome/ext/background.js ('k') | include.preload.js » ('j') | 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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 if (currentElement && msg.remove) 546 if (currentElement && msg.remove)
547 { 547 {
548 // Hide the selected element itself if an added blocking 548 // Hide the selected element itself if an added blocking
549 // filter is causing it to collapse. Note that this 549 // filter is causing it to collapse. Note that this
550 // behavior is incomplete, but the best we can do here, 550 // behavior is incomplete, but the best we can do here,
551 // e.g. if an added blocking filter matches other elements, 551 // e.g. if an added blocking filter matches other elements,
552 // the effect won't be visible until the page is is reloaded. 552 // the effect won't be visible until the page is is reloaded.
553 checkCollapse(currentElement.prisoner || currentElement); 553 checkCollapse(currentElement.prisoner || currentElement);
554 554
555 // Apply added element hiding filters. 555 // Apply added element hiding filters.
556 updateStylesheet(); 556 elemhide.apply();
557 } 557 }
558 deactivateBlockElement(); 558 deactivateBlockElement();
559 break; 559 break;
560 case "composer.content.clearPreviousRightClickEvent": 560 case "composer.content.clearPreviousRightClickEvent":
561 if (!lastRightClickEventIsMostRecent) 561 if (!lastRightClickEventIsMostRecent)
562 lastRightClickEvent = null; 562 lastRightClickEvent = null;
563 lastRightClickEventIsMostRecent = false; 563 lastRightClickEventIsMostRecent = false;
564 break; 564 break;
565 case "composer.content.dialogOpened": 565 case "composer.content.dialogOpened":
566 if (window == window.top) 566 if (window == window.top)
(...skipping 13 matching lines...) Expand all
580 } 580 }
581 }); 581 });
582 } 582 }
583 break; 583 break;
584 } 584 }
585 }); 585 });
586 586
587 if (window == window.top) 587 if (window == window.top)
588 ext.backgroundPage.sendMessage({type: "composer.ready"}); 588 ext.backgroundPage.sendMessage({type: "composer.ready"});
589 } 589 }
OLDNEW
« no previous file with comments | « chrome/ext/background.js ('k') | include.preload.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld