From c26d3f32185323036283404eb4d72bb04357a8be Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 2 Jan 2011 17:08:13 -0500 Subject: [PATCH] Remove accidentally committed debugging code. "Fix" a bug. Probably: Fixes issue #226. --- common/content/mappings.js | 9 ++++----- common/modules/config.jsm | 4 ++-- pentadactyl/content/config.js | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/common/content/mappings.js b/common/content/mappings.js index f3ecbd73..f357d6ec 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -38,16 +38,15 @@ var Map = Class("Map", { this.id = ++Map.id; this.modes = modes; this.names = keys.map(events.closure.canonicalKeys); - this._keys = keys; this.name = this.names[0]; this.action = action; this.description = description; + if (Object.freeze) Object.freeze(this.modes); if (extraInfo) update(this, extraInfo); - util.dump("\n\n\n", this.name, extraInfo); }, /** @property {number[]} All of the modes for which this mapping applies. */ @@ -167,8 +166,9 @@ var Mappings = Module("mappings", { let j = map.names.indexOf(cmd); if (j >= 0) { map.names.splice(j, 1); - if (map.names.length == 0) - maps.splice(i, 1); + if (map.names.length == 0) // FIX ME. + for (let [mode, stack] in Iterator(this._user)) + this._user[mode] = (stack || []).filter(function (m) m != map); return; } } @@ -451,7 +451,6 @@ var Mappings = Module("mappings", { ] : []; } }; - window.userMappings = userMappings; function userMappings() { let seen = {}; for (let [, stack] in Iterator(mappings._user)) diff --git a/common/modules/config.jsm b/common/modules/config.jsm index 9fbd1e54..d1ce3ac9 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -19,7 +19,7 @@ var ConfigBase = Class("ConfigBase", { * Called on dactyl startup to allow for any arbitrary application-specific * initialization code. Must call superclass's init function. */ - init: function () { + init: function init() { highlight.styleableChrome = this.styleableChrome; highlight.loadCSS(this.CSS); @@ -41,7 +41,7 @@ var ConfigBase = Class("ConfigBase", { get addonID() this.name + "@dactyl.googlecode.com", - styleHelp: function () { + styleHelp: function styleHelp() { if (!this.helpStyled) for (let k in keys(highlight.loaded)) if (/^(Help|StatusLine)|^(Boolean|Indicator|MoreMsg|Number|Logo|Key(word)?|String)$/.test(k)) diff --git a/pentadactyl/content/config.js b/pentadactyl/content/config.js index 0b04627e..b3abe375 100644 --- a/pentadactyl/content/config.js +++ b/pentadactyl/content/config.js @@ -79,7 +79,7 @@ var Config = Module("config", ConfigBase, { get visualbellWindow() this.browser.mPanelContainer, - removeTab: function (tab) { + removeTab: function removeTab(tab) { if (this.tabbrowser.mTabs.length > 1) this.tabbrowser.removeTab(tab); else {