OLD | NEW |
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 } | 476 } |
477 } | 477 } |
478 prepareNotificationIconAndPopup(); | 478 prepareNotificationIconAndPopup(); |
479 } | 479 } |
480 | 480 |
481 ext.onMessage.addListener(function (msg, sender, sendResponse) | 481 ext.onMessage.addListener(function (msg, sender, sendResponse) |
482 { | 482 { |
483 switch (msg.type) | 483 switch (msg.type) |
484 { | 484 { |
485 case "get-selectors": | 485 case "get-selectors": |
486 var selectors = null; | 486 var selectors = []; |
487 | 487 |
488 if (!isFrameWhitelisted(sender.page, sender.frame, "DOCUMENT") && | 488 if (!isFrameWhitelisted(sender.page, sender.frame, "DOCUMENT") && |
489 !isFrameWhitelisted(sender.page, sender.frame, "ELEMHIDE")) | 489 !isFrameWhitelisted(sender.page, sender.frame, "ELEMHIDE")) |
490 { | 490 { |
491 var noStyleRules = false; | 491 var noStyleRules = false; |
492 var host = extractHostFromURL(sender.frame.url); | 492 var host = extractHostFromURL(sender.frame.url); |
493 for (var i = 0; i < noStyleRulesHosts.length; i++) | 493 for (var i = 0; i < noStyleRulesHosts.length; i++) |
494 { | 494 { |
495 var noStyleHost = noStyleRulesHosts[i]; | 495 var noStyleHost = noStyleRulesHosts[i]; |
496 if (host == noStyleHost || (host.length > noStyleHost.length && | 496 if (host == noStyleHost || (host.length > noStyleHost.length && |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 page.sendMessage({type: "clickhide-deactivate"}); | 578 page.sendMessage({type: "clickhide-deactivate"}); |
579 refreshIconAndContextMenu(page); | 579 refreshIconAndContextMenu(page); |
580 }); | 580 }); |
581 | 581 |
582 setTimeout(function() | 582 setTimeout(function() |
583 { | 583 { |
584 var notificationToShow = Notification.getNextToShow(); | 584 var notificationToShow = Notification.getNextToShow(); |
585 if (notificationToShow) | 585 if (notificationToShow) |
586 showNotification(notificationToShow); | 586 showNotification(notificationToShow); |
587 }, 3 * 60 * 1000); | 587 }, 3 * 60 * 1000); |
OLD | NEW |