1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-29 12:03:31 +02:00

Get rid of stupid line.

This commit is contained in:
Kris Maglione
2014-03-29 08:19:50 -07:00
parent d14db19264
commit 3380ed7cb6
2 changed files with 27 additions and 37 deletions

View File

@@ -110,49 +110,34 @@ var Modules = function Modules(window) {
const BASES = [BASE, "resource://dactyl-local-content/"]; const BASES = [BASE, "resource://dactyl-local-content/"];
var traps = {
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 = target[prop];
if (callable(p))
return proxyCache[prop] = p.bind(target);
return p;
},
set: function window_set(target, prop, val) {
return target[prop] = val;
}
};
let proxyCache = {}; let proxyCache = {};
if (config.haveGecko(29)) if (config.haveGecko(29))
var proxy = new Proxy(window, { var proxy = new Proxy(window, traps);
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 = target[prop];
if (callable(p))
return proxyCache[prop] = p.bind(target);
return p;
},
set: function window_set(target, prop, val) {
return target[prop] = val;
}
});
else { else {
// Bug 814892 // Bug 814892
let o = {}; let o = {};
// Oh, the brokenness... See bug 793210 // Oh, the brokenness... See bug 793210
Object.preventExtensions(o); Object.preventExtensions(o);
proxy = new Proxy(o, { proxy = new Proxy(o, update(traps, {
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), getOwnPropertyDescriptor: function (target, prop) Object.getOwnPropertyDescriptor(window, prop),
getOwnPropertyNames: function (target, prop) Object.getOwnPropertyNames(window), getOwnPropertyNames: function (target, prop) Object.getOwnPropertyNames(window),
defineProperty: function (target, prop, desc) Object.defineProperty(window, prop, desc), defineProperty: function (target, prop, desc) Object.defineProperty(window, prop, desc),
@@ -161,7 +146,7 @@ var Modules = function Modules(window) {
hasOwn: function (target, prop) hasOwnProperty(window, prop), hasOwn: function (target, prop) hasOwnProperty(window, prop),
enumerate: function (target) (p for (p in window)), enumerate: function (target) (p for (p in window)),
iterate: function (target) (p for (p of window)) iterate: function (target) (p for (p of window))
}); }));
} }
var jsmodules = newContext(proxy, false, "Dactyl `jsmodules`"); var jsmodules = newContext(proxy, false, "Dactyl `jsmodules`");

View File

@@ -243,6 +243,11 @@ statusbarpanel {
min-height: 0 !important; min-height: 0 !important;
} }
/* Fix stupid line... */
[dactyl-australis=true] #navigator-toolbox::after {
height: 0 !important;
}
#PanelUI-button, #PanelUI-button,
#PanelUI-menu-button, #PanelUI-menu-button,
#nav-bar-customization-target > .toolbarbutton-1, #nav-bar-customization-target > .toolbarbutton-1,