Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: ext/background.js

Issue 29527874: Noissue - Remove check for incognito, since it is irrelevant for Edge (Closed)
Patch Set: Created Aug. 25, 2017, 10:36 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 // nor does Firefox for Android, 735 // nor does Firefox for Android,
736 // and so this workaround needs to stay for now. 736 // and so this workaround needs to stay for now.
737 // We are not using extension.getURL to get the absolute path here 737 // We are not using extension.getURL to get the absolute path here
738 // because of the Edge issue: 738 // because of the Edge issue:
739 // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10 276332/ 739 // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10 276332/
740 let open = win => 740 let open = win =>
741 { 741 {
742 let optionsUrl = "options.html"; 742 let optionsUrl = "options.html";
743 let queryInfo = {url: optionsUrl}; 743 let queryInfo = {url: optionsUrl};
744 744
745 // extension pages can't be accessed in incognito windows. In order to 745 if (win)
746 // correctly mimic the way in which Chrome opens extension options,
747 // we have to focus the options page in any other window.
748 if (win && !win.incognito)
Oleksandr 2017/08/25 22:43:25 Edge actually has win.inPrivate instead of win.inc
749 queryInfo.windowId = win.id; 746 queryInfo.windowId = win.id;
750 747
751 chrome.tabs.query(queryInfo, tabs => 748 chrome.tabs.query(queryInfo, tabs =>
752 { 749 {
753 if (tabs && tabs.length > 0) 750 if (tabs && tabs.length > 0)
754 { 751 {
755 let tab = tabs[0]; 752 let tab = tabs[0];
756 753
757 if ("windows" in chrome) 754 if ("windows" in chrome)
758 chrome.windows.update(tab.windowId, {focused: true}); 755 chrome.windows.update(tab.windowId, {focused: true});
(...skipping 28 matching lines...) Expand all
787 ext.windows = { 784 ext.windows = {
788 create(createData, callback) 785 create(createData, callback)
789 { 786 {
790 chrome.windows.create(createData, createdWindow => 787 chrome.windows.create(createData, createdWindow =>
791 { 788 {
792 afterTabLoaded(callback)(createdWindow.tabs[0]); 789 afterTabLoaded(callback)(createdWindow.tabs[0]);
793 }); 790 });
794 } 791 }
795 }; 792 };
796 }()); 793 }());
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld