From 3380ed7cb69430786235d8c067e6e71ed1b685e6 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 29 Mar 2014 08:19:50 -0700 Subject: [PATCH] Get rid of stupid line. --- common/modules/main.jsm | 59 +++++++++++++++-------------------------- common/skin/dactyl.css | 5 ++++ 2 files changed, 27 insertions(+), 37 deletions(-) diff --git a/common/modules/main.jsm b/common/modules/main.jsm index 80e64a79..bc0a2da6 100644 --- a/common/modules/main.jsm +++ b/common/modules/main.jsm @@ -110,49 +110,34 @@ var Modules = function Modules(window) { 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 = {}; if (config.haveGecko(29)) - var proxy = new Proxy(window, { - 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; - } - }); + var proxy = new Proxy(window, traps); 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; - }, - + proxy = new Proxy(o, update(traps, { 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), @@ -161,7 +146,7 @@ var Modules = function Modules(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`"); diff --git a/common/skin/dactyl.css b/common/skin/dactyl.css index 1a00e911..7ab594d0 100644 --- a/common/skin/dactyl.css +++ b/common/skin/dactyl.css @@ -243,6 +243,11 @@ statusbarpanel { min-height: 0 !important; } +/* Fix stupid line... */ +[dactyl-australis=true] #navigator-toolbox::after { + height: 0 !important; +} + #PanelUI-button, #PanelUI-menu-button, #nav-bar-customization-target > .toolbarbutton-1,