mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 19:57:58 +01:00
Release 1.0 βeta 4.
This commit is contained in:
@@ -32,10 +32,8 @@ var Abbreviation = Class("Abbreviation", {
|
||||
get modeChar() Abbreviation.modeChar(this.modes)
|
||||
}, {
|
||||
modeChar: function (_modes) {
|
||||
let result = "";
|
||||
for (let [, mode] in Iterator(_modes))
|
||||
result += modes.getMode(mode).char;
|
||||
if (/^(ic|ci)$/(result))
|
||||
let result = array.uniq(_modes.map(function (m) m.char)).join("");
|
||||
if (result == "ci")
|
||||
result = "!";
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -527,7 +527,6 @@ var Mappings = Module("mappings", {
|
||||
return null;
|
||||
}
|
||||
function uniqueModes(modes) {
|
||||
modes = modes.map(modules.modes.closure.getMode);
|
||||
let chars = [k for ([k, v] in Iterator(modules.modes.modeChars))
|
||||
if (v.every(function (mode) modes.indexOf(mode) >= 0))];
|
||||
return array.uniq(modes.filter(function (m) chars.indexOf(m.char) < 0).concat(chars));
|
||||
|
||||
@@ -228,10 +228,11 @@ var Modes = Module("modes", {
|
||||
|
||||
getStack: function (idx) this._modeStack[this._modeStack.length - idx - 1] || this._modeStack[0],
|
||||
|
||||
getCharModes: function (chr) [m for (m in values(this._modeMap)) if (m.char == chr)],
|
||||
getCharModes: function (chr) (this.modeChars[chr] || []).slice(),
|
||||
|
||||
matchModes: function (obj)
|
||||
[m for (m in values(this._modeMap)) if (Object.keys(obj).every(function (k) obj[k] == (m[k] || false)))],
|
||||
this._modes.filter(function (mode) Object.keys(obj)
|
||||
.every(function (k) obj[k] == (mode[k] || false))),
|
||||
|
||||
// show the current mode string in the command line
|
||||
show: function show() {
|
||||
|
||||
@@ -159,7 +159,11 @@ function defineModule(name, params) {
|
||||
|
||||
defineModule.loadLog = [];
|
||||
Object.defineProperty(defineModule.loadLog, "push", {
|
||||
value: function (val) { defineModule.dump(val + "\n"); this[this.length] = val; }
|
||||
value: function (val) {
|
||||
if (false)
|
||||
defineModule.dump(val + "\n");
|
||||
this[this.length] = Date.now() + " " + val;
|
||||
}
|
||||
});
|
||||
defineModule.dump = function dump_() {
|
||||
let msg = Array.map(arguments, function (msg) {
|
||||
|
||||
@@ -250,7 +250,7 @@ var Overlay = Module("Overlay", {
|
||||
deferredInit["load"].forEach(call);
|
||||
modules.times = update({}, defineModule.times);
|
||||
|
||||
util.dump("Loaded in " + (Date.now() - start) + "ms");
|
||||
defineModule.loadLog.push("Loaded in " + (Date.now() - start) + "ms");
|
||||
|
||||
modules.events.addSessionListener(window, "unload", function onUnload() {
|
||||
window.removeEventListener("unload", onUnload.wrapped, false);
|
||||
|
||||
@@ -932,7 +932,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
|
||||
observe: {
|
||||
"dactyl-cleanup-modules": function () {
|
||||
util.dump("dactyl: util: observe: dactyl-cleanup-modules");
|
||||
defineModule.loadLog.push("dactyl: util: observe: dactyl-cleanup-modules");
|
||||
|
||||
for (let module in values(defineModule.modules))
|
||||
if (module.cleanup) {
|
||||
@@ -945,12 +945,12 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
"dactyl-rehash": function () {
|
||||
services.observer.removeObserver(this, "dactyl-rehash");
|
||||
|
||||
util.dump("dactyl: util: observe: dactyl-rehash");
|
||||
defineModule.loadLog.push("dactyl: util: observe: dactyl-rehash");
|
||||
if (this.rehashing)
|
||||
JSMLoader.purge();
|
||||
else
|
||||
for (let module in values(defineModule.modules)) {
|
||||
util.dump("dactyl: util: init(" + module + ")");
|
||||
defineModule.loadLog.push("dactyl: util: init(" + module + ")");
|
||||
if (module.reinit)
|
||||
module.reinit();
|
||||
else
|
||||
@@ -974,7 +974,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
if (!window.dactylOverlays)
|
||||
window.dactylOverlays = [];
|
||||
|
||||
util.dump("load overlays", window.document.documentURI);
|
||||
defineModule.loadLog.push("load overlays " + window.document.documentURI);
|
||||
|
||||
for each (let obj in util.overlays[window.document.documentURI] || []) {
|
||||
if (window.dactylOverlays.indexOf(obj) >= 0)
|
||||
@@ -988,7 +988,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
if (!doc.dactylOverlayElements)
|
||||
doc.dactylOverlayElements = [];
|
||||
|
||||
util.dump("load overlay", doc.documentURI, String(obj).substr(0, 60));
|
||||
defineModule.loadLog.push("load overlays " + doc.documentURI + " " + String(obj).substr(0, 60));
|
||||
|
||||
function overlay(key, fn) {
|
||||
if (obj[key]) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
1.0b4pre:
|
||||
1.0b4:
|
||||
* Extensive Firefox 4 support, including:
|
||||
- Fully restartless. Can now be installed, uninstalled,
|
||||
enabled, disabled, and upgraded without restarting Firefox.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<Description about="urn:mozilla:install-manifest"
|
||||
em:id="pentadactyl@dactyl.googlecode.com"
|
||||
em:name="Pentadactyl"
|
||||
em:version="1.0b4pre"
|
||||
em:version="1.0b4"
|
||||
em:description="Firefox for Vim and Links addicts"
|
||||
em:homepageURL="http://dactyl.sourceforge.net/pentadactyl"
|
||||
em:iconURL="chrome://pentadactyl/skin/icon.png"
|
||||
|
||||
Reference in New Issue
Block a user