| 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-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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 256         page: sender.page, | 256         page: sender.page, | 
| 257         frame: sender.frame | 257         frame: sender.frame | 
| 258       })); | 258       })); | 
| 259       break; | 259       break; | 
| 260     case "trace-elemhide": | 260     case "trace-elemhide": | 
| 261       devtools.logHiddenElements( | 261       devtools.logHiddenElements( | 
| 262         sender.page, msg.selectors, | 262         sender.page, msg.selectors, | 
| 263         extractHostFromFrame(sender.frame) | 263         extractHostFromFrame(sender.frame) | 
| 264       ); | 264       ); | 
| 265       break; | 265       break; | 
|  | 266     case "has-devtools-panel": | 
|  | 267       sendResponse(Prefs.show_devtools_panel); | 
|  | 268       break; | 
| 266     case "forward": | 269     case "forward": | 
| 267       var targetPage; | 270       var targetPage; | 
| 268       if (msg.targetPageId) | 271       if (msg.targetPageId) | 
| 269         targetPage = ext.getPage(msg.targetPageId); | 272         targetPage = ext.getPage(msg.targetPageId); | 
| 270       else | 273       else | 
| 271         targetPage = sender.page; | 274         targetPage = sender.page; | 
| 272 | 275 | 
| 273       if (targetPage) | 276       if (targetPage) | 
| 274       { | 277       { | 
| 275         msg.payload.sender = sender.page.id; | 278         msg.payload.sender = sender.page.id; | 
| 276         if (msg.expectsResponse) | 279         if (msg.expectsResponse) | 
| 277         { | 280         { | 
| 278           targetPage.sendMessage(msg.payload, sendResponse); | 281           targetPage.sendMessage(msg.payload, sendResponse); | 
| 279           return true; | 282           return true; | 
| 280         } | 283         } | 
| 281 | 284 | 
| 282         targetPage.sendMessage(msg.payload); | 285         targetPage.sendMessage(msg.payload); | 
| 283       } | 286       } | 
| 284       break; | 287       break; | 
| 285   } | 288   } | 
| 286 }); | 289 }); | 
| 287 | 290 | 
| 288 // update icon when page changes location | 291 // update icon when page changes location | 
| 289 ext.pages.onLoading.addListener(function(page) | 292 ext.pages.onLoading.addListener(function(page) | 
| 290 { | 293 { | 
| 291   page.sendMessage({type: "blockelement-finished"}); | 294   page.sendMessage({type: "blockelement-finished"}); | 
| 292   refreshIconAndContextMenu(page); | 295   refreshIconAndContextMenu(page); | 
| 293   showNextNotificationForUrl(page.url); | 296   showNextNotificationForUrl(page.url); | 
| 294 }); | 297 }); | 
| OLD | NEW | 
|---|