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

Side by Side Diff: ext/background.js

Issue 29527877: Issue 5582 - Workaround Edge bug in tabs.query (Closed)
Patch Set: Created Aug. 25, 2017, 10:55 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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 { 733 {
734 // Edge does not yet support runtime.openOptionsPage (tested version 38) 734 // Edge does not yet support runtime.openOptionsPage (tested version 38)
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 = {title: "Adblock Plus Options"};
Oleksandr 2017/08/25 22:59:31 This is somewhat questionable, of course. It is po
Sebastian Noack 2017/08/26 06:41:10 The title indeed doesn't seem to be translated, bu
744 744
745 if (win) 745 if (win)
746 queryInfo.windowId = win.id; 746 queryInfo.windowId = win.id;
747 747
748 chrome.tabs.query(queryInfo, tabs => 748 chrome.tabs.query(queryInfo, tabs =>
749 { 749 {
750 if (tabs && tabs.length > 0) 750 if (tabs && tabs.length > 0)
751 { 751 {
752 let tab = tabs[0]; 752 let tab = tabs[0];
753 753
(...skipping 30 matching lines...) Expand all
784 ext.windows = { 784 ext.windows = {
785 create(createData, callback) 785 create(createData, callback)
786 { 786 {
787 chrome.windows.create(createData, createdWindow => 787 chrome.windows.create(createData, createdWindow =>
788 { 788 {
789 afterTabLoaded(callback)(createdWindow.tabs[0]); 789 afterTabLoaded(callback)(createdWindow.tabs[0]);
790 }); 790 });
791 } 791 }
792 }; 792 };
793 }()); 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