| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 670 { | 670 { |
| 671 chrome.storage.local.remove(key, callback); | 671 chrome.storage.local.remove(key, callback); |
| 672 }, | 672 }, |
| 673 onChanged: chrome.storage.onChanged | 673 onChanged: chrome.storage.onChanged |
| 674 }; | 674 }; |
| 675 | 675 |
| 676 /* Options */ | 676 /* Options */ |
| 677 | 677 |
| 678 ext.showOptions = callback => | 678 ext.showOptions = callback => |
| 679 { | 679 { |
| 680 let {application} = require("info"); | |
|
Sebastian Noack
2017/08/18 17:46:24
The temporary variable is redundant now, you could
Manish Jethani
2017/08/19 03:43:41
Done.
| |
| 681 | |
| 682 if ("openOptionsPage" in chrome.runtime && | 680 if ("openOptionsPage" in chrome.runtime && |
| 683 // Firefox for Android does have a runtime.openOptionsPage but it | 681 // Firefox for Android does have a runtime.openOptionsPage but it |
| 684 // doesn't do anything. | 682 // doesn't do anything. |
| 685 application != "fennec") | 683 // https://bugzilla.mozilla.org/show_bug.cgi?id=1364945 |
| 684 require("info").application != "fennec") | |
| 686 { | 685 { |
| 687 if (!callback) | 686 if (!callback) |
| 688 { | 687 { |
| 689 chrome.runtime.openOptionsPage(); | 688 chrome.runtime.openOptionsPage(); |
| 690 } | 689 } |
| 691 else | 690 else |
| 692 { | 691 { |
| 693 chrome.runtime.openOptionsPage(() => | 692 chrome.runtime.openOptionsPage(() => |
| 694 { | 693 { |
| 695 if (chrome.runtime.lastError) | 694 if (chrome.runtime.lastError) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 752 ext.windows = { | 751 ext.windows = { |
| 753 create(createData, callback) | 752 create(createData, callback) |
| 754 { | 753 { |
| 755 chrome.windows.create(createData, createdWindow => | 754 chrome.windows.create(createData, createdWindow => |
| 756 { | 755 { |
| 757 afterTabLoaded(callback)(createdWindow.tabs[0]); | 756 afterTabLoaded(callback)(createdWindow.tabs[0]); |
| 758 }); | 757 }); |
| 759 } | 758 } |
| 760 }; | 759 }; |
| 761 }()); | 760 }()); |
| LEFT | RIGHT |