mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 04:22:26 +01:00
Bump minVersion to the latest ESR of 31.
Remove some version specific code that is no longer applicable. --HG-- extra : amend_source : 803a60c3f5578a56a6832bd2dba9cce07784b873
This commit is contained in:
@@ -70,11 +70,6 @@ var AutoCmdHive = Class("AutoCmdHive", Contexts.Hive, {
|
||||
* @instance autocommands
|
||||
*/
|
||||
var AutoCommands = Module("autocommands", {
|
||||
init: function () {
|
||||
if (!config.haveGecko("26"))
|
||||
delete config.autocommands.DownloadPost; // FIXME
|
||||
},
|
||||
|
||||
get activeHives() contexts.allGroups.autocmd.filter(h => h._store.length),
|
||||
|
||||
add: deprecated("group.autocmd.add", { get: function add() autocommands.user.bound.add }),
|
||||
|
||||
@@ -34,7 +34,6 @@ var StatusLine = Module("statusline", {
|
||||
]
|
||||
});
|
||||
|
||||
if (config.haveGecko("25"))
|
||||
config.tabbrowser.getStatusPanel().hidden = true;
|
||||
|
||||
if (this.statusBar.localName == "toolbar") {
|
||||
|
||||
@@ -48,9 +48,6 @@ var ConfigBase = Class("ConfigBase", {
|
||||
* initialization code. Must call superclass's init function.
|
||||
*/
|
||||
init: function init() {
|
||||
if (!config.haveGecko("26"))
|
||||
this.modules.global = this.modules.global.filter(m => m != "downloads"); // FIXME
|
||||
|
||||
this.loadConfig();
|
||||
|
||||
util.trapErrors(() => {
|
||||
|
||||
@@ -111,7 +111,6 @@ var Modules = function Modules(window) {
|
||||
const BASES = [BASE, "resource://dactyl-local-content/"];
|
||||
|
||||
let proxyCache = {};
|
||||
if (config.haveGecko(29))
|
||||
var proxy = new Proxy(window, {
|
||||
get: function window_get(target, prop) {
|
||||
// `in`, not `hasOwnProperty`, because we want to return
|
||||
@@ -130,39 +129,6 @@ var Modules = function Modules(window) {
|
||||
return target[prop] = val;
|
||||
}
|
||||
});
|
||||
else {
|
||||
// Bug 814892
|
||||
let o = {};
|
||||
// Oh, the brokenness... See bug 793210
|
||||
Object.preventExtensions(o);
|
||||
proxy = new Proxy(o, {
|
||||
get: function window_get(target, prop) {
|
||||
// `in`, not `hasOwnProperty`, because we want to return
|
||||
// unbound methods in `Object.prototype`
|
||||
if (prop in proxyCache)
|
||||
return proxyCache[prop];
|
||||
|
||||
let p = window[prop];
|
||||
if (callable(p))
|
||||
return proxyCache[prop] = p.bind(window);
|
||||
|
||||
return p;
|
||||
},
|
||||
|
||||
set: function window_set(target, prop, val) {
|
||||
return window[prop] = val;
|
||||
},
|
||||
|
||||
getOwnPropertyDescriptor: function (target, prop) Object.getOwnPropertyDescriptor(window, prop),
|
||||
getOwnPropertyNames: function (target, prop) Object.getOwnPropertyNames(window),
|
||||
defineProperty: function (target, prop, desc) Object.defineProperty(window, prop, desc),
|
||||
deleteProperty: function (target, prop) { delete window[prop]; },
|
||||
has: function (target, prop) prop in window,
|
||||
hasOwn: function (target, prop) hasOwnProperty(window, prop),
|
||||
enumerate: function (target) (p for (p in window)),
|
||||
iterate: function (target) (p for (p of window))
|
||||
});
|
||||
}
|
||||
|
||||
var jsmodules = newContext(proxy, false, "Dactyl `jsmodules`");
|
||||
jsmodules.NAME = "jsmodules";
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<em:targetApplication>
|
||||
<Description
|
||||
em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
em:minVersion="25.0"
|
||||
em:minVersion="31.0"
|
||||
em:maxVersion="33.*"/>
|
||||
</em:targetApplication>
|
||||
</Description>
|
||||
|
||||
Reference in New Issue
Block a user