| 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-2017 eyeo GmbH | 3  * Copyright (C) 2006-2017 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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 601   chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) => | 601   chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) => | 
| 602   { | 602   { | 
| 603     let sender = {}; | 603     let sender = {}; | 
| 604 | 604 | 
| 605     // Add "page" and "frame" if the message was sent by a content script. | 605     // Add "page" and "frame" if the message was sent by a content script. | 
| 606     // If sent by popup or the background page itself, there is no "tab". | 606     // If sent by popup or the background page itself, there is no "tab". | 
| 607     if ("tab" in rawSender) | 607     if ("tab" in rawSender) | 
| 608     { | 608     { | 
| 609       sender.page = new Page(rawSender.tab); | 609       sender.page = new Page(rawSender.tab); | 
| 610       sender.frame = { | 610       sender.frame = { | 
|  | 611         id: rawSender.frameId, | 
| 611         url: new URL(rawSender.url), | 612         url: new URL(rawSender.url), | 
| 612         get parent() | 613         get parent() | 
| 613         { | 614         { | 
| 614           let frames = framesOfTabs[rawSender.tab.id]; | 615           let frames = framesOfTabs[rawSender.tab.id]; | 
| 615 | 616 | 
| 616           if (!frames) | 617           if (!frames) | 
| 617             return null; | 618             return null; | 
| 618 | 619 | 
| 619           let frame = frames[rawSender.frameId]; | 620           let frame = frames[rawSender.frameId]; | 
| 620           if (frame) | 621           if (frame) | 
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 724   ext.windows = { | 725   ext.windows = { | 
| 725     create(createData, callback) | 726     create(createData, callback) | 
| 726     { | 727     { | 
| 727       chrome.windows.create(createData, createdWindow => | 728       chrome.windows.create(createData, createdWindow => | 
| 728       { | 729       { | 
| 729         afterTabLoaded(callback)(createdWindow.tabs[0]); | 730         afterTabLoaded(callback)(createdWindow.tabs[0]); | 
| 730       }); | 731       }); | 
| 731     } | 732     } | 
| 732   }; | 733   }; | 
| 733 }()); | 734 }()); | 
| OLD | NEW | 
|---|