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-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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
699 | 699 |
700 ext.showOptions = callback => | 700 ext.showOptions = callback => |
701 { | 701 { |
702 let info = require("info"); | 702 let info = require("info"); |
703 | 703 |
704 if ("openOptionsPage" in chrome.runtime && | 704 if ("openOptionsPage" in chrome.runtime && |
705 // Some versions of Firefox for Android before version 57 do have a | 705 // Some versions of Firefox for Android before version 57 do have a |
706 // runtime.openOptionsPage but it doesn't do anything. | 706 // runtime.openOptionsPage but it doesn't do anything. |
707 // https://bugzilla.mozilla.org/show_bug.cgi?id=1364945 | 707 // https://bugzilla.mozilla.org/show_bug.cgi?id=1364945 |
708 (info.application != "fennec" || | 708 (info.application != "fennec" || |
709 (parseInt(info.applicationVersion, 10) >= 57 && | 709 parseInt(info.applicationVersion, 10) >= 57)) |
710 info.applicationVersion != "57.0a1"))) | |
Wladimir Palant
2017/08/25 09:56:46
It should be sufficient to check that it's Firefox
Manish Jethani
2017/08/25 11:02:31
Done.
| |
711 { | 710 { |
712 if (!callback) | 711 if (!callback) |
713 { | 712 { |
714 chrome.runtime.openOptionsPage(); | 713 chrome.runtime.openOptionsPage(); |
715 } | 714 } |
716 else | 715 else |
717 { | 716 { |
718 chrome.runtime.openOptionsPage(() => | 717 chrome.runtime.openOptionsPage(() => |
719 { | 718 { |
720 if (chrome.runtime.lastError) | 719 if (chrome.runtime.lastError) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
791 ext.windows = { | 790 ext.windows = { |
792 create(createData, callback) | 791 create(createData, callback) |
793 { | 792 { |
794 chrome.windows.create(createData, createdWindow => | 793 chrome.windows.create(createData, createdWindow => |
795 { | 794 { |
796 afterTabLoaded(callback)(createdWindow.tabs[0]); | 795 afterTabLoaded(callback)(createdWindow.tabs[0]); |
797 }); | 796 }); |
798 } | 797 } |
799 }; | 798 }; |
800 }()); | 799 }()); |
LEFT | RIGHT |