| OLD | NEW |
| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 selectors = ElemHide.getSelectorsForDomain( | 129 selectors = ElemHide.getSelectorsForDomain( |
| 130 hostname, | 130 hostname, |
| 131 specificOnly ? ElemHide.SPECIFIC_ONLY : ElemHide.ALL_MATCHING | 131 specificOnly ? ElemHide.SPECIFIC_ONLY : ElemHide.ALL_MATCHING |
| 132 ); | 132 ); |
| 133 | 133 |
| 134 for (let filter of ElemHideEmulation.getRulesForDomain(hostname)) | 134 for (let filter of ElemHideEmulation.getRulesForDomain(hostname)) |
| 135 emulatedPatterns.push({selector: filter.selector, text: filter.text}); | 135 emulatedPatterns.push({selector: filter.selector, text: filter.text}); |
| 136 } | 136 } |
| 137 | 137 |
| 138 if (!inline) | 138 if (!inline) |
| 139 updateFrameStyles(sender.page.id, sender.frame.id, selectors); | 139 updateFrameStyles(sender.page.id, sender.frame.id, selectors, "standard"); |
| 140 | 140 |
| 141 let response = {trace, inline, emulatedPatterns}; | 141 let response = {trace, inline, emulatedPatterns}; |
| 142 if (trace || inline) | 142 if (trace || inline) |
| 143 response.selectors = selectors; | 143 response.selectors = selectors; |
| 144 | 144 |
| 145 return response; | 145 return response; |
| 146 }); | 146 }); |
| 147 | 147 |
| 148 port.on("elemhide.injectSelectors", (message, sender) => | 148 port.on("elemhide.injectSelectors", (message, sender) => |
| 149 { | 149 { |
| 150 updateFrameStyles(sender.page.id, sender.frame.id, message.selectors, | 150 updateFrameStyles(sender.page.id, sender.frame.id, message.selectors, |
| 151 message.groupName); | 151 message.groupName); |
| 152 }); | 152 }); |
| OLD | NEW |