| LEFT | RIGHT | 
|    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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  183       if (filter.collapse != null) |  183       if (filter.collapse != null) | 
|  184         return filter.collapse; |  184         return filter.collapse; | 
|  185  |  185  | 
|  186       blocked = true; |  186       blocked = true; | 
|  187     } |  187     } | 
|  188   } |  188   } | 
|  189  |  189  | 
|  190   return blocked && Prefs.hidePlaceholders; |  190   return blocked && Prefs.hidePlaceholders; | 
|  191 }); |  191 }); | 
|  192  |  192  | 
|  193 port.on("get-domain-enabled-state", function(msg, sender) |  | 
|  194 { |  | 
|  195   return {enabled: !checkWhitelisted(sender.page)}; |  | 
|  196 }); |  | 
|  197  |  | 
|  198 port.on("forward", function(msg, sender) |  193 port.on("forward", function(msg, sender) | 
|  199 { |  194 { | 
|  200   var targetPage; |  195   var targetPage; | 
|  201   if (msg.targetPageId) |  196   if (msg.targetPageId) | 
|  202     targetPage = ext.getPage(msg.targetPageId); |  197     targetPage = ext.getPage(msg.targetPageId); | 
|  203   else |  198   else | 
|  204     targetPage = sender.page; |  199     targetPage = sender.page; | 
|  205  |  200  | 
|  206   if (targetPage) |  201   if (targetPage) | 
|  207   { |  202   { | 
|  208     msg.payload.sender = sender.page.id; |  203     msg.payload.sender = sender.page.id; | 
|  209     if (msg.expectsResponse) |  204     if (msg.expectsResponse) | 
|  210       return new Promise(targetPage.sendMessage.bind(targetPage, msg.payload)); |  205       return new Promise(targetPage.sendMessage.bind(targetPage, msg.payload)); | 
|  211     targetPage.sendMessage(msg.payload); |  206     targetPage.sendMessage(msg.payload); | 
|  212   } |  207   } | 
|  213 }); |  208 }); | 
|  214  |  209  | 
|  215 // update icon when page changes location |  210 // update icon when page changes location | 
|  216 ext.pages.onLoading.addListener(function(page) |  211 ext.pages.onLoading.addListener(function(page) | 
|  217 { |  212 { | 
|  218   page.sendMessage({type: "composer.content.finished"}); |  213   page.sendMessage({type: "composer.content.finished"}); | 
|  219   refreshIconAndContextMenu(page); |  214   refreshIconAndContextMenu(page); | 
|  220   showNextNotificationForUrl(page.url); |  215   showNextNotificationForUrl(page.url); | 
|  221 }); |  216 }); | 
| LEFT | RIGHT |