From 924863cd61bdfc95bc678f13115a6c77d3d5ce9a Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 28 Aug 2010 18:02:03 -0400 Subject: [PATCH] imported patch dactylify --HG-- rename : common/content/liberator-overlay.js => common/content/dactyl-overlay.js rename : common/content/liberator.js => common/content/dactyl.js rename : common/content/liberator.xul => common/content/dactyl.xul rename : common/skin/liberator.css => common/skin/dactyl.css rename : muttator/content/compose/liberator.dtd => muttator/content/compose/dactyl.dtd rename : muttator/content/compose/liberator.xul => muttator/content/compose/dactyl.xul rename : muttator/content/liberator.dtd => muttator/content/dactyl.dtd rename : vimperator/AUTHORS => pentadactyl/AUTHORS rename : vimperator/Donors => pentadactyl/Donors rename : vimperator/Makefile => pentadactyl/Makefile rename : vimperator/NEWS => pentadactyl/NEWS rename : vimperator/TODO => pentadactyl/TODO rename : vimperator/chrome.manifest => pentadactyl/chrome.manifest rename : vimperator/components/about-handler.js => pentadactyl/components/about-handler.js rename : vimperator/components/commandline-handler.js => pentadactyl/components/commandline-handler.js rename : vimperator/components/protocols.js => pentadactyl/components/protocols.js rename : vimperator/content/about.html => pentadactyl/content/about.html rename : vimperator/content/about_background.png => pentadactyl/content/about_background.png rename : vimperator/content/config.js => pentadactyl/content/config.js rename : vimperator/content/liberator.dtd => pentadactyl/content/dactyl.dtd rename : vimperator/content/logo.png => pentadactyl/content/logo.png rename : vimperator/content/vimperator.svg => pentadactyl/content/pentadactyl.svg rename : vimperator/content/vimperator.xul => pentadactyl/content/pentadactyl.xul rename : vimperator/contrib/vim/Makefile => pentadactyl/contrib/vim/Makefile rename : vimperator/contrib/vim/ftdetect/vimperator.vim => pentadactyl/contrib/vim/ftdetect/pentadactyl.vim rename : vimperator/contrib/vim/mkvimball.txt => pentadactyl/contrib/vim/mkvimball.txt rename : vimperator/contrib/vim/syntax/vimperator.vim => pentadactyl/contrib/vim/syntax/pentadactyl.vim rename : vimperator/install.rdf => pentadactyl/install.rdf rename : vimperator/locale/en-US/all.xml => pentadactyl/locale/en-US/all.xml rename : vimperator/locale/en-US/autocommands.xml => pentadactyl/locale/en-US/autocommands.xml rename : vimperator/locale/en-US/liberator.dtd => pentadactyl/locale/en-US/dactyl.dtd rename : vimperator/locale/en-US/gui.xml => pentadactyl/locale/en-US/gui.xml rename : vimperator/locale/en-US/intro.xml => pentadactyl/locale/en-US/intro.xml rename : vimperator/locale/en-US/options.xml => pentadactyl/locale/en-US/options.xml rename : vimperator/locale/en-US/tutorial.xml => pentadactyl/locale/en-US/tutorial.xml rename : vimperator/vimperatorrc.example => pentadactyl/pentadactylrc.example rename : vimperator/regressions.js => pentadactyl/regressions.js rename : vimperator/skin/about.css => pentadactyl/skin/about.css rename : vimperator/skin/icon.png => pentadactyl/skin/icon.png rename : xulmus/content/liberator.dtd => xulmus/content/dactyl.dtd rename : xulmus/locale/en-US/liberator.dtd => xulmus/locale/en-US/dactyl.dtd --- .hgtags | 30 +- HACKING | 4 +- Makefile | 2 +- common/Makefile | 2 +- common/asciidoc.conf | 4 +- common/components/protocols.js | 33 +- common/content/autocommands.js | 28 +- common/content/bindings.xml | 22 +- common/content/bookmarks.js | 34 +- common/content/browser.js | 24 +- common/content/buffer.js | 106 +++--- common/content/commandline.js | 92 ++--- common/content/commands.js | 46 +-- common/content/completion.js | 10 +- common/content/configbase.js | 10 +- ...liberator-overlay.js => dactyl-overlay.js} | 6 +- common/content/{liberator.js => dactyl.js} | 345 +++++++++--------- common/content/dactyl.xul | 104 ++++++ common/content/editor.js | 66 ++-- common/content/eval.js | 4 +- common/content/events.js | 170 ++++----- common/content/finder.js | 4 +- common/content/help-single.xsl | 12 +- common/content/help.css | 4 +- common/content/help.xsl | 186 +++++----- common/content/hints.js | 48 +-- common/content/history.js | 16 +- common/content/io.js | 98 ++--- common/content/javascript.js | 10 +- common/content/liberator.xul | 104 ------ common/content/mappings.js | 10 +- common/content/marks.js | 38 +- common/content/modes.js | 4 +- common/content/modules.js | 4 +- common/content/options.js | 74 ++-- common/content/preferences.xul | 2 +- common/content/quickmarks.js | 26 +- common/content/sanitizer.js | 28 +- common/content/services.js | 4 +- common/content/statusline.js | 10 +- common/content/style.js | 56 +-- common/content/tabs.js | 84 ++--- common/content/template.js | 2 +- common/content/util.js | 24 +- common/locale/en-US/all.xml | 6 +- common/locale/en-US/autocommands.xml | 8 +- common/locale/en-US/browsing.xml | 30 +- common/locale/en-US/buffer.xml | 10 +- common/locale/en-US/cmdline.xml | 6 +- common/locale/en-US/developer.xml | 26 +- common/locale/en-US/eval.xml | 10 +- common/locale/en-US/gui.xml | 34 +- common/locale/en-US/hints.xml | 10 +- common/locale/en-US/index.xml | 22 +- common/locale/en-US/insert.xml | 6 +- common/locale/en-US/map.xml | 18 +- common/locale/en-US/marks.xml | 10 +- common/locale/en-US/message.xml | 8 +- common/locale/en-US/options.xml | 74 ++-- common/locale/en-US/pattern.xml | 10 +- common/locale/en-US/print.xml | 8 +- common/locale/en-US/repeat.xml | 24 +- common/locale/en-US/starting.xml | 38 +- common/locale/en-US/styling.xml | 14 +- common/locale/en-US/tabs.xml | 8 +- common/locale/en-US/various.xml | 10 +- common/modules/storage.jsm | 10 +- common/skin/{liberator.css => dactyl.css} | 84 ++--- muttator/AUTHORS | 2 +- muttator/NEWS | 2 +- muttator/chrome.manifest | 16 +- muttator/content/addressbook.js | 10 +- muttator/content/compose/dactyl.dtd | 4 + muttator/content/compose/dactyl.xul | 98 +++++ muttator/content/compose/liberator.dtd | 4 - muttator/content/compose/liberator.xul | 98 ----- muttator/content/config.js | 8 +- muttator/content/dactyl.dtd | 13 + muttator/content/liberator.dtd | 13 - muttator/content/mail.js | 48 +-- muttator/content/muttator.svg | 4 +- muttator/contrib/vim/syntax/muttator.vim | 2 +- muttator/install.rdf | 4 +- muttator/locale/en-US/all.xml | 4 +- muttator/locale/en-US/autocommands.xml | 12 +- muttator/locale/en-US/gui.xml | 8 +- muttator/locale/en-US/intro.xml | 92 +++-- {vimperator => pentadactyl}/AUTHORS | 16 +- {vimperator => pentadactyl}/Donors | 0 {vimperator => pentadactyl}/Makefile | 2 +- {vimperator => pentadactyl}/NEWS | 56 +-- {vimperator => pentadactyl}/TODO | 10 +- pentadactyl/chrome.manifest | 28 ++ .../components/about-handler.js | 2 +- .../components/commandline-handler.js | 2 +- .../components/protocols.js | 0 .../content/about.html | 12 +- .../content/about_background.png | Bin {vimperator => pentadactyl}/content/config.js | 30 +- pentadactyl/content/dactyl.dtd | 13 + {vimperator => pentadactyl}/content/logo.png | Bin .../content/pentadactyl.svg | 12 +- .../content/pentadactyl.xul | 26 +- .../contrib/vim/Makefile | 4 +- .../contrib/vim/ftdetect/pentadactyl.vim | 1 + pentadactyl/contrib/vim/mkvimball.txt | 2 + .../contrib/vim/syntax/pentadactyl.vim | 86 ++--- {vimperator => pentadactyl}/install.rdf | 16 +- .../locale/en-US/all.xml | 4 +- .../locale/en-US/autocommands.xml | 10 +- pentadactyl/locale/en-US/dactyl.dtd | 4 + .../locale/en-US/gui.xml | 8 +- .../locale/en-US/intro.xml | 50 ++- .../locale/en-US/options.xml | 4 +- .../locale/en-US/tutorial.xml | 96 ++--- .../pentadactylrc.example | 4 +- {vimperator => pentadactyl}/regressions.js | 52 +-- {vimperator => pentadactyl}/skin/about.css | 2 +- {vimperator => pentadactyl}/skin/icon.png | Bin vimperator/chrome.manifest | 28 -- vimperator/content/liberator.dtd | 13 - .../contrib/vim/ftdetect/vimperator.vim | 1 - vimperator/contrib/vim/mkvimball.txt | 2 - vimperator/locale/en-US/liberator.dtd | 4 - xulmus/TODO | 2 +- xulmus/chrome.manifest | 20 +- xulmus/content/config.js | 14 +- xulmus/content/dactyl.dtd | 13 + xulmus/content/liberator.dtd | 13 - xulmus/content/player.js | 30 +- xulmus/content/xulmus.svg | 4 +- xulmus/contrib/vim/syntax/xulmus.vim | 2 +- xulmus/install.rdf | 2 +- xulmus/locale/en-US/all.xml | 4 +- xulmus/locale/en-US/autocommands.xml | 4 +- xulmus/locale/en-US/browsing.xml | 4 +- .../en-US/{liberator.dtd => dactyl.dtd} | 0 xulmus/locale/en-US/gui.xml | 8 +- xulmus/locale/en-US/intro.xml | 40 +- xulmus/locale/en-US/player.xml | 6 +- xulmus/locale/en-US/tabs.xml | 4 +- 141 files changed, 1836 insertions(+), 1850 deletions(-) rename common/content/{liberator-overlay.js => dactyl-overlay.js} (91%) rename common/content/{liberator.js => dactyl.js} (85%) create mode 100644 common/content/dactyl.xul delete mode 100644 common/content/liberator.xul rename common/skin/{liberator.css => dactyl.css} (60%) create mode 100644 muttator/content/compose/dactyl.dtd create mode 100644 muttator/content/compose/dactyl.xul delete mode 100644 muttator/content/compose/liberator.dtd delete mode 100644 muttator/content/compose/liberator.xul create mode 100644 muttator/content/dactyl.dtd delete mode 100644 muttator/content/liberator.dtd rename {vimperator => pentadactyl}/AUTHORS (95%) rename {vimperator => pentadactyl}/Donors (100%) rename {vimperator => pentadactyl}/Makefile (72%) rename {vimperator => pentadactyl}/NEWS (93%) rename {vimperator => pentadactyl}/TODO (94%) create mode 100644 pentadactyl/chrome.manifest rename {vimperator => pentadactyl}/components/about-handler.js (98%) rename {vimperator => pentadactyl}/components/commandline-handler.js (98%) rename {vimperator => pentadactyl}/components/protocols.js (100%) rename {vimperator => pentadactyl}/content/about.html (61%) rename {vimperator => pentadactyl}/content/about_background.png (100%) rename {vimperator => pentadactyl}/content/config.js (93%) create mode 100644 pentadactyl/content/dactyl.dtd rename {vimperator => pentadactyl}/content/logo.png (100%) rename vimperator/content/vimperator.svg => pentadactyl/content/pentadactyl.svg (90%) rename vimperator/content/vimperator.xul => pentadactyl/content/pentadactyl.xul (62%) rename {vimperator => pentadactyl}/contrib/vim/Makefile (53%) create mode 100644 pentadactyl/contrib/vim/ftdetect/pentadactyl.vim create mode 100644 pentadactyl/contrib/vim/mkvimball.txt rename vimperator/contrib/vim/syntax/vimperator.vim => pentadactyl/contrib/vim/syntax/pentadactyl.vim (50%) rename {vimperator => pentadactyl}/install.rdf (59%) rename {vimperator => pentadactyl}/locale/en-US/all.xml (64%) rename {vimperator => pentadactyl}/locale/en-US/autocommands.xml (84%) create mode 100644 pentadactyl/locale/en-US/dactyl.dtd rename {vimperator => pentadactyl}/locale/en-US/gui.xml (85%) rename {vimperator => pentadactyl}/locale/en-US/intro.xml (76%) rename {vimperator => pentadactyl}/locale/en-US/options.xml (80%) rename {vimperator => pentadactyl}/locale/en-US/tutorial.xml (72%) rename vimperator/vimperatorrc.example => pentadactyl/pentadactylrc.example (87%) rename {vimperator => pentadactyl}/regressions.js (81%) rename {vimperator => pentadactyl}/skin/about.css (90%) rename {vimperator => pentadactyl}/skin/icon.png (100%) delete mode 100644 vimperator/chrome.manifest delete mode 100644 vimperator/content/liberator.dtd delete mode 100644 vimperator/contrib/vim/ftdetect/vimperator.vim delete mode 100644 vimperator/contrib/vim/mkvimball.txt delete mode 100644 vimperator/locale/en-US/liberator.dtd create mode 100644 xulmus/content/dactyl.dtd delete mode 100644 xulmus/content/liberator.dtd rename xulmus/locale/en-US/{liberator.dtd => dactyl.dtd} (100%) diff --git a/.hgtags b/.hgtags index 82f9e83c..d1a6b078 100644 --- a/.hgtags +++ b/.hgtags @@ -1,17 +1,17 @@ c5d6d5cd0dd426585f8e5afa314183208a610e59 muttator-0.5 -fe9ffcfb48c7050f5e6872285ff0197eb54cf213 vimperator-0.4.1 -d063e0e23d668dcf807e2032f032a3d23486ec48 vimperator-0.5 -ce28bfd79dcc119abf59e9318d524144f45d53f5 vimperator-0.5-branch-HEAD-merge-1 -019506ce1fa1a647f27fb4aed293b6e0fe629d31 vimperator-0.5.1 -605db9f5c6cb5a1d65c95211f78d0a480a1566fd vimperator-0.5.2 -3b8c0bcbbf8663fde9f959efbc1ad5fda3d9d1f6 vimperator-0.5.3 -c9273973fc735678c3930bc15fb4915414907d23 vimperator-1.0 -96b65677b4c5a29525fd791aaadbc51a4ba7b7c2 vimperator-1.1 -ff456886599eb7ad2cdd718eac498b6c8a9efc75 vimperator-1.2 -e34e4c4a9c24488f570d08200182542134e05f29 vimperator-2.0 -e34e4c4a9c24488f570d08200182542134e05f29 vimperator-2.0 -f65383ca4fc4872827f3f23350ae503c93cd66a4 vimperator-2.0~alpha1 -75873caffbe7327bfd1c27e615378d2a196a9286 vimperator-2.1 -7777c3e4d29893701a64f46adbd60b3b06cda7a6 vimperator-2.2~beta1 -d4c91b705d551c63c5a0d929248ec873e978a188 vimperator-2.2 +fe9ffcfb48c7050f5e6872285ff0197eb54cf213 pentadactyl-0.4.1 +d063e0e23d668dcf807e2032f032a3d23486ec48 pentadactyl-0.5 +ce28bfd79dcc119abf59e9318d524144f45d53f5 pentadactyl-0.5-branch-HEAD-merge-1 +019506ce1fa1a647f27fb4aed293b6e0fe629d31 pentadactyl-0.5.1 +605db9f5c6cb5a1d65c95211f78d0a480a1566fd pentadactyl-0.5.2 +3b8c0bcbbf8663fde9f959efbc1ad5fda3d9d1f6 pentadactyl-0.5.3 +c9273973fc735678c3930bc15fb4915414907d23 pentadactyl-1.0 +96b65677b4c5a29525fd791aaadbc51a4ba7b7c2 pentadactyl-1.1 +ff456886599eb7ad2cdd718eac498b6c8a9efc75 pentadactyl-1.2 +e34e4c4a9c24488f570d08200182542134e05f29 pentadactyl-2.0 +e34e4c4a9c24488f570d08200182542134e05f29 pentadactyl-2.0 +f65383ca4fc4872827f3f23350ae503c93cd66a4 pentadactyl-2.0~alpha1 +75873caffbe7327bfd1c27e615378d2a196a9286 pentadactyl-2.1 +7777c3e4d29893701a64f46adbd60b3b06cda7a6 pentadactyl-2.2~beta1 +d4c91b705d551c63c5a0d929248ec873e978a188 pentadactyl-2.2 ca14d185b1506c77b748925770731b66d3dddfbe xulmus-0.1 diff --git a/HACKING b/HACKING index cc8a0788..eb0a2c37 100644 --- a/HACKING +++ b/HACKING @@ -1,6 +1,6 @@ = Hacking = -If you've taken to hacking Vimperator source code, we hope that you'll share +If you've taken to hacking Pentadactyl source code, we hope that you'll share your changes. In case you do, please keep the following in mind, and we'll be happy to accept your patches. @@ -20,7 +20,7 @@ important, please ask. In general: Just look at the existing source code! We try to target experienced JavaScript developers who do not -necessarily need to have a good understanding of Vimperator's source +necessarily need to have a good understanding of Pentadactyl's source code, nor necessarily understand in-depth concepts of other languages like Lisp or Python. Therefore, the coding style should feel natural to any JavaScript developer. Of course, this does not diff --git a/Makefile b/Makefile index 303aa07f..dd4ac33c 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -DIRS = muttator vimperator xulmus +DIRS = muttator pentadactyl xulmus TARGETS = clean distclean doc help info jar release xpi .SILENT: diff --git a/common/Makefile b/common/Makefile index 95441a2e..6258f2b5 100644 --- a/common/Makefile +++ b/common/Makefile @@ -4,7 +4,7 @@ TOP = $(shell pwd) OS = $(shell uname -s) BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S") BASE = $(TOP)/../common -GOOGLE_PROJ = vimperator-labs +GOOGLE_PROJ = pentadactyl-labs GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files LOCALEDIR = locale diff --git a/common/asciidoc.conf b/common/asciidoc.conf index 15e32306..a950e530 100644 --- a/common/asciidoc.conf +++ b/common/asciidoc.conf @@ -40,7 +40,7 @@ email=stubenschrott@vimperator.org # FIXME: this logo/donation banner is really ugly. --djk [heading-blockmacro] -{outfile@.*(intro|all).html::
} +{outfile@.*(intro|all).html::
} @@ -81,7 +81,7 @@ email=stubenschrott@vimperator.org
[help-inlinemacro] -{target} +{target} [quotes] ||=key diff --git a/common/components/protocols.js b/common/components/protocols.js index fd6378d1..a8b2a975 100644 --- a/common/components/protocols.js +++ b/common/components/protocols.js @@ -23,7 +23,7 @@ const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOSer let channel = Components.classesByID["{61ba33c0-3031-11d3-8cd0-0060b0fc14a3}"] .getService(Ci.nsIProtocolHandler) - .newChannel(ioService.newURI("chrome://liberator/content/data", null, null)) + .newChannel(ioService.newURI("chrome://dactyl/content/data", null, null)) .QueryInterface(Ci.nsIRequest); const systemPrincipal = channel.owner; channel.cancel(NS_BINDING_ABORTED); @@ -39,9 +39,9 @@ function makeChannel(url, orig) { channel.originalURI = orig; return channel; } -function fakeChannel(orig) makeChannel("chrome://liberator/content/does/not/exist", orig); -function redirect(to, orig) { - let html = .toXMLString(); +function fakeChannel(orig) makeChannel("chrome://dactyl/content/does/not/exist", orig); +function redirect(to, orig, time) { + let html = .toXMLString(); return makeChannel(dataURL('text/html', html), ioService.newURI(to, null, null)); } @@ -86,7 +86,7 @@ ChromeData.prototype = { } }; -function Liberator() { +function Dactyl() { this.wrappedJSObject = this; const self = this; @@ -94,18 +94,18 @@ function Liberator() { this.FILE_MAP = {}; this.OVERLAY_MAP = {}; } -Liberator.prototype = { - contractID: "@mozilla.org/network/protocol;1?name=liberator", +Dactyl.prototype = { + contractID: "@mozilla.org/network/protocol;1?name=dactyl", classID: Components.ID("{9c8f2530-51c8-4d41-b356-319e0b155c44}"), - classDescription: "Liberator utility protocol", + classDescription: "Dactyl utility protocol", QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIProtocolHandler]), _xpcom_factory: { createInstance: function (outer, iid) { - if (!Liberator.instance) - Liberator.instance = new Liberator(); + if (!Dactyl.instance) + Dactyl.instance = new Dactyl(); if (outer != null) throw Components.results.NS_ERROR_NO_AGGREGATION; - return Liberator.instance.QueryInterface(iid); + return Dactyl.instance.QueryInterface(iid); } }, @@ -117,7 +117,7 @@ Liberator.prototype = { } }, - scheme: "liberator", + scheme: "dactyl", defaultPort: -1, allowPort: function (port, scheme) false, protocolFlags: 0 @@ -134,6 +134,9 @@ Liberator.prototype = { newChannel: function (uri) { try { + if (!("all" in this.FILE_MAP)) + return redirect(uri.spec, uri, 1); + switch(uri.host) { case "help": let url = this.FILE_MAP[uri.path.replace(/^\/|#.*/g, "")]; @@ -144,7 +147,7 @@ Liberator.prototype = { case "help-tag": let tag = uri.path.substr(1); if (tag in this.HELP_TAGS) - return redirect("liberator://help/" + this.HELP_TAGS[tag] + "#" + tag, uri); + return redirect("dactyl://help/" + this.HELP_TAGS[tag] + "#" + tag, uri); } } catch (e) {} @@ -153,8 +156,8 @@ Liberator.prototype = { }; if (XPCOMUtils.generateNSGetFactory) - const NSGetFactory = XPCOMUtils.generateNSGetFactory([ChromeData, Liberator]); + const NSGetFactory = XPCOMUtils.generateNSGetFactory([ChromeData, Dactyl]); else - const NSGetModule = XPCOMUtils.generateNSGetModule([ChromeData, Liberator]); + const NSGetModule = XPCOMUtils.generateNSGetModule([ChromeData, Dactyl]); // vim: set fdm=marker sw=4 ts=4 et: diff --git a/common/content/autocommands.js b/common/content/autocommands.js index e8eb47f7..fe52f5b9 100755 --- a/common/content/autocommands.js +++ b/common/content/autocommands.js @@ -35,7 +35,7 @@ const AutoCommands = Module("autocommands", { add: function (events, regex, cmd) { if (typeof events == "string") { events = events.split(","); - liberator.log("DEPRECATED: the events list arg to autocommands.add() should be an array of event names"); + dactyl.log("DEPRECATED: the events list arg to autocommands.add() should be an array of event names"); } events.forEach(function (event) { this._store.push(AutoCommand(event, RegExp(regex), cmd)); @@ -119,7 +119,7 @@ const AutoCommands = Module("autocommands", { let autoCmds = this._store.filter(function (autoCmd) autoCmd.event == event); - liberator.echomsg("Executing " + event + " Auto commands for \"*\"", 8); + dactyl.echomsg("Executing " + event + " Auto commands for \"*\"", 8); let lastPattern = null; let url = args.url || ""; @@ -127,22 +127,22 @@ const AutoCommands = Module("autocommands", { for (let [, autoCmd] in Iterator(autoCmds)) { if (autoCmd.pattern.test(url)) { if (!lastPattern || lastPattern.source != autoCmd.pattern.source) - liberator.echomsg("Executing " + event + " Auto commands for \"" + autoCmd.pattern.source + "\"", 8); + dactyl.echomsg("Executing " + event + " Auto commands for \"" + autoCmd.pattern.source + "\"", 8); lastPattern = autoCmd.pattern; - liberator.echomsg("autocommand " + autoCmd.command, 9); + dactyl.echomsg("autocommand " + autoCmd.command, 9); if (typeof autoCmd.command == "function") { try { autoCmd.command.call(autoCmd, args); } catch (e) { - liberator.reportError(e); - liberator.echoerr(e); + dactyl.reportError(e); + dactyl.echoerr(e); } } else - liberator.execute(commands.replaceTokens(autoCmd.command, args), null, true); + dactyl.execute(commands.replaceTokens(autoCmd.command, args), null, true); } } } @@ -162,7 +162,7 @@ const AutoCommands = Module("autocommands", { RegExp(regex); } catch (e) { - liberator.assert(false, "E475: Invalid argument: " + regex); + dactyl.assert(false, "E475: Invalid argument: " + regex); } if (event) { @@ -171,7 +171,7 @@ const AutoCommands = Module("autocommands", { validEvents.push("*"); events = event.split(","); - liberator.assert(events.every(function (event) validEvents.indexOf(event) >= 0), + dactyl.assert(events.every(function (event) validEvents.indexOf(event) >= 0), "E216: No such group or event: " + event); } @@ -221,7 +221,7 @@ const AutoCommands = Module("autocommands", { function (args) { // Vim compatible if (args.length == 0) { - liberator.echomsg("No matching autocommands"); + dactyl.echomsg("No matching autocommands"); return; } @@ -230,14 +230,14 @@ const AutoCommands = Module("autocommands", { let validEvents = config.autocommands.map(function (e) e[0]); // TODO: add command validators - liberator.assert(event != "*", + dactyl.assert(event != "*", "E217: Can't execute autocommands for ALL events"); - liberator.assert(validEvents.indexOf(event) >= 0, + dactyl.assert(validEvents.indexOf(event) >= 0, "E216: No such group or event: " + args); - liberator.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), + dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)), "No matching autocommands"); - if (this.name == "doautoall" && liberator.has("tabs")) { + if (this.name == "doautoall" && dactyl.has("tabs")) { let current = tabs.index(); for (let i = 0; i < tabs.count; i++) { diff --git a/common/content/bindings.xml b/common/content/bindings.xml index 5e01cc57..8c6f2ebe 100644 --- a/common/content/bindings.xml +++ b/common/content/bindings.xml @@ -1,14 +1,14 @@ - + @@ -19,17 +19,17 @@ - - + + - + - - - + + + - + - + - + diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js index eea59c69..5da9abfd 100644 --- a/common/content/bookmarks.js +++ b/common/content/bookmarks.js @@ -10,7 +10,7 @@ const DEFAULT_FAVICON = "chrome://mozapps/skin/places/defaultFavicon.png"; // also includes methods for dealing with keywords and search engines const Bookmarks = Module("bookmarks", { - requires: ["autocommands", "config", "liberator", "storage", "services"], + requires: ["autocommands", "config", "dactyl", "storage", "services"], init: function () { const faviconService = services.get("favicon"); @@ -47,7 +47,7 @@ const Bookmarks = Module("bookmarks", { const storage = modules.storage; function Cache(name, store) { const rootFolders = [bookmarksService.toolbarFolder, bookmarksService.bookmarksMenuFolder, bookmarksService.unfiledBookmarksFolder]; - const sleep = liberator.sleep; // Storage objects are global to all windows, 'liberator' isn't. + const sleep = dactyl.sleep; // Storage objects are global to all windows, 'dactyl' isn't. let bookmarks = []; let self = this; @@ -154,7 +154,7 @@ const Bookmarks = Module("bookmarks", { onItemVisited: function onItemVisited() {}, onItemMoved: function onItemMoved() {}, onItemAdded: function onItemAdded(itemId, folder, index) { - // liberator.dump("onItemAdded(" + itemId + ", " + folder + ", " + index + ")\n"); + // dactyl.dump("onItemAdded(" + itemId + ", " + folder + ", " + index + ")\n"); if (bookmarksService.getItemType(itemId) == bookmarksService.TYPE_BOOKMARK) { if (self.isBookmark(itemId)) { let bmark = loadBookmark(readBookmark(itemId)); @@ -163,14 +163,14 @@ const Bookmarks = Module("bookmarks", { } }, onItemRemoved: function onItemRemoved(itemId, folder, index) { - // liberator.dump("onItemRemoved(" + itemId + ", " + folder + ", " + index + ")\n"); + // dactyl.dump("onItemRemoved(" + itemId + ", " + folder + ", " + index + ")\n"); if (deleteBookmark(itemId)) storage.fireEvent(name, "remove", itemId); }, onItemChanged: function onItemChanged(itemId, property, isAnnotation, value) { if (isAnnotation) return; - // liberator.dump("onItemChanged(" + itemId + ", " + property + ", " + value + ")\n"); + // dactyl.dump("onItemChanged(" + itemId + ", " + property + ", " + value + ")\n"); let bookmark = bookmarks.filter(function (item) item.id == itemId)[0]; if (bookmark) { if (property == "tags") @@ -241,7 +241,7 @@ const Bookmarks = Module("bookmarks", { } } catch (e) { - liberator.log(e, 0); + dactyl.log(e, 0); return false; } @@ -285,13 +285,13 @@ const Bookmarks = Module("bookmarks", { return bmarks.length; } catch (e) { - liberator.log(e, 0); + dactyl.log(e, 0); return 0; } }, // TODO: add filtering - // also ensures that each search engine has a Liberator-friendly alias + // also ensures that each search engine has a Dactyl-friendly alias getSearchEngines: function getSearchEngines() { let searchEngines = []; for (let [, engine] in Iterator(services.get("browserSearch").getVisibleEngines({}))) { @@ -432,16 +432,16 @@ const Bookmarks = Module("bookmarks", { let items = completion.runCompleter("bookmark", filter, maxItems, tags); if (items.length) - return liberator.open(items.map(function (i) i.url), liberator.NEW_TAB); + return dactyl.open(items.map(function (i) i.url), dactyl.NEW_TAB); if (filter.length > 0 && tags.length > 0) - liberator.echoerr("E283: No bookmarks matching tags: \"" + tags + "\" and string: \"" + filter + "\""); + dactyl.echoerr("E283: No bookmarks matching tags: \"" + tags + "\" and string: \"" + filter + "\""); else if (filter.length > 0) - liberator.echoerr("E283: No bookmarks matching string: \"" + filter + "\""); + dactyl.echoerr("E283: No bookmarks matching string: \"" + filter + "\""); else if (tags.length > 0) - liberator.echoerr("E283: No bookmarks matching tags: \"" + tags + "\""); + dactyl.echoerr("E283: No bookmarks matching tags: \"" + tags + "\""); else - liberator.echoerr("No bookmarks set"); + dactyl.echoerr("No bookmarks set"); return null; } }, { @@ -494,10 +494,10 @@ const Bookmarks = Module("bookmarks", { if (bookmarks.add(false, title, url, keyword, tags, args.bang)) { let extra = (title == url) ? "" : " (" + title + ")"; - liberator.echomsg("Added bookmark: " + url + extra, 1, commandline.FORCE_SINGLELINE); + dactyl.echomsg("Added bookmark: " + url + extra, 1, commandline.FORCE_SINGLELINE); } else - liberator.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE); + dactyl.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE); }, { argCount: "?", bang: true, @@ -537,7 +537,7 @@ const Bookmarks = Module("bookmarks", { function (resp) { if (resp && resp.match(/^y(es)?$/i)) { bookmarks._cache.bookmarks.forEach(function (bmark) { services.get("bookmarks").removeItem(bmark.id); }); - liberator.echomsg("All bookmarks deleted", 1, commandline.FORCE_SINGLELINE); + dactyl.echomsg("All bookmarks deleted", 1, commandline.FORCE_SINGLELINE); } }); } @@ -545,7 +545,7 @@ const Bookmarks = Module("bookmarks", { let url = args.string || buffer.URL; let deletedCount = bookmarks.remove(url); - liberator.echomsg(deletedCount + " bookmark(s) with url " + url.quote() + " deleted", 1, commandline.FORCE_SINGLELINE); + dactyl.echomsg(deletedCount + " bookmark(s) with url " + url.quote() + " deleted", 1, commandline.FORCE_SINGLELINE); } }, diff --git a/common/content/browser.js b/common/content/browser.js index 1ceb716c..cb4ac460 100644 --- a/common/content/browser.js +++ b/common/content/browser.js @@ -16,7 +16,7 @@ const Browser = Module("browser", { // TODO: support 'nrformats'? -> probably not worth it --mst incrementURL: function (count) { let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/); - liberator.assert(matches); + dactyl.assert(matches); let [, pre, number, post] = matches; let newNumber = parseInt(number, 10) + count; @@ -26,7 +26,7 @@ const Browser = Module("browser", { newNumberStr = "0" + newNumberStr; } - liberator.open(pre + newNumberStr + post); + dactyl.open(pre + newNumberStr + post); } }, { options: function () { @@ -46,7 +46,7 @@ const Browser = Module("browser", { PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val); getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE); } - catch (e) { liberator.reportError(e); } + catch (e) { dactyl.reportError(e); } return null; }, completer: function (context) completion.charset(context) @@ -138,7 +138,7 @@ const Browser = Module("browser", { mappings.add([modes.NORMAL], ["~"], "Open home directory", - function () { liberator.open("~"); }); + function () { dactyl.open("~"); }); mappings.add([modes.NORMAL], ["gh"], "Open homepage", @@ -148,7 +148,7 @@ const Browser = Module("browser", { "Open homepage in a new tab", function () { let homepages = gHomeButton.getHomePage(); - liberator.open(homepages, { from: "homepage", where: liberator.NEW_TAB }); + dactyl.open(homepages, { from: "homepage", where: dactyl.NEW_TAB }); }); mappings.add([modes.NORMAL], ["gu"], @@ -179,9 +179,9 @@ const Browser = Module("browser", { url = url.replace(/^(.*:\/+.*?)\/+$/, "$1/"); // get rid of more than 1 / at the end if (url == buffer.URL) - liberator.beep(); + dactyl.beep(); else - liberator.open(url); + dactyl.open(url); }, { count: true }); @@ -189,8 +189,8 @@ const Browser = Module("browser", { "Go to the root of the website", function () { let uri = content.document.location; - liberator.assert(!/(about|mailto):/.test(uri.protocol)); // exclude these special protocols for now - liberator.open(uri.protocol + "//" + (uri.host || "") + "/"); + dactyl.assert(!/(about|mailto):/.test(uri.protocol)); // exclude these special protocols for now + dactyl.open(uri.protocol + "//" + (uri.host || "") + "/"); }); mappings.add([modes.NORMAL], [""], @@ -202,7 +202,7 @@ const Browser = Module("browser", { commands.add(["downl[oads]", "dl"], "Show progress of current downloads", function () { - liberator.open("chrome://mozapps/content/downloads/downloads.xul", + dactyl.open("chrome://mozapps/content/downloads/downloads.xul", { from: "downloads"}); }, { argCount: "0" }); @@ -213,9 +213,9 @@ const Browser = Module("browser", { args = args.string; if (args) - liberator.open(args); + dactyl.open(args); else - liberator.open("about:blank"); + dactyl.open("about:blank"); }, { completer: function (context) completion.url(context), literal: 0, diff --git a/common/content/buffer.js b/common/content/buffer.js index 7315f2f1..803fed09 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -158,7 +158,7 @@ const Buffer = Module("buffer", { title: doc.title }; - if (liberator.has("tabs")) { + if (dactyl.has("tabs")) { args.tab = tabs.getContentIndex(doc) + 1; args.doc = "tabs.getTab(" + (args.tab - 1) + ").linkedBrowser.contentDocument"; } @@ -182,6 +182,10 @@ const Buffer = Module("buffer", { // event listener which is is called on each page load, even if the // page is loaded in a background tab onPageLoad: function onPageLoad(event) { + if (!dactyl.helpInitialized && event.originalTarget instanceof Document) + if (/^dactyl:/.test(event.originalTarget.location.href)) + dactyl.initHelp(); + if (event.originalTarget instanceof HTMLDocument) { let doc = event.originalTarget; // document is part of a frameset @@ -201,7 +205,7 @@ const Buffer = Module("buffer", { doc.pageIsFullyLoaded = 1; if (doc != config.browser.contentDocument) - liberator.echomsg("Background tab loaded: " + doc.title || doc.location.href, 3); + dactyl.echomsg("Background tab loaded: " + doc.title || doc.location.href, 3); this._triggerLoadAutocmd("PageLoad", doc); } @@ -233,7 +237,7 @@ const Buffer = Module("buffer", { // is not the focused frame if (document.commandDispatcher.focusedWindow == webProgress.DOMWindow) { setTimeout(function () { modes.reset(false); }, - liberator.mode == modes.HINTS ? 500 : 0); + dactyl.mode == modes.HINTS ? 500 : 0); } } else if (flags & Ci.nsIWebProgressListener.STATE_STOP) { @@ -284,7 +288,7 @@ const Buffer = Module("buffer", { if (ssli == 1) statusline.updateUrl("Link: " + link); else if (ssli == 2) - liberator.echo("Link: " + link, commandline.DISALLOW_MULTILINE); + dactyl.echo("Link: " + link, commandline.DISALLOW_MULTILINE); } if (link == "") { @@ -343,9 +347,9 @@ const Buffer = Module("buffer", { * tab. */ get localStore() { - if (!content.liberatorStore) - content.liberatorStore = {}; - return content.liberatorStore; + if (!content.dactylStore) + content.dactylStore = {}; + return content.dactylStore; }, @@ -471,7 +475,7 @@ const Buffer = Module("buffer", { */ focusAllowed: function (elem) { let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem; - return !options["strictfocus"] || elem.liberatorFocusAllowed; + return !options["strictfocus"] || elem.dactylFocusAllowed; }, /** @@ -484,7 +488,7 @@ const Buffer = Module("buffer", { focusElement: function (elem) { let doc = window.content.document; let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem; - win.liberatorFocusAllowed = true; + win.dactylFocusAllowed = true; if (isinstance(elem, [HTMLFrameElement, HTMLIFrameElement])) elem.contentWindow.focus(); @@ -531,14 +535,14 @@ const Buffer = Module("buffer", { // s have higher priority than normal hrefs let elems = frame.document.getElementsByTagName("link"); for (let elem in iter(elems)) { - liberator.open(elem.href); + dactyl.open(elem.href); return true; } // no links? ok, look for hrefs elems = frame.document.getElementsByTagName("a"); for (let elem in iter(elems)) { - buffer.followLink(elem, liberator.CURRENT_TAB); + buffer.followLink(elem, dactyl.CURRENT_TAB); return true; } @@ -548,7 +552,7 @@ const Buffer = Module("buffer", { let elem = res.snapshotItem(i); if (regex.test(elem.textContent) || regex.test(elem.title) || Array.some(elem.childNodes, function (child) regex.test(child.alt))) { - buffer.followLink(elem, liberator.CURRENT_TAB); + buffer.followLink(elem, dactyl.CURRENT_TAB); return true; } } @@ -562,7 +566,7 @@ const Buffer = Module("buffer", { ret = Array.some(window.content.frames, followFrame); if (!ret) - liberator.beep(); + dactyl.beep(); }, /** @@ -570,7 +574,7 @@ const Buffer = Module("buffer", { * * @param {Node} elem The element to click. * @param {number} where Where to open the link. See - * {@link liberator.open}. + * {@link dactyl.open}. */ followLink: function (elem, where) { let doc = elem.ownerDocument; @@ -594,18 +598,18 @@ const Buffer = Module("buffer", { let ctrlKey = false, shiftKey = false; switch (where) { - case liberator.NEW_TAB: - case liberator.NEW_BACKGROUND_TAB: + case dactyl.NEW_TAB: + case dactyl.NEW_BACKGROUND_TAB: ctrlKey = true; - shiftKey = (where != liberator.NEW_BACKGROUND_TAB); + shiftKey = (where != dactyl.NEW_BACKGROUND_TAB); break; - case liberator.NEW_WINDOW: + case dactyl.NEW_WINDOW: shiftKey = true; break; - case liberator.CURRENT_TAB: + case dactyl.CURRENT_TAB: break; default: - liberator.log("Invalid where argument for followLink()", 0); + dactyl.log("Invalid where argument for followLink()", 0); } buffer.focusElement(elem); @@ -660,7 +664,7 @@ const Buffer = Module("buffer", { window.saveURL(url, text, null, true, skipPrompt, makeURI(url, doc.characterSet)); } catch (e) { - liberator.echoerr(e); + dactyl.echoerr(e); } }, @@ -818,7 +822,7 @@ const Buffer = Module("buffer", { if (next > frames.length - 1) { if (current == frames.length - 1) - liberator.beep(); + dactyl.beep(); next = frames.length - 1; // still allow the frame indicator to be activated } } @@ -827,7 +831,7 @@ const Buffer = Module("buffer", { if (next < 0) { if (current == 0) - liberator.beep(); + dactyl.beep(); next = 0; // still allow the frame indicator to be activated } } @@ -857,7 +861,7 @@ const Buffer = Module("buffer", { * @param {Node} elem The element to query. */ showElementInfo: function (elem) { - liberator.echo(<>Element:
{util.objectToString(elem, true)}, commandline.FORCE_MULTILINE); + dactyl.echo(<>Element:
{util.objectToString(elem, true)}, commandline.FORCE_MULTILINE); }, /** @@ -881,7 +885,7 @@ const Buffer = Module("buffer", { info += ", bookmarked"; let pageInfoText = <>{file.quote()} [{info}] {title}; - liberator.echo(pageInfoText, commandline.FORCE_SINGLELINE); + dactyl.echo(pageInfoText, commandline.FORCE_SINGLELINE); return; } @@ -890,7 +894,7 @@ const Buffer = Module("buffer", { let opt = buffer.pageInfo[option]; return opt ? template.table(opt[1], opt[0](true)) : undefined; },
); - liberator.echo(list, commandline.FORCE_MULTILINE); + dactyl.echo(list, commandline.FORCE_MULTILINE); }, /** @@ -936,7 +940,7 @@ const Buffer = Module("buffer", { url = url.substr(PREFIX.length); else url = PREFIX + url; - liberator.open(url, { hide: true }); + dactyl.open(url, { hide: true }); } }, @@ -964,7 +968,7 @@ const Buffer = Module("buffer", { ZOOM_MAX: "ZoomManager" in window && Math.round(ZoomManager.MAX * 100), setZoom: function setZoom(value, fullZoom) { - liberator.assert(value >= Buffer.ZOOM_MIN || value <= Buffer.ZOOM_MAX, + dactyl.assert(value >= Buffer.ZOOM_MIN || value <= Buffer.ZOOM_MAX, "Zoom value out of range (" + Buffer.ZOOM_MIN + " - " + Buffer.ZOOM_MAX + "%)"); if (fullZoom !== undefined) @@ -986,7 +990,7 @@ const Buffer = Module("buffer", { let i = util.Math.constrain(cur + steps, 0, values.length - 1); if (i == cur && fullZoom == ZoomManager.useFullZoom) - liberator.beep(); + dactyl.beep(); Buffer.setZoom(Math.round(values[i] * 100), fullZoom); }, @@ -994,7 +998,7 @@ const Buffer = Module("buffer", { checkScrollYBounds: function checkScrollYBounds(win, direction) { // NOTE: it's possible to have scrollY > scrollMaxY - FF bug? if (direction > 0 && win.scrollY >= win.scrollMaxY || direction < 0 && win.scrollY == 0) - liberator.beep(); + dactyl.beep(); }, findScrollableWindow: function findScrollableWindow() { @@ -1103,7 +1107,7 @@ const Buffer = Module("buffer", { openUploadPrompt: function openUploadPrompt(elem) { commandline.input("Upload file: ", function (path) { let file = io.File(path); - liberator.assert(file.exists()); + dactyl.assert(file.exists()); elem.value = file.path; }, { @@ -1116,7 +1120,7 @@ const Buffer = Module("buffer", { commands.add(["frameo[nly]"], "Show only the current frame's page", function (args) { - liberator.open(tabs.localStore.focusedFrame.document.documentURI); + dactyl.open(tabs.localStore.focusedFrame.document.documentURI); }, { argCount: "0" }); @@ -1126,17 +1130,17 @@ const Buffer = Module("buffer", { let arg = args[0]; // FIXME: arg handling is a bit of a mess, check for filename - liberator.assert(!arg || arg[0] == ">" && !liberator.has("Win32"), + dactyl.assert(!arg || arg[0] == ">" && !dactyl.has("Win32"), "E488: Trailing characters"); options.withContext(function () { if (arg) { options.setPref("print.print_to_file", "true"); options.setPref("print.print_to_filename", io.File(arg.substr(1)).path); - liberator.echomsg("Printing to file: " + arg.substr(1)); + dactyl.echomsg("Printing to file: " + arg.substr(1)); } else - liberator.echomsg("Sending to printer..."); + dactyl.echomsg("Sending to printer..."); options.setPref("print.always_print_silent", args.bang); options.setPref("print.show_print_progress", !args.bang); @@ -1145,9 +1149,9 @@ const Buffer = Module("buffer", { }); if (arg) - liberator.echomsg("Printed: " + arg.substr(1)); + dactyl.echomsg("Printed: " + arg.substr(1)); else - liberator.echomsg("Print job sent."); + dactyl.echomsg("Print job sent."); }, { argCount: "?", @@ -1173,7 +1177,7 @@ const Buffer = Module("buffer", { let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); - liberator.assert(!arg || titles.indexOf(arg) >= 0, + dactyl.assert(!arg || titles.indexOf(arg) >= 0, "E475: Invalid argument: " + arg); if (options["usermode"]) @@ -1206,7 +1210,7 @@ const Buffer = Module("buffer", { if (filename) { let file = io.File(filename); - liberator.assert(!file.exists() || args.bang, + dactyl.assert(!file.exists() || args.bang, "E13: File exists (add ! to override)"); chosenData = { file: file, uri: window.makeURI(doc.location.href, doc.characterSet) }; @@ -1269,7 +1273,7 @@ const Buffer = Module("buffer", { level = util.Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX); } else - liberator.assert(false, "E488: Trailing characters"); + dactyl.assert(false, "E488: Trailing characters"); if (args.bang) buffer.fullZoom = level; @@ -1389,12 +1393,12 @@ const Buffer = Module("buffer", { function (count) { buffer.scrollLines(-Math.max(count, 1)); }, { count: true }); - mappings.add(myModes, liberator.has("mail") ? ["h"] : ["h", ""], + mappings.add(myModes, dactyl.has("mail") ? ["h"] : ["h", ""], "Scroll document to the left", function (count) { buffer.scrollColumns(-Math.max(count, 1)); }, { count: true }); - mappings.add(myModes, liberator.has("mail") ? ["l"] : ["l", ""], + mappings.add(myModes, dactyl.has("mail") ? ["l"] : ["l", ""], "Scroll document to the right", function (count) { buffer.scrollColumns(Math.max(count, 1)); }, { count: true }); @@ -1420,7 +1424,7 @@ const Buffer = Module("buffer", { mappings.add(myModes, ["%"], "Scroll to {count} percent of the document", function (count) { - liberator.assert(count > 0 && count <= 100); + dactyl.assert(count > 0 && count <= 100); buffer.scrollToPercent(buffer.scrollXPercent, count); }, { count: true }); @@ -1492,7 +1496,7 @@ const Buffer = Module("buffer", { return computedStyle.visibility != "hidden" && computedStyle.display != "none"; }); - liberator.assert(elements.length > 0); + dactyl.assert(elements.length > 0); let elem = elements[util.Math.constrain(count, 1, elements.length) - 1]; buffer.focusElement(elem); util.scrollIntoView(elem); @@ -1503,24 +1507,24 @@ const Buffer = Module("buffer", { mappings.add(myModes, ["gP"], "Open (put) a URL based on the current clipboard contents in a new buffer", function () { - liberator.open(util.readFromClipboard(), - liberator[options.get("activate").has("paste") ? "NEW_BACKGROUND_TAB" : "NEW_TAB"]); + dactyl.open(util.readFromClipboard(), + dactyl[options.get("activate").has("paste") ? "NEW_BACKGROUND_TAB" : "NEW_TAB"]); }); mappings.add(myModes, ["p", ""], "Open (put) a URL based on the current clipboard contents in the current buffer", function () { let url = util.readFromClipboard(); - liberator.assert(url); - liberator.open(url); + dactyl.assert(url); + dactyl.open(url); }); mappings.add(myModes, ["P"], "Open (put) a URL based on the current clipboard contents in a new buffer", function () { let url = util.readFromClipboard(); - liberator.assert(url); - liberator.open(url, { from: "paste", where: liberator.NEW_TAB }); + dactyl.assert(url); + dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB }); }); // reloading @@ -1537,7 +1541,7 @@ const Buffer = Module("buffer", { "Copy selected text or current word", function () { let sel = buffer.getCurrentWord(); - liberator.assert(sel); + dactyl.assert(sel); util.copyToClipboard(sel, true); }); diff --git a/common/content/commandline.js b/common/content/commandline.js index e4c29de2..66506668 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -15,7 +15,7 @@ * this class when the chrome is ready. */ const CommandLine = Module("commandline", { - requires: ["config", "liberator", "modes", "services", "storage", "template", "util"], + requires: ["config", "dactyl", "modes", "services", "storage", "template", "util"], init: function () { const self = this; @@ -124,7 +124,7 @@ const CommandLine = Module("commandline", { ////////////////////// VARIABLES /////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ - this._completionList = ItemList("liberator-completions"); + this._completionList = ItemList("dactyl-completions"); this._completions = null; this._history = null; @@ -132,25 +132,25 @@ const CommandLine = Module("commandline", { this._lastSubstring = ""; // the containing box for the this._promptWidget and this._commandWidget - this._commandlineWidget = document.getElementById("liberator-commandline"); + this._commandlineWidget = document.getElementById("dactyl-commandline"); // the prompt for the current command, for example : or /. Can be blank - this._promptWidget = document.getElementById("liberator-commandline-prompt"); + this._promptWidget = document.getElementById("dactyl-commandline-prompt"); // the command bar which contains the current command - this._commandWidget = document.getElementById("liberator-commandline-command"); + this._commandWidget = document.getElementById("dactyl-commandline-command"); - this._messageBox = document.getElementById("liberator-message"); + this._messageBox = document.getElementById("dactyl-message"); this._commandWidget.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); this._messageBox.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); // the widget used for multiline output - this._multilineOutputWidget = document.getElementById("liberator-multiline-output"); + this._multilineOutputWidget = document.getElementById("dactyl-multiline-output"); this._outputContainer = this._multilineOutputWidget.parentNode; - this._multilineOutputWidget.contentDocument.body.id = "liberator-multiline-output-content"; + this._multilineOutputWidget.contentDocument.body.id = "dactyl-multiline-output-content"; // the widget used for multiline intput - this._multilineInputWidget = document.getElementById("liberator-multiline-input"); + this._multilineInputWidget = document.getElementById("dactyl-multiline-input"); // we need to save the mode which were in before opening the command line // this is then used if we focus the command line again without the "official" @@ -167,7 +167,7 @@ const CommandLine = Module("commandline", { this.registerCallback("submit", modes.EX, function (command) { commands.repeat = command; - liberator.execute(command); + dactyl.execute(command); }); this.registerCallback("complete", modes.EX, function (context) { context.fork("ex", 0, completion, "ex"); @@ -256,7 +256,7 @@ const CommandLine = Module("commandline", { this._setHighlightGroup(highlightGroup); this._messageBox.value = str; - liberator.triggerObserver("echoLine", str, highlightGroup, forceSingle); + dactyl.triggerObserver("echoLine", str, highlightGroup, forceSingle); if (!this._commandShown()) commandline.hide(); @@ -277,7 +277,7 @@ const CommandLine = Module("commandline", { let doc = this._multilineOutputWidget.contentDocument; let win = this._multilineOutputWidget.contentWindow; - liberator.triggerObserver("echoMultiline", str, highlightGroup); + dactyl.triggerObserver("echoMultiline", str, highlightGroup); // If it's already XML, assume it knows what it's doing. // Otherwise, white space is significant. @@ -350,7 +350,7 @@ const CommandLine = Module("commandline", { get quiet() this._quiet, set quiet(val) { this._quiet = val; - Array.forEach(document.getElementById("liberator-commandline").childNodes, function (node) { + Array.forEach(document.getElementById("dactyl-commandline").childNodes, function (node) { node.style.opacity = this._quiet || this._silent ? "0" : ""; }); }, @@ -448,7 +448,7 @@ const CommandLine = Module("commandline", { this._history = null; statusline.updateProgress(""); // we may have a "match x of y" visible - liberator.focusContent(false); + dactyl.focusContent(false); this._multilineInputWidget.collapsed = true; this._completionList.hide(); @@ -495,7 +495,7 @@ const CommandLine = Module("commandline", { * the MOW. */ echo: function echo(str, highlightGroup, flags) { - // liberator.echo uses different order of flags as it omits the highlight group, change commandline.echo argument order? --mst + // dactyl.echo uses different order of flags as it omits the highlight group, change commandline.echo argument order? --mst if (this._silent) return; @@ -505,11 +505,11 @@ const CommandLine = Module("commandline", { this._messageHistory.add({ str: str, highlight: highlightGroup }); if ((flags & this.ACTIVE_WINDOW) && window != services.get("windowWatcher").activeWindow && - services.get("windowWatcher").activeWindow.liberator) + services.get("windowWatcher").activeWindow.dactyl) return; // The DOM isn't threadsafe. It must only be accessed from the main thread. - liberator.callInMainThread(function () { + dactyl.callInMainThread(function () { if ((flags & this.DISALLOW_MULTILINE) && !this._outputContainer.collapsed) return; @@ -625,7 +625,7 @@ const CommandLine = Module("commandline", { else if (event.type == "focus") { if (!this._commandShown() && event.target == this._commandWidget.inputField) { event.target.blur(); - liberator.beep(); + dactyl.beep(); } } else if (event.type == "input") { @@ -655,7 +655,7 @@ const CommandLine = Module("commandline", { event.preventDefault(); event.stopPropagation(); - liberator.assert(this._history); + dactyl.assert(this._history); this._history.select(/Up/.test(key), !/(Page|S-)/.test(key)); } // user pressed to get completions of a command @@ -690,7 +690,7 @@ const CommandLine = Module("commandline", { /** * Multiline input events, they will come straight from - * #liberator-multiline-input in the XUL. + * #dactyl-multiline-input in the XUL. * * @param {Event} event */ @@ -722,8 +722,8 @@ const CommandLine = Module("commandline", { /** * Handle events when we are in multiline output mode, these come from - * liberator when modes.extended & modes.MULTILINE_OUTPUT and also from - * #liberator-multiline-output in the XUL. + * dactyl when modes.extended & modes.MULTILINE_OUTPUT and also from + * #dactyl-multiline-output in the XUL. * * @param {Event} event */ @@ -745,9 +745,9 @@ const CommandLine = Module("commandline", { event.preventDefault(); // FIXME: Why is this needed? --djk if (event.target.getAttribute("href") == "#") - liberator.open(event.target.textContent, where); + dactyl.open(event.target.textContent, where); else - liberator.open(event.target.href, where); + dactyl.open(event.target.href, where); } switch (key) { @@ -757,20 +757,20 @@ const CommandLine = Module("commandline", { tabs.select(parseInt(event.originalTarget.parentNode.parentNode.firstChild.textContent, 10) - 1); } else - openLink(liberator.CURRENT_TAB); + openLink(dactyl.CURRENT_TAB); break; case "": case "": case "": - openLink({ where: liberator.NEW_TAB, background: true }); + openLink({ where: dactyl.NEW_TAB, background: true }); break; case "": case "": case "": - openLink({ where: liberator.NEW_TAB, background: false }); + openLink({ where: dactyl.NEW_TAB, background: false }); break; case "": - openLink(liberator.NEW_WINDOW); + openLink(dactyl.NEW_WINDOW); break; } @@ -1039,7 +1039,7 @@ const CommandLine = Module("commandline", { */ sanitize: function (timespan) { let range = [0, Number.MAX_VALUE]; - if (liberator.has("sanitizer") && (timespan || options["sanitizetimespan"])) + if (dactyl.has("sanitizer") && (timespan || options["sanitizetimespan"])) range = Sanitizer.getClearRange(timespan || options["sanitizetimespan"]); const self = this; @@ -1082,7 +1082,7 @@ const CommandLine = Module("commandline", { this.index += diff; if (this.index < 0 || this.index > this.store.length) { this.index = util.Math.constrain(this.index, 0, this.store.length); - liberator.beep(); + dactyl.beep(); // I don't know why this kludge is needed. It // prevents the caret from moving to the end of // the input field. @@ -1305,7 +1305,7 @@ const CommandLine = Module("commandline", { for (let [, context] in Iterator(list)) { function done() !(idx >= n + context.items.length || idx == -2 && !context.items.length); while (context.incomplete && !done()) - liberator.threadYield(false, true); + dactyl.threadYield(false, true); if (done()) break; @@ -1371,7 +1371,7 @@ const CommandLine = Module("commandline", { } if (this.items.length == 0) - liberator.beep(); + dactyl.beep(); } }), @@ -1388,10 +1388,10 @@ const CommandLine = Module("commandline", { return ""; try { - arg = liberator.eval(arg); + arg = dactyl.eval(arg); } catch (e) { - liberator.echoerr(e); + dactyl.echoerr(e); return null; } @@ -1410,17 +1410,17 @@ const CommandLine = Module("commandline", { { name: "ec[ho]", description: "Echo the expression", - action: liberator.echo + action: dactyl.echo }, { name: "echoe[rr]", description: "Echo the expression as an error message", - action: liberator.echoerr + action: dactyl.echoerr }, { name: "echom[sg]", description: "Echo the expression as an informational message", - action: liberator.echomsg + action: dactyl.echomsg } ].forEach(function (command) { commands.add([command.name], @@ -1448,7 +1448,7 @@ const CommandLine = Module("commandline", { XML.ignoreWhitespace = false; let list = template.map(commandline._messageHistory.messages, function (message)
{message.str}
); - liberator.echo(list, commandline.FORCE_MULTILINE); + dactyl.echo(list, commandline.FORCE_MULTILINE); } }, { argCount: "0" }); @@ -1461,7 +1461,7 @@ const CommandLine = Module("commandline", { commands.add(["sil[ent]"], "Run a command silently", function (args) { - commandline.runSilently(function () liberator.execute(args[0], null, true)); + commandline.runSilently(function () dactyl.execute(args[0], null, true)); }, { completer: function (context) completion.ex(context), literal: 0 @@ -1497,7 +1497,7 @@ const CommandLine = Module("commandline", { mappings.add([modes.NORMAL], ["g<"], "Redisplay the last command output", function () { - liberator.assert(this._lastMowOutput); + dactyl.assert(this._lastMowOutput); this._echoMultiline(this._lastMowOutput, commandline.HL_NORMAL); }); }, @@ -1527,8 +1527,8 @@ const CommandLine = Module("commandline", { }, styles: function () { let fontSize = util.computedStyle(document.getElementById(config.mainWindowId)).fontSize; - styles.registerSheet("chrome://liberator/skin/liberator.css"); - let error = styles.addSheet(true, "font-size", "chrome://liberator/content/buffer.xhtml", + styles.registerSheet("chrome://dactyl/skin/dactyl.css"); + let error = styles.addSheet(true, "font-size", "chrome://dactyl/content/buffer.xhtml", "body { font-size: " + fontSize + "; }"); } }); @@ -1547,7 +1547,7 @@ const ItemList = Class("ItemList", { var iframe = document.getElementById(id); if (!iframe) { - liberator.log("No iframe with id: " + id + " found, strange things may happen!"); // "The truth is out there..." -- djk + dactyl.log("No iframe with id: " + id + " found, strange things may happen!"); // "The truth is out there..." -- djk return; // XXX } @@ -1573,7 +1573,7 @@ const ItemList = Class("ItemList", { _autoSize: function () { if (this._container.collapsed) - this._div.style.minWidth = document.getElementById("liberator-commandline").scrollWidth + "px"; + this._div.style.minWidth = document.getElementById("dactyl-commandline").scrollWidth + "px"; this._minHeight = Math.max(this._minHeight, this._divNodes.completions.getBoundingClientRect().bottom); this._container.height = this._minHeight; @@ -1706,7 +1706,7 @@ const ItemList = Class("ItemList", { this._divNodes.noCompletions.style.display = haveCompletions ? "none" : "block"; - this._completionElements = util.evaluateXPath("//xhtml:div[@liberator:highlight='CompItem']", this._doc); + this._completionElements = util.evaluateXPath("//xhtml:div[@dactyl:highlight='CompItem']", this._doc); return true; }, @@ -1780,7 +1780,7 @@ const ItemList = Class("ItemList", { //if (index == 0) // this.start = now; //if (index == Math.min(len - 1, 100)) - // liberator.dump({ time: Date.now() - this.start }); + // dactyl.dump({ time: Date.now() - this.start }); }, onEvent: function onEvent(event) false diff --git a/common/content/commands.js b/common/content/commands.js index c774bc28..a3c81d97 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -80,7 +80,7 @@ const Command = Class("Command", { return; args.count = count; args.bang = bang; - liberator.trapErrors(self.action, self, args, modifiers); + dactyl.trapErrors(self.action, self, args, modifiers); } if (this.hereDoc) { @@ -188,7 +188,7 @@ const Command = Class("Command", { /** * @property {function} Should return an array of Objects suitable * to be passed to {@link Commands#commandToString}, one for each past - * invocation which should be restored on subsequent @liberator + * invocation which should be restored on subsequent @dactyl * startups. */ serial: null, @@ -309,7 +309,7 @@ const Commands = Module("commands", { if (command.user && replace) commands.removeUserCommand(command.name); else { - liberator.log("Warning: :" + command.name + " already exists, NOT replacing existing command.", 1); + dactyl.log("Warning: :" + command.name + " already exists, NOT replacing existing command.", 1); return false; } } @@ -538,7 +538,7 @@ const Commands = Module("commands", { if (complete) complete.message = error; else - liberator.echoerr(error); + dactyl.echoerr(error); } outer: @@ -571,7 +571,7 @@ const Commands = Module("commands", { let sep = sub[optname.length]; if (sep == "=" || /\s/.test(sep) && opt[1] != this.OPTION_NOARG) { [count, arg, quote, error] = getNextArg(sub.substr(optname.length + 1)); - liberator.assert(!error, error); + dactyl.assert(!error, error); // if we add the argument to an option after a space, it MUST not be empty if (sep != "=" && !quote && arg.length == 0) @@ -584,7 +584,7 @@ const Commands = Module("commands", { let context = null; if (!complete && quote) { - liberator.echoerr("Invalid argument for option " + optname); + dactyl.echoerr("Invalid argument for option " + optname); return null; } @@ -655,18 +655,18 @@ const Commands = Module("commands", { // if not an option, treat this token as an argument let [count, arg, quote, error] = getNextArg(sub); - liberator.assert(!error, error); + dactyl.assert(!error, error); if (complete) { args.quote = Commands.complQuote[quote] || Commands.complQuote[""]; args.completeFilter = arg || ""; } else if (count == -1) { - liberator.echoerr("Error parsing arguments: " + arg); + dactyl.echoerr("Error parsing arguments: " + arg); return null; } else if (!onlyArgumentsRemaining && /^-/.test(arg)) { - liberator.echoerr("Invalid option: " + arg); + dactyl.echoerr("Invalid option: " + arg); return null; } @@ -703,7 +703,7 @@ const Commands = Module("commands", { if (args.length == 0 && /^[1+]$/.test(argCount) || literal != null && /[1+]/.test(argCount) && !/\S/.test(args.literalArg || "")) { if (!complete) { - liberator.echoerr("E471: Argument required"); + dactyl.echoerr("E471: Argument required"); return null; } } @@ -816,7 +816,7 @@ const Commands = Module("commands", { arg += res[2].replace(/\\(.)/g, "$1"); break; - case "vimperator": + case "pentadactyl": if ((res = str.match(/^()((?:[^\\\s"']|\\.)+)((?:\\$)?)/))) arg += res[2].replace(/\\(.)/g, "$1"); else if ((res = str.match(/^(")((?:[^\\"]|\\.)*)("?)/))) @@ -864,10 +864,10 @@ const Commands = Module("commands", { function (count) { if (commands.repeat) { for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) - liberator.execute(commands.repeat); + dactyl.execute(commands.repeat); } else - liberator.echoerr("E30: No previous command line"); + dactyl.echoerr("E30: No previous command line"); }, { count: true }); }, @@ -923,7 +923,7 @@ const Commands = Module("commands", { } } catch (e) { - liberator.reportError(e); + dactyl.reportError(e); } } } @@ -944,7 +944,7 @@ const Commands = Module("commands", { count: this.count && args.count }; - liberator.execute(commands.replaceTokens(this.replacementText, tokens)); + dactyl.execute(commands.replaceTokens(this.replacementText, tokens)); } // TODO: offer completion.ex? @@ -968,7 +968,7 @@ const Commands = Module("commands", { function (args) { let cmd = args[0]; - liberator.assert(!/\W/.test(cmd || ''), "E182: Invalid command name"); + dactyl.assert(!/\W/.test(cmd || ''), "E182: Invalid command name"); if (args.literalArg) { let nargsOpt = args["-nargs"] || "0"; @@ -984,15 +984,15 @@ const Commands = Module("commands", { completeOpt = completeOpt.substr(7); completeFunc = function () { try { - var completer = liberator.eval(completeOpt); + var completer = dactyl.eval(completeOpt); if (!(completer instanceof Function)) throw new TypeError("User-defined custom completer " + completeOpt.quote() + " is not a function"); } catch (e) { - liberator.echo(":" + this.name + " ..."); - liberator.echoerr("E117: Unknown function: " + completeOpt); - liberator.log(e); + dactyl.echo(":" + this.name + " ..."); + dactyl.echoerr("E117: Unknown function: " + completeOpt); + dactyl.log(e); return undefined; } return completer.apply(this, Array.slice(arguments)); @@ -1013,7 +1013,7 @@ const Commands = Module("commands", { }, args.bang); if (!added) - liberator.echoerr("E174: Command already exists: add ! to replace it"); + dactyl.echoerr("E174: Command already exists: add ! to replace it"); } else { function completerToString(completer) { @@ -1041,7 +1041,7 @@ const Commands = Module("commands", { commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); } else - liberator.echomsg("No user-defined commands found"); + dactyl.echomsg("No user-defined commands found"); } }, { bang: true, @@ -1100,7 +1100,7 @@ const Commands = Module("commands", { if (commands.get(name)) commands.removeUserCommand(name); else - liberator.echoerr("E184: No such user-defined command: " + name); + dactyl.echoerr("E184: No such user-defined command: " + name); }, { argCount: "1", completer: function (context) completion.userCommand(context) diff --git a/common/content/completion.js b/common/content/completion.js index d86d6a18..510e7922 100755 --- a/common/content/completion.js +++ b/common/content/completion.js @@ -217,7 +217,7 @@ const CompletionContext = Class("CompletionContext", { return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring }; } catch (e) { - liberator.reportError(e); + dactyl.reportError(e); return { start: 0, items: [], longestAllSubstring: "" }; } }, @@ -260,7 +260,7 @@ const CompletionContext = Class("CompletionContext", { this._completions = items; let self = this; if (this.updateAsync && !this.noUpdate) - liberator.callInMainThread(function () { self.onUpdate.call(self); }); + dactyl.callInMainThread(function () { self.onUpdate.call(self); }); }, get createRow() this._createRow || template.completionRow, // XXX @@ -325,8 +325,8 @@ const CompletionContext = Class("CompletionContext", { let lock = {}; this.cache.backgroundLock = lock; this.incomplete = true; - let thread = this.getCache("backgroundThread", liberator.newThread); - liberator.callAsync(thread, this, function () { + let thread = this.getCache("backgroundThread", dactyl.newThread); + dactyl.callAsync(thread, this, function () { if (this.cache.backgroundLock != lock) return; let items = this.generate(); @@ -609,7 +609,7 @@ const CompletionContext = Class("CompletionContext", { wait: function wait(interruptable, timeout) { let end = Date.now() + timeout; while (this.incomplete && (!timeout || Date.now() > end)) - liberator.threadYield(false, interruptable); + dactyl.threadYield(false, interruptable); return this.incomplete; } }, { diff --git a/common/content/configbase.js b/common/content/configbase.js index 478a1417..e43033f9 100644 --- a/common/content/configbase.js +++ b/common/content/configbase.js @@ -40,7 +40,7 @@ const ConfigBase = Class(ModuleBase, { /** * @property {string[]} A list of features available in this * application. Used extensively in feature test macros. Use - * liberator.has(feature) to check for a feature's presence + * dactyl.has(feature) to check for a feature's presence * in this array. */ features: [], @@ -56,7 +56,7 @@ const ConfigBase = Class(ModuleBase, { hostApplication: null, /** - * @property {function} Called on liberator startup to allow for any + * @property {function} Called on dactyl startup to allow for any * arbitrary application-specific initialization code. */ init: function () {}, @@ -75,7 +75,7 @@ const ConfigBase = Class(ModuleBase, { /** * @property {[[]]} An array of application specific mode specifications. * The values of each mode are passed to modes.addMode during - * liberator startup. + * dactyl startup. */ modes: [], @@ -92,8 +92,8 @@ const ConfigBase = Class(ModuleBase, { get outputHeight() config.browser.mPanelContainer.boxObject.height, /** - * @property {[string]} A list of extra scripts in the liberator or - * application namespaces which should be loaded before liberator + * @property {[string]} A list of extra scripts in the dactyl or + * application namespaces which should be loaded before dactyl * initialization. */ scripts: [], diff --git a/common/content/liberator-overlay.js b/common/content/dactyl-overlay.js similarity index 91% rename from common/content/liberator-overlay.js rename to common/content/dactyl-overlay.js index e9461df4..d7a00b41 100644 --- a/common/content/liberator-overlay.js +++ b/common/content/dactyl-overlay.js @@ -6,7 +6,7 @@ (function () { const modules = {}; - const BASE = "chrome://liberator/content/"; + const BASE = "chrome://dactyl/content/"; modules.modules = modules; @@ -23,7 +23,7 @@ continue; if (Components.utils.reportError) Components.utils.reportError(e); - dump("liberator: Loading script " + script + ": " + e + "\n"); + dump("dactyl: Loading script " + script + ": " + e + "\n"); dump(e.stack + "\n"); } } @@ -40,7 +40,7 @@ "completion.js", "configbase.js", "config.js", - "liberator.js", + "dactyl.js", "editor.js", "events.js", "finder.js", diff --git a/common/content/liberator.js b/common/content/dactyl.js similarity index 85% rename from common/content/liberator.js rename to common/content/dactyl.js index 8214b461..fa6c91f1 100644 --- a/common/content/liberator.js +++ b/common/content/dactyl.js @@ -13,23 +13,23 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm", modules); const plugins = { __proto__: modules }; const userContext = { __proto__: modules }; -const EVAL_ERROR = "__liberator_eval_error"; -const EVAL_RESULT = "__liberator_eval_result"; -const EVAL_STRING = "__liberator_eval_string"; +const EVAL_ERROR = "__dactyl_eval_error"; +const EVAL_RESULT = "__dactyl_eval_result"; +const EVAL_STRING = "__dactyl_eval_string"; // Move elsewhere? const Storage = Module("storage", { requires: ["services"], init: function () { - Components.utils.import("resource://liberator/storage.jsm", this); + Components.utils.import("resource://dactyl/storage.jsm", this); modules.Timer = this.Timer; // Fix me, please. try { let infoPath = services.create("file"); infoPath.initWithPath(File.expandPath(IO.runtimePath.replace(/,.*/, ""))); infoPath.append("info"); - infoPath.append(liberator.profileName); + infoPath.append(dactyl.profileName); this.storage.infoPath = infoPath; } catch (e) {} @@ -51,11 +51,11 @@ const FailedAssertion = Class("FailedAssertion", Error, { } }); -const Liberator = Module("liberator", { +const Dactyl = Module("dactyl", { requires: ["config", "services"], init: function () { - window.liberator = this; + window.dactyl = this; window.liberator = this; modules.liberator = this; this.observers = {}; @@ -69,14 +69,14 @@ const Liberator = Module("liberator", { /** @property {string} The name of the current user profile. */ this.profileName = services.get("directory").get("ProfD", Ci.nsIFile).leafName.replace(/^.+?\./, ""); - config.features.push(Liberator.getPlatformFeature()); + config.features.push(Dactyl.getPlatformFeature()); }, destroy: function () { autocommands.trigger(config.name + "LeavePre", {}); storage.saveAll(); - liberator.triggerObserver("shutdown", null); - liberator.dump("All liberator modules destroyed\n"); + dactyl.triggerObserver("shutdown", null); + dactyl.dump("All dactyl modules destroyed\n"); autocommands.trigger(config.name + "Leave", {}); }, @@ -87,7 +87,7 @@ const Liberator = Module("liberator", { get mode() modes.main, set mode(value) modes.main = value, - get menuItems() Liberator.getMenuItems(), + get menuItems() Dactyl.getMenuItems(), /** @property {Element} The currently focused element. */ get focus() document.commandDispatcher.focusedElement, @@ -135,15 +135,15 @@ const Liberator = Module("liberator", { forceNewTab: false, forceNewWindow: false, - /** @property {string} The Liberator version string. */ + /** @property {string} The Dactyl version string. */ version: "@VERSION@ (created: @DATE@)", // these VERSION and DATE tokens are replaced by the Makefile /** * @property {Object} The map of command-line options. These are * specified in the argument to the host application's -{config.name} - * option. E.g. $ firefox -vimperator '+u=/tmp/rcfile ++noplugin' + * option. E.g. $ firefox -pentadactyl '+u=/tmp/rcfile ++noplugin' * Supported options: - * +u=RCFILE Use RCFILE instead of .vimperatorrc. + * +u=RCFILE Use RCFILE instead of .pentadactylrc. * ++noplugin Don't load plugins. */ commandLineOptions: { @@ -184,7 +184,7 @@ const Liberator = Module("liberator", { // FIXME: popups clear the command line if (options["visualbell"]) { // flash the visual bell - let popup = document.getElementById("liberator-visualbell"); + let popup = document.getElementById("dactyl-visualbell"); let win = config.visualbellWindow; let rect = win.getBoundingClientRect(); let width = rect.right - rect.left; @@ -199,7 +199,7 @@ const Liberator = Module("liberator", { let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); soundService.beep(); } - return false; // so you can do: if (...) return liberator.beep(); + return false; // so you can do: if (...) return dactyl.beep(); }, /** @@ -270,7 +270,7 @@ const Liberator = Module("liberator", { let stack = Error().stack.replace(/(?:.*\n){2}/, ""); if (frames != null) [stack] = stack.match(RegExp("(?:.*\n){0," + frames + "}")); - liberator.dump((msg || "Stack") + "\n" + stack + "\n"); + dactyl.dump((msg || "Stack") + "\n" + stack + "\n"); }, /** @@ -301,7 +301,7 @@ const Liberator = Module("liberator", { str = str.fileName + ":" + str.lineNumber + ": " + str; if (options["errorbells"]) - liberator.beep(); + dactyl.beep(); commandline.echo(str, commandline.HL_ERRORMSG, flags); }, @@ -318,20 +318,7 @@ const Liberator = Module("liberator", { * See {@link CommandLine#echo}. */ echomsg: function (str, verbosity, flags) { - // TODO: is there a reason for this? --djk - // yes, it doesn't show the MOW on startup if you have e.g. some qmarks in your vimperatorrc. - // Feel free to add another flag like DONT_OPEN_MULTILINE if really needed --mst - // - // But it's _supposed_ to show the MOW on startup when there are - // messages, surely? As far as I'm concerned it essentially works - // exactly as it should with the DISALLOW_MULTILINE flag removed. - // Sending N messages to the command line in a row and having them - // overwrite each other is completely broken. I also think many of - // those messages like "Added quick mark" are plain silly but if - // you don't like them you can set verbose=0, or use :silent when - // someone adds it. I reckon another flag and 'class' of messages - // is just going to unnecessarily complicate things. --djk - flags |= commandline.APPEND_TO_MESSAGES; // | commandline.DISALLOW_MULTILINE; + flags |= commandline.APPEND_TO_MESSAGES; if (verbosity == null) verbosity = 0; // verbosity level is exclusionary @@ -362,7 +349,7 @@ const Liberator = Module("liberator", { context[EVAL_ERROR] = null; context[EVAL_STRING] = str; context[EVAL_RESULT] = null; - this.loadScript("chrome://liberator/content/eval.js", context); + this.loadScript("chrome://dactyl/content/eval.js", context); if (context[EVAL_ERROR]) { try { context[EVAL_ERROR].fileName = io.sourcing.file; @@ -383,7 +370,7 @@ const Liberator = Module("liberator", { // partial sixth level expression evaluation // TODO: what is that really needed for, and where could it be used? // Or should it be removed? (c) Viktor - // Better name? See other liberator.eval() + // Better name? See other dactyl.eval() // I agree, the name is confusing, and so is the // description --Kris evalExpression: function (string) { @@ -393,7 +380,7 @@ const Liberator = Module("liberator", { if (matches) { let opt = this.options.get(matches[1]); - liberator.assert(opt, "E113: Unknown option: " + matches[1]); + dactyl.assert(opt, "E113: Unknown option: " + matches[1]); let type = opt.type; let value = opt.getter(); @@ -442,7 +429,7 @@ const Liberator = Module("liberator", { if (command === null) { err = "E492: Not a " + config.name.toLowerCase() + " command: " + str; - liberator.focusContent(); + dactyl.focusContent(); } else if (command.action === null) err = "E666: Internal error: command.action === null"; // TODO: need to perform this test? -- djk @@ -451,7 +438,7 @@ const Liberator = Module("liberator", { else if (special && !command.bang) err = "E477: No ! allowed"; - liberator.assert(!err, err); + dactyl.assert(!err, err); if (!silent) commandline.command = str.replace(/^\s*:\s*/, ""); @@ -485,14 +472,14 @@ const Liberator = Module("liberator", { } catch (e) {} - if (clearFocusedElement && liberator.focus) - liberator.focus.blur(); - if (elem && elem != liberator.focus) + if (clearFocusedElement && dactyl.focus) + dactyl.focus.blur(); + if (elem && elem != dactyl.focus) elem.focus(); }, /** - * Returns whether this Liberator extension supports feature. + * Returns whether this Dactyl extension supports feature. * * @param {string} feature The feature name. * @returns {boolean} @@ -519,7 +506,7 @@ const Liberator = Module("liberator", { * @returns {string} */ findHelp: function (topic, unchunked) { - if (topic in services.get("liberator:").FILE_MAP) + if (topic in services.get("dactyl:").FILE_MAP) return topic; unchunked = !!unchunked; let items = completion._runCompleter("help", topic, null, unchunked).items; @@ -544,13 +531,18 @@ const Liberator = Module("liberator", { * Initialize the help system. */ initHelp: function () { - if(!this.helpInitialized) { - let namespaces = [config.name.toLowerCase(), "liberator"]; - services.get("liberator:").init({}); + if ("noscriptOverlay" in window) { + noscriptOverlay.safeAllow("chrome-data:", true, false); + noscriptOverlay.safeAllow("dactyl:", true, false); + } - let tagMap = services.get("liberator:").HELP_TAGS; - let fileMap = services.get("liberator:").FILE_MAP; - let overlayMap = services.get("liberator:").OVERLAY_MAP; + if(!this.helpInitialized) { + let namespaces = [config.name.toLowerCase(), "dactyl"]; + services.get("dactyl:").init({}); + + let tagMap = services.get("dactyl:").HELP_TAGS; + let fileMap = services.get("dactyl:").FILE_MAP; + let overlayMap = services.get("dactyl:").OVERLAY_MAP; // Left as an XPCOM instantiation so it can easilly be moved // into XPCOM code. @@ -583,7 +575,7 @@ const Liberator = Module("liberator", { tagMap[elem.value] = file; } - const XSLT = XSLTProcessor("chrome://liberator/content/help-single.xsl"); + const XSLT = XSLTProcessor("chrome://dactyl/content/help-single.xsl"); // Scrape the list of help files from all.xml // Always process main and overlay files, since XSLTProcessor and @@ -591,7 +583,7 @@ const Liberator = Module("liberator", { tagMap.all = "all"; let files = findHelpFile("all").map(function (doc) [f.value for (f in util.evaluateXPath( - "//liberator:include/@href", doc))]); + "//dactyl:include/@href", doc))]); // Scrape the tags from the rest of the help files. util.Array.flatten(files).forEach(function (file) { @@ -602,7 +594,6 @@ const Liberator = Module("liberator", { // Process plugin help entries. XML.ignoreWhiteSpace = false; - XML.prettyPrinting = false; XML.prettyPrinting = true; // Should be false, but ignoreWhiteSpace=false doesn't work correctly. This is the lesser evil. XML.prettyIndent = 4; @@ -613,17 +604,18 @@ const Liberator = Module("liberator", { context.INFO; let help = '\n' + - '\n' + - '' + + '\n' + + '' +

Using Plugins

+ {body}
.toXMLString(); fileMap["plugins"] = function () ['text/xml;charset=UTF-8', help]; - addTags("plugins", util.httpGet("liberator://help/plugins").responseXML); + addTags("plugins", util.httpGet("dactyl://help/plugins").responseXML); this.helpInitialized = true; } }, @@ -637,20 +629,21 @@ const Liberator = Module("liberator", { * @returns {string} */ help: function (topic, unchunked) { - liberator.initHelp(); + dactyl.initHelp(); if (!topic) { let helpFile = unchunked ? "all" : options["helpfile"]; - if (helpFile in services.get("liberator:").FILE_MAP) - liberator.open("liberator://help/" + helpFile, { from: "help" }); + + if (helpFile in services.get("dactyl:").FILE_MAP) + dactyl.open("dactyl://help/" + helpFile, { from: "help" }); else - liberator.echomsg("Sorry, help file " + helpFile.quote() + " not found"); + dactyl.echomsg("Sorry, help file " + helpFile.quote() + " not found"); return; } let page = this.findHelp(topic, unchunked); - liberator.assert(page != null, "E149: Sorry, no help for " + topic); + dactyl.assert(page != null, "E149: Sorry, no help for " + topic); - liberator.open("liberator://help/" + page, { from: "help" }); + dactyl.open("dactyl://help/" + page, { from: "help" }); if (options.get("activate").has("all", "help")) content.postMessage("fragmentChange", "*"); }, @@ -664,17 +657,17 @@ const Liberator = Module("liberator", { loadPlugins: function () { function sourceDirectory(dir) { - liberator.assert(dir.isReadable(), "E484: Can't open file " + dir.path); + dactyl.assert(dir.isReadable(), "E484: Can't open file " + dir.path); - liberator.log("Sourcing plugin directory: " + dir.path + "...", 3); + dactyl.log("Sourcing plugin directory: " + dir.path + "...", 3); dir.readDirectory(true).forEach(function (file) { - if (file.isFile() && /\.(js|vimp)$/i.test(file.path) && !(file.path in liberator.pluginFiles)) { + if (file.isFile() && /\.(js|vimp)$/i.test(file.path) && !(file.path in dactyl.pluginFiles)) { try { io.source(file.path, false); - liberator.pluginFiles[file.path] = true; + dactyl.pluginFiles[file.path] = true; } catch (e) { - liberator.reportError(e); + dactyl.reportError(e); } } else if (file.isDirectory()) @@ -685,15 +678,15 @@ const Liberator = Module("liberator", { let dirs = io.getRuntimeDirectories("plugin"); if (dirs.length == 0) { - liberator.log("No user plugin directory found", 3); + dactyl.log("No user plugin directory found", 3); return; } - liberator.echomsg('Searching for "plugin/**/*.{js,vimp}" in "' + dactyl.echomsg('Searching for "plugin/**/*.{js,vimp}" in "' + [dir.path.replace(/.plugin$/, "") for ([, dir] in Iterator(dirs))].join(",") + '"', 2); dirs.forEach(function (dir) { - liberator.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3); + dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3); sourceDirectory(dir); }); }, @@ -715,7 +708,7 @@ const Liberator = Module("liberator", { // options does not exist at the very beginning if (modules.options) - verbose = options.getPref("extensions.liberator.loglevel", 0); + verbose = options.getPref("extensions.dactyl.loglevel", 0); if (level > verbose) return; @@ -736,25 +729,25 @@ const Liberator = Module("liberator", { * or: * [["url1", postdata1], ["url2", postdata2], ...] * @param {number|Object} where If ommited, CURRENT_TAB is assumed but NEW_TAB - * is set when liberator.forceNewTab is true. + * is set when dactyl.forceNewTab is true. * @param {boolean} force Don't prompt whether to open more than 20 * tabs. * @returns {boolean} */ open: function (urls, params, force) { // convert the string to an array of converted URLs - // -> see liberator.stringToURLArray for more details + // -> see dactyl.stringToURLArray for more details // // This is strange. And counterintuitive. Is it really // necessary? --Kris if (typeof urls == "string") - urls = liberator.stringToURLArray(urls); + urls = dactyl.stringToURLArray(urls); if (urls.length > 20 && !force) { commandline.input("This will open " + urls.length + " new tabs. Would you like to continue? (yes/[no]) ", function (resp) { if (resp && resp.match(/^y(es)?$/i)) - liberator.open(urls, params, true); + dactyl.open(urls, params, true); }); return; } @@ -768,11 +761,11 @@ const Liberator = Module("liberator", { if (params[opt]) flags |= Ci.nsIWebNavigation["LOAD_FLAGS_" + flag]; - let where = params.where || liberator.CURRENT_TAB; - let background = ("background" in params) ? params.background : params.where == liberator.NEW_BACKGROUND_TAB; - if ("from" in params && liberator.has("tabs")) { + let where = params.where || dactyl.CURRENT_TAB; + let background = ("background" in params) ? params.background : params.where == dactyl.NEW_BACKGROUND_TAB; + if ("from" in params && dactyl.has("tabs")) { if (!('where' in params) && options.get("newtab").has("all", params.from)) - where = liberator.NEW_TAB; + where = dactyl.NEW_TAB; background = !options.get("activate").has("all", params.from); } @@ -787,13 +780,13 @@ const Liberator = Module("liberator", { // decide where to load the first url switch (where) { - case liberator.CURRENT_TAB: + case dactyl.CURRENT_TAB: browser.loadURIWithFlags(url, flags, null, null, postdata); break; - case liberator.NEW_TAB: - if (!liberator.has("tabs")) { - open(urls, liberator.NEW_WINDOW); + case dactyl.NEW_TAB: + if (!dactyl.has("tabs")) { + open(urls, dactyl.NEW_WINDOW); return; } @@ -803,7 +796,7 @@ const Liberator = Module("liberator", { }); break; - case liberator.NEW_WINDOW: + case dactyl.NEW_WINDOW: window.open(); let win = services.get("windowMediator").getMostRecentWindow("navigator:browser"); win.loadURI(url, null, postdata); @@ -814,12 +807,12 @@ const Liberator = Module("liberator", { catch(e) {} } - if (liberator.forceNewTab) - where = liberator.NEW_TAB; - else if (liberator.forceNewWindow) - where = liberator.NEW_WINDOW; + if (dactyl.forceNewTab) + where = dactyl.NEW_TAB; + else if (dactyl.forceNewWindow) + where = dactyl.NEW_WINDOW; else if (!where) - where = liberator.CURRENT_TAB; + where = dactyl.CURRENT_TAB; for (let [, url] in Iterator(urls)) { open(url, where); @@ -940,12 +933,12 @@ const Liberator = Module("liberator", { catch (e) { if (e instanceof FailedAssertion) { if (e.message) - liberator.echoerr(e.message); + dactyl.echoerr(e.message); else - liberator.beep(); + dactyl.beep(); } else - liberator.reportError(e); + dactyl.reportError(e); return undefined; } }, @@ -969,14 +962,14 @@ const Liberator = Module("liberator", { if (!(k in obj)) obj[k] = v; } - if (liberator.storeErrors) { + if (dactyl.storeErrors) { let errors = storage.newArray("errors", { store: false }); errors.toString = function () [String(v[0]) + "\n" + v[1] for ([k, v] in this)].join("\n\n"); errors.push([new Date, obj + obj.stack]); } - liberator.dump(String(error)); - liberator.dump(obj); - liberator.dump(""); + dactyl.dump(String(error)); + dactyl.dump(obj); + dactyl.dump(""); } catch (e) { window.dump(e); } }, @@ -1007,8 +1000,8 @@ const Liberator = Module("liberator", { }, /** - * Parses a Liberator command-line string i.e. the value of the - * -liberator command-line option. + * Parses a Dactyl command-line string i.e. the value of the + * -dactyl command-line option. * * @param {string} cmdline The string to parse for command-line * options. @@ -1044,10 +1037,10 @@ const Liberator = Module("liberator", { threadYield: function (flush, interruptable) { let mainThread = services.get("threadManager").mainThread; - liberator.interrupted = false; + dactyl.interrupted = false; do { mainThread.processNextEvent(!flush); - if (liberator.interrupted) + if (dactyl.interrupted) throw new Error("Interrupted"); } while (flush === true && mainThread.hasPendingEvents()); @@ -1136,13 +1129,13 @@ const Liberator = Module("liberator", { // show a usage index either in the MOW or as a full help page showHelpIndex: function (tag, items, inMow) { if (inMow) - liberator.echo(template.usage(items), commandline.FORCE_MULTILINE); + dactyl.echo(template.usage(items), commandline.FORCE_MULTILINE); else - liberator.help(tag); + dactyl.help(tag); } }, { - // Only general options are added here, which are valid for all Liberator extensions + // Only general options are added here, which are valid for all Dactyl extensions options: function () { options.add(["errorbells", "eb"], "Ring the bell when an error message is displayed", @@ -1287,31 +1280,31 @@ const Liberator = Module("liberator", { mappings: function () { mappings.add(modes.all, [""], "Open the help page", - function () { liberator.help(); }); + function () { dactyl.help(); }); - if (liberator.has("session")) { + if (dactyl.has("session")) { mappings.add([modes.NORMAL], ["ZQ"], "Quit and don't save the session", - function () { liberator.quit(false); }); + function () { dactyl.quit(false); }); } mappings.add([modes.NORMAL], ["ZZ"], "Quit and save the session", - function () { liberator.quit(true); }); + function () { dactyl.quit(true); }); }, commands: function () { commands.add(["addo[ns]"], "Manage available Extensions and Themes", function () { - liberator.open("chrome://mozapps/content/extensions/extensions.xul", + dactyl.open("chrome://mozapps/content/extensions/extensions.xul", { from: "addons" }); }, { argCount: "0" }); commands.add(["beep"], "Play a system beep", // Play? Wrong word. Implies some kind of musicality. --Kris - function () { liberator.beep(); }, + function () { dactyl.beep(); }, { argCount: "0" }); commands.add(["dia[log]"], @@ -1320,11 +1313,11 @@ const Liberator = Module("liberator", { let arg = args[0]; try { - liberator.assert(args[0] in config.dialogs, "E475: Invalid argument: " + arg); + dactyl.assert(args[0] in config.dialogs, "E475: Invalid argument: " + arg); config.dialogs[args[0]][1](); } catch (e) { - liberator.echoerr("Error opening " + arg.quote() + ": " + e); + dactyl.echoerr("Error opening " + arg.quote() + ": " + e); } }, { argCount: "1", @@ -1339,9 +1332,9 @@ const Liberator = Module("liberator", { "Execute the specified menu item from the command line", function (args) { let arg = args.literalArg; - let items = Liberator.getMenuItems(); + let items = Dactyl.getMenuItems(); - liberator.assert(items.some(function (i) i.fullMenuPath == arg), + dactyl.assert(items.some(function (i) i.fullMenuPath == arg), "E334: Menu not found: " + arg); for (let [, item] in Iterator(items)) { @@ -1363,11 +1356,11 @@ const Liberator = Module("liberator", { // from quoted args function (args) { try { - let cmd = liberator.eval(args.string); - liberator.execute(cmd, null, true); + let cmd = dactyl.eval(args.string); + dactyl.execute(cmd, null, true); } catch (e) { - liberator.echoerr(e); + dactyl.echoerr(e); } }); @@ -1451,9 +1444,9 @@ const Liberator = Module("liberator", { else if (file.isReadable() && file.isFile()) AddonManager.getInstallForFile(file, callResult("install"), "application/x-xpinstall"); else if (file.isDirectory()) - liberator.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); + dactyl.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); else - liberator.echoerr("E484: Can't open file " + file.path); + dactyl.echoerr("E484: Can't open file " + file.path); }, { argCount: "1", completer: function (context) { @@ -1487,9 +1480,9 @@ const Liberator = Module("liberator", { function (args) { let name = args[0]; if (args.bang) - liberator.assert(!name, "E488: Trailing characters"); + dactyl.assert(!name, "E488: Trailing characters"); else - liberator.assert(name, "E471: Argument required"); + dactyl.assert(name, "E471: Argument required"); AddonManager.getAddonsByTypes(["extension"], function (list) { if (!args.bang) @@ -1514,11 +1507,11 @@ const Liberator = Module("liberator", { AddonManager.getAddonsByTypes(["extension"], function (list) { list = list.filter(function (extension) extension.name == args[0]); if (!list.length || !list[0].optionsURL) - liberator.echoerr("E474: Invalid argument"); + dactyl.echoerr("E474: Invalid argument"); else if (args.bang) window.openDialog(list[0].optionsURL, "_blank", "chrome"); else - liberator.open(list[0].optionsURL, { from: "extoptions" }); + dactyl.open(list[0].optionsURL, { from: "extoptions" }); }); }, { argCount: "1", @@ -1559,9 +1552,9 @@ const Liberator = Module("liberator", { } else { if (filter) - liberator.echoerr("Exxx: No extension matching \"" + filter + "\""); + dactyl.echoerr("Exxx: No extension matching \"" + filter + "\""); else - liberator.echoerr("No extensions installed"); + dactyl.echoerr("No extensions installed"); } }); }, @@ -1571,7 +1564,7 @@ const Liberator = Module("liberator", { commands.add(["exu[sage]"], "List all Ex commands with a short description", - function (args) { Liberator.showHelpIndex("ex-cmd-index", commands, args.bang); }, { + function (args) { Dactyl.showHelpIndex("ex-cmd-index", commands, args.bang); }, { argCount: "0", bang: true }); @@ -1590,9 +1583,9 @@ const Liberator = Module("liberator", { commands.add([command.name], command.description, function (args) { - liberator.assert(!args.bang, "E478: Don't panic!"); + dactyl.assert(!args.bang, "E478: Don't panic!"); - liberator.help(args.literalArg, unchunked); + dactyl.help(args.literalArg, unchunked); }, { argCount: "?", bang: true, @@ -1605,15 +1598,15 @@ const Liberator = Module("liberator", { "Run a JavaScript command through eval()", function (args) { if (args.bang) { // open JavaScript console - liberator.open("chrome://global/content/console.xul", + dactyl.open("chrome://global/content/console.xul", { from: "javascript" }); } else { try { - liberator.eval(args.string); + dactyl.eval(args.string); } catch (e) { - liberator.echoerr(e); + dactyl.echoerr(e); } } }, { @@ -1625,7 +1618,7 @@ const Liberator = Module("liberator", { commands.add(["loadplugins", "lpl"], "Load all plugins immediately", - function () { liberator.loadPlugins(); }, + function () { dactyl.loadPlugins(); }, { argCount: "0" }); commands.add(["norm[al]"], @@ -1638,18 +1631,18 @@ const Liberator = Module("liberator", { commands.add(["optionu[sage]"], "List all options with a short description", - function (args) { Liberator.showHelpIndex("option-index", options, args.bang); }, { + function (args) { Dactyl.showHelpIndex("option-index", options, args.bang); }, { argCount: "0", bang: true }); commands.add(["q[uit]"], - liberator.has("tabs") ? "Quit current tab" : "Quit application", + dactyl.has("tabs") ? "Quit current tab" : "Quit application", function (args) { - if (liberator.has("tabs")) + if (dactyl.has("tabs")) tabs.remove(config.browser.mCurrentTab, 1, false, 1); else - liberator.quit(false, args.bang); + dactyl.quit(false, args.bang); }, { argCount: "0", bang: true @@ -1657,7 +1650,7 @@ const Liberator = Module("liberator", { commands.add(["res[tart]"], "Force " + config.name + " to restart", - function () { liberator.restart(); }, + function () { dactyl.restart(); }, { argCount: "0" }); var toolbox = document.getElementById("navigator-toolbox"); @@ -1670,7 +1663,7 @@ const Liberator = Module("liberator", { commands.add(names, desc, function (args) { let toolbar = findToolbar(args[0]); - liberator.assert(toolbar, "E474: Invalid argument"); + dactyl.assert(toolbar, "E474: Invalid argument"); action(toolbar); }, { argcount: "1", @@ -1701,9 +1694,9 @@ const Liberator = Module("liberator", { args = args.string; if (args[0] == ":") - var method = function () liberator.execute(args, null, true); + var method = function () dactyl.execute(args, null, true); else - method = liberator.eval("(function () {" + args + "})"); + method = dactyl.eval("(function () {" + args + "})"); try { if (count > 1) { @@ -1756,13 +1749,13 @@ const Liberator = Module("liberator", { let afterTime = Date.now(); if (afterTime - beforeTime >= 100) - liberator.echo("Total time: " + ((afterTime - beforeTime) / 1000.0).toFixed(2) + " sec"); + dactyl.echo("Total time: " + ((afterTime - beforeTime) / 1000.0).toFixed(2) + " sec"); else - liberator.echo("Total time: " + (afterTime - beforeTime) + " msec"); + dactyl.echo("Total time: " + (afterTime - beforeTime) + " msec"); } } catch (e) { - liberator.echoerr(e); + dactyl.echoerr(e); } }, { argCount: "+", @@ -1787,7 +1780,7 @@ const Liberator = Module("liberator", { try { vbs.set(args.count || 1); vbs.setFrom = null; - liberator.execute(args[0], null, true); + dactyl.execute(args[0], null, true); } finally { vbs.set(value); @@ -1804,9 +1797,9 @@ const Liberator = Module("liberator", { "Show version information", function (args) { if (args.bang) - liberator.open("about:"); + dactyl.open("about:"); else - liberator.echo(template.commandOutput(<>{config.name} {liberator.version} running on:
{navigator.userAgent})); + dactyl.echo(template.commandOutput(<>{config.name} {dactyl.version} running on:
{navigator.userAgent})); }, { argCount: "0", bang: true @@ -1814,7 +1807,7 @@ const Liberator = Module("liberator", { commands.add(["viu[sage]"], "List all mappings with a short description", - function (args) { Liberator.showHelpIndex("normal-index", mappings, args.bang); }, { + function (args) { Dactyl.showHelpIndex("normal-index", mappings, args.bang); }, { argCount: "0", bang: true }); @@ -1839,10 +1832,10 @@ const Liberator = Module("liberator", { }; completion.help = function help(context, unchunked) { - liberator.initHelp(); + dactyl.initHelp(); context.title = ["Help"]; context.anchored = false; - context.completions = services.get("liberator:").HELP_TAGS; + context.completions = services.get("dactyl:").HELP_TAGS; if (unchunked) context.keys = { text: 0, description: function () "all" }; }; @@ -1851,7 +1844,7 @@ const Liberator = Module("liberator", { context.title = ["Menu Path", "Label"]; context.anchored = false; context.keys = { text: "fullMenuPath", description: function (item) item.getAttribute("label") }; - context.completions = liberator.menuItems; + context.completions = dactyl.menuItems; }; var toolbox = document.getElementById("navigator-toolbox"); @@ -1863,34 +1856,34 @@ const Liberator = Module("liberator", { completion.window = function window(context) { context.title = ["Window", "Title"] - context.keys = { text: function (win) liberator.windows.indexOf(win) + 1, description: function (win) win.document.title }; - context.completions = liberator.windows; + context.keys = { text: function (win) dactyl.windows.indexOf(win) + 1, description: function (win) win.document.title }; + context.completions = dactyl.windows; }; }, load: function () { - liberator.triggerObserver("load"); + dactyl.triggerObserver("load"); - liberator.log("All modules loaded", 3); + dactyl.log("All modules loaded", 3); services.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=" + config.name.toLowerCase()); let commandline = services.get("commandLineHandler").optionValue; if (commandline) { - let args = liberator.parseCommandLine(commandline); - liberator.commandLineOptions.rcFile = args["+u"]; - liberator.commandLineOptions.noPlugins = "++noplugin" in args; - liberator.commandLineOptions.postCommands = args["+c"]; - liberator.commandLineOptions.preCommands = args["++cmd"]; - liberator.dump("Processing command-line option: " + commandline); + let args = dactyl.parseCommandLine(commandline); + dactyl.commandLineOptions.rcFile = args["+u"]; + dactyl.commandLineOptions.noPlugins = "++noplugin" in args; + dactyl.commandLineOptions.postCommands = args["+c"]; + dactyl.commandLineOptions.preCommands = args["++cmd"]; + dactyl.dump("Processing command-line option: " + commandline); } - liberator.log("Command-line options: " + util.objectToString(liberator.commandLineOptions), 3); + dactyl.log("Command-line options: " + util.objectToString(dactyl.commandLineOptions), 3); // first time intro message const firstTime = "extensions." + config.name.toLowerCase() + ".firsttime"; if (options.getPref(firstTime, true)) { setTimeout(function () { - liberator.help(); + dactyl.help(); options.setPref(firstTime, false); }, 1000); } @@ -1899,11 +1892,11 @@ const Liberator = Module("liberator", { modes.reset(); // TODO: we should have some class where all this guioptions stuff fits well - Liberator.hideGUI(); + Dactyl.hideGUI(); - if (liberator.commandLineOptions.preCommands) - liberator.commandLineOptions.preCommands.forEach(function (cmd) { - liberator.execute(cmd); + if (dactyl.commandLineOptions.preCommands) + dactyl.commandLineOptions.preCommands.forEach(function (cmd) { + dactyl.execute(cmd); }); // finally, read the RC file and source plugins @@ -1913,35 +1906,35 @@ const Liberator = Module("liberator", { let init = services.get("environment").get(extensionName + "_INIT"); let rcFile = io.getRCFile("~"); - if (liberator.commandLineOptions.rcFile) { - let filename = liberator.commandLineOptions.rcFile; + if (dactyl.commandLineOptions.rcFile) { + let filename = dactyl.commandLineOptions.rcFile; if (!/^(NONE|NORC)$/.test(filename)) io.source(io.File(filename).path, false); // let io.source handle any read failure like Vim } else { if (init) - liberator.execute(init); + dactyl.execute(init); else { if (rcFile) { io.source(rcFile.path, true); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); } else - liberator.log("No user RC file found", 3); + dactyl.log("No user RC file found", 3); } - if (options["exrc"] && !liberator.commandLineOptions.rcFile) { + if (options["exrc"] && !dactyl.commandLineOptions.rcFile) { let localRCFile = io.getRCFile(io.getCurrentDirectory().path); if (localRCFile && !localRCFile.equals(rcFile)) io.source(localRCFile.path, true); } } - if (liberator.commandLineOptions.rcFile == "NONE" || liberator.commandLineOptions.noPlugins) + if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins) options["loadplugins"] = false; if (options["loadplugins"]) - liberator.loadPlugins(); + dactyl.loadPlugins(); // after sourcing the initialization files, this function will set // all gui options to their default values, if they have not been @@ -1954,18 +1947,18 @@ const Liberator = Module("liberator", { option.value = option.value; } - if (liberator.commandLineOptions.postCommands) - liberator.commandLineOptions.postCommands.forEach(function (cmd) { - liberator.execute(cmd); + if (dactyl.commandLineOptions.postCommands) + dactyl.commandLineOptions.postCommands.forEach(function (cmd) { + dactyl.execute(cmd); }); - liberator.triggerObserver("enter", null); + dactyl.triggerObserver("enter", null); autocommands.trigger(config.name + "Enter", {}); }, 0); statusline.update(); - liberator.log(config.name + " fully initialized", 0); - liberator.initialized = true; + dactyl.log(config.name + " fully initialized", 0); + dactyl.initialized = true; } }); diff --git a/common/content/dactyl.xul b/common/content/dactyl.xul new file mode 100644 index 00000000..1483e7cc --- /dev/null +++ b/common/content/dactyl.xul @@ -0,0 +1,104 @@ + + + + + + + +]> + + + + diff --git a/common/content/quickmarks.js b/common/content/quickmarks.js index 3c02dfd5..9000bd23 100644 --- a/common/content/quickmarks.js +++ b/common/content/quickmarks.js @@ -28,7 +28,7 @@ const QuickMarks = Module("quickmarks", { */ add: function add(qmark, location) { this._qmarks.set(qmark, location); - liberator.echomsg("Added Quick Mark '" + qmark + "': " + location, 1); + dactyl.echomsg("Added Quick Mark '" + qmark + "': " + location, 1); }, /** @@ -59,15 +59,15 @@ const QuickMarks = Module("quickmarks", { * * @param {string} qmark The quickmark to open. * @param {number} where A constant describing where to open the page. - * See {@link Liberator#open}. + * See {@link Dactyl#open}. */ jumpTo: function jumpTo(qmark, where) { let url = this._qmarks.get(qmark); if (url) - liberator.open(url, where); + dactyl.open(url, where); else - liberator.echoerr("E20: QuickMark not set"); + dactyl.echoerr("E20: QuickMark not set"); }, /** @@ -85,11 +85,11 @@ const QuickMarks = Module("quickmarks", { marks = Array.concat(lowercaseMarks, uppercaseMarks, numberMarks); - liberator.assert(marks.length > 0, "No QuickMarks set"); + dactyl.assert(marks.length > 0, "No QuickMarks set"); if (filter.length > 0) { marks = marks.filter(function (qmark) filter.indexOf(qmark) >= 0); - liberator.assert(marks.length >= 0, "E283: No QuickMarks matching \"" + filter + "\""); + dactyl.assert(marks.length >= 0, "E283: No QuickMarks matching \"" + filter + "\""); } let items = [[mark, this._qmarks.get(mark)] for ([k, mark] in Iterator(marks))]; @@ -103,8 +103,8 @@ const QuickMarks = Module("quickmarks", { function (args) { // TODO: finish arg parsing - we really need a proper way to do this. :) // assert(args.bang ^ args.string) - liberator.assert( args.bang || args.string, "E471: Argument required"); - liberator.assert(!args.bang || !args.string, "E474: Invalid argument"); + dactyl.assert( args.bang || args.string, "E471: Argument required"); + dactyl.assert(!args.bang || !args.string, "E474: Invalid argument"); if (args.bang) quickmarks.removeAll(); @@ -124,7 +124,7 @@ const QuickMarks = Module("quickmarks", { function (args) { let matches = args.string.match(/^([a-zA-Z0-9])(?:\s+(.+))?$/); if (!matches) - liberator.echoerr("E488: Trailing characters"); + dactyl.echoerr("E488: Trailing characters"); else if (!matches[2]) quickmarks.add(matches[1], buffer.URL); else @@ -138,7 +138,7 @@ const QuickMarks = Module("quickmarks", { args = args.string; // ignore invalid qmark characters unless there are no valid qmark chars - liberator.assert(!args || /[a-zA-Z0-9]/.test(args), "E283: No QuickMarks matching \"" + args + "\""); + dactyl.assert(!args || /[a-zA-Z0-9]/.test(args), "E283: No QuickMarks matching \"" + args + "\""); let filter = args.replace(/[^a-zA-Z0-9]/g, ""); quickmarks.list(filter); @@ -149,7 +149,7 @@ const QuickMarks = Module("quickmarks", { mappings.add(myModes, ["go"], "Jump to a QuickMark", - function (arg) { quickmarks.jumpTo(arg, liberator.CURRENT_TAB); }, + function (arg) { quickmarks.jumpTo(arg, dactyl.CURRENT_TAB); }, { arg: true }); mappings.add(myModes, @@ -157,14 +157,14 @@ const QuickMarks = Module("quickmarks", { function (arg) { quickmarks.jumpTo(arg, /\bquickmark\b/.test(options["activate"]) ? - liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB); + dactyl.NEW_TAB : dactyl.NEW_BACKGROUND_TAB); }, { arg: true }); mappings.add(myModes, ["M"], "Add new QuickMark for current URL", function (arg) { - liberator.assert(/^[a-zA-Z0-9]$/.test(arg)); + dactyl.assert(/^[a-zA-Z0-9]$/.test(arg)); quickmarks.add(arg, buffer.URL); }, { arg: true }); diff --git a/common/content/sanitizer.js b/common/content/sanitizer.js index 85b8c4ea..c061bc25 100644 --- a/common/content/sanitizer.js +++ b/common/content/sanitizer.js @@ -7,7 +7,7 @@ // TODO: // - fix Sanitize autocommand // - add warning for TIMESPAN_EVERYTHING? -// - respect privacy.clearOnShutdown et al or recommend VimperatorLeave autocommand? +// - respect privacy.clearOnShutdown et al or recommend PentadactylLeave autocommand? // - add support for :set sanitizeitems=all like 'eventignore'? // - integrate with the Clear Private Data dialog? @@ -15,11 +15,11 @@ // - finish 1.9.0 support if we're going to support sanitizing in Xulmus const Sanitizer = Module("sanitizer", { - requires: ["liberator"], + requires: ["dactyl"], init: function () { const self = this; - liberator.loadScript("chrome://browser/content/sanitize.js", Sanitizer); + dactyl.loadScript("chrome://browser/content/sanitize.js", Sanitizer); Sanitizer.getClearRange = Sanitizer.Sanitizer.getClearRange; this.__proto__.__proto__ = new Sanitizer.Sanitizer; // Good enough. @@ -29,7 +29,7 @@ const Sanitizer = Module("sanitizer", { else self.prefDomain = "privacy.item."; - self.prefDomain2 = "extensions.liberator.privacy.cpd."; + self.prefDomain2 = "extensions.dactyl.privacy.cpd."; }, // Largely ripped from from browser/base/content/sanitize.js so we can override @@ -60,7 +60,7 @@ const Sanitizer = Module("sanitizer", { item.range = range; if ("clear" in item && item.canClear && prefSet(itemName)) { - liberator.log("Sanitizing " + itemName + " items..."); + dactyl.log("Sanitizing " + itemName + " items..."); // Some of these clear() may raise exceptions (see bug #265028) // to sanitize as much as possible, we catch and store them, // rather than fail fast. @@ -97,7 +97,7 @@ const Sanitizer = Module("sanitizer", { commands.add(["sa[nitize]"], "Clear private data", function (args) { - liberator.assert(!options['private'], "Cannot sanitize items in private mode"); + dactyl.assert(!options['private'], "Cannot sanitize items in private mode"); let timespan = args["-timespan"] || options["sanitizetimespan"]; @@ -105,22 +105,22 @@ const Sanitizer = Module("sanitizer", { sanitizer.ignoreTimespan = !sanitizer.range; if (args.bang) { - liberator.assert(args.length == 0, "E488: Trailing characters"); + dactyl.assert(args.length == 0, "E488: Trailing characters"); - liberator.log("Sanitizing all items in 'sanitizeitems'..."); + dactyl.log("Sanitizing all items in 'sanitizeitems'..."); let errors = sanitizer.sanitize(); if (errors) { for (let item in errors) - liberator.echoerr("Error sanitizing " + item + ": " + errors[item]); + dactyl.echoerr("Error sanitizing " + item + ": " + errors[item]); } } else { - liberator.assert(args.length > 0, "E471: Argument required"); + dactyl.assert(args.length > 0, "E471: Argument required"); for (let [, item] in Iterator(args.map(Sanitizer.argToPref))) { - liberator.log("Sanitizing " + item + " items..."); + dactyl.log("Sanitizing " + item + " items..."); if (sanitizer.canClearItem(item)) { try { @@ -128,11 +128,11 @@ const Sanitizer = Module("sanitizer", { sanitizer.clearItem(item); } catch (e) { - liberator.echoerr("Error sanitizing " + item + ": " + e); + dactyl.echoerr("Error sanitizing " + item + ": " + e); } } else - liberator.echomsg("Cannot sanitize " + item); + dactyl.echomsg("Cannot sanitize " + item); } } }, @@ -154,7 +154,7 @@ const Sanitizer = Module("sanitizer", { options: function () { const self = this; - // add liberator-specific private items + // add dactyl-specific private items [ { name: "commandLine", diff --git a/common/content/services.js b/common/content/services.js index 3311bf4c..f95f29a2 100644 --- a/common/content/services.js +++ b/common/content/services.js @@ -22,7 +22,7 @@ const Services = Module("services", { this.add("browserSearch", "@mozilla.org/browser/search-service;1", Ci.nsIBrowserSearchService); this.add("cache", "@mozilla.org/network/cache-service;1", Ci.nsICacheService); this.add("console", "@mozilla.org/consoleservice;1", Ci.nsIConsoleService); - this.add("liberator:", "@mozilla.org/network/protocol;1?name=liberator"); + this.add("dactyl:", "@mozilla.org/network/protocol;1?name=dactyl"); this.add("debugger", "@mozilla.org/js/jsd/debugger-service;1", Ci.jsdIDebuggerService); this.add("directory", "@mozilla.org/file/directory_service;1", Ci.nsIProperties); this.add("downloadManager", "@mozilla.org/download-manager;1", Ci.nsIDownloadManager); @@ -64,7 +64,7 @@ const Services = Module("services", { return res; } catch (e) { - // liberator.log() is not defined at this time, so just dump any error + // dactyl.log() is not defined at this time, so just dump any error dump("Service creation failed for '" + classes + "': " + e + "\n"); return null; } diff --git a/common/content/statusline.js b/common/content/statusline.js index e82c9550..c43ea4be 100755 --- a/common/content/statusline.js +++ b/common/content/statusline.js @@ -15,7 +15,7 @@ const StatusLine = Module("statusline", { // our status bar fields this.widgets = dict(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"].map( - function (field) [field, document.getElementById("liberator-statusline-field-" + field)])); + function (field) [field, document.getElementById("dactyl-statusline-field-" + field)])); }, /** @@ -99,8 +99,8 @@ const StatusLine = Module("statusline", { url = "[No Name]"; } else { - url = url.replace(RegExp("^liberator://help/(\\S+)#(.*)"), function (m, n1, n2) n1 + " " + decodeURIComponent(n2) + " [Help]") - .replace(RegExp("^liberator://help/(\\S+)"), "$1 [Help]"); + url = url.replace(RegExp("^dactyl://help/(\\S+)#(.*)"), function (m, n1, n2) n1 + " " + decodeURIComponent(n2) + " [Help]") + .replace(RegExp("^dactyl://help/(\\S+)"), "$1 [Help]"); } // when session information is available, add [+] when we can go @@ -180,7 +180,7 @@ const StatusLine = Module("statusline", { * the tab state is fully updated. */ updateTabCount: function updateTabCount(delayed) { - if (liberator.has("tabs")) { + if (dactyl.has("tabs")) { if (delayed) { this.setTimeout(function () this.updateTabCount(false), 0); return; @@ -257,7 +257,7 @@ const StatusLine = Module("statusline", { if (value == 0) document.getElementById("status-bar").collapsed = true; else if (value == 1) - liberator.echoerr("show status line only with > 1 window not implemented yet"); + dactyl.echoerr("show status line only with > 1 window not implemented yet"); else document.getElementById("status-bar").collapsed = false; diff --git a/common/content/style.js b/common/content/style.js index 3fc6824a..778d1a5d 100644 --- a/common/content/style.js +++ b/common/content/style.js @@ -128,13 +128,13 @@ Highlights.prototype.CSS = ol ol margin-left: -1em; - HelpTab,html|dl,liberator://help/* display: table; width: 100%; margin: 1em 0; border-bottom-width: 1px; border-top-width: 1px; padding: .5ex 0; table-layout: fixed; - HelpTabColumn,html|column,liberator://help/* display: table-column; + HelpTab,html|dl,dactyl://help/* display: table; width: 100%; margin: 1em 0; border-bottom-width: 1px; border-top-width: 1px; padding: .5ex 0; table-layout: fixed; + HelpTabColumn,html|column,dactyl://help/* display: table-column; HelpTabColumn:first-child width: 25%; - HelpTabTitle,html|dt,liberator://help/* display: table-cell; padding: .1ex 1ex; font-weight: bold; - HelpTabDescription,html|dd,liberator://help/* display: table-cell; padding: .1ex 1ex; border-width: 0px; - HelpTabRow,html|dl>html|tr,liberator://help/* display: table-row; + HelpTabTitle,html|dt,dactyl://help/* display: table-cell; padding: .1ex 1ex; font-weight: bold; + HelpTabDescription,html|dd,dactyl://help/* display: table-cell; padding: .1ex 1ex; border-width: 0px; + HelpTabRow,html|dl>html|tr,dactyl://help/* display: table-row; HelpTag display: inline-block; color: #527BBD; margin-left: 1ex; font-size: 8pt; font-weight: bold; HelpTags display: block; float: right; clear: right; @@ -242,8 +242,8 @@ function Highlights(name, store) { const Highlight = Struct("class", "selector", "filter", "default", "value", "base"); Highlight.defaultValue("filter", function () this.base ? this.base.filter : - ["chrome://liberator/*", - "liberator:*", + ["chrome://dactyl/*", + "dactyl:*", "file://*"].concat(config.styleableChrome).join(",")); Highlight.defaultValue("selector", function () self.selector(this.class)); Highlight.defaultValue("value", function () this.default); @@ -302,7 +302,7 @@ function Highlights(name, store) { */ this.selector = function (class_) { let [, hl, rest] = class_.match(/^(\w*)(.*)/); - let pattern = "[liberator|highlight~=" + hl + "]" + let pattern = "[dactyl|highlight~=" + hl + "]" if (highlight[hl] && highlight[hl].class != class_) pattern = highlight[hl].selector; return pattern + rest; @@ -351,18 +351,18 @@ function Highlights(name, store) { * @author Kris Maglione */ function Styles(name, store) { - // Can't reference liberator or Components inside Styles -- + // Can't reference dactyl or Components inside Styles -- // they're members of the window object, which disappear // with this window. const self = this; const util = modules.util; - const sleep = liberator.sleep; + const sleep = dactyl.sleep; const storage = modules.storage; const ios = services.get("io"); const sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); const namespace = "@namespace html " + XHTML.uri.quote() + ";\n" + "@namespace xul " + XUL.uri.quote() + ";\n" + - "@namespace liberator " + NS.uri.quote() + ";\n"; + "@namespace dactyl " + NS.uri.quote() + ";\n"; const Sheet = Struct("name", "id", "sites", "css", "system", "agent"); Sheet.prototype.__defineGetter__("fullCSS", function wrapCSS() { @@ -375,7 +375,7 @@ function Styles(name, store) { : "domain") + '("' + part.replace(/"/g, "%22").replace(/[*]$/, "") + '")') .join(", "); - return namespace + "/* Liberator style #" + this.id + " */ @-moz-document " + selectors + "{\n" + css + "\n}\n"; + return namespace + "/* Dactyl style #" + this.id + " */ @-moz-document " + selectors + "{\n" + css + "\n}\n"; }); Sheet.prototype.__defineGetter__("enabled", function () this._enabled); Sheet.prototype.__defineSetter__("enabled", function (on) { @@ -411,7 +411,7 @@ function Styles(name, store) { * * @param {boolean} system Declares whether this is a system or * user sheet. System sheets are used internally by - * @liberator. + * @dactyl. * @param {string} name The name given to the style sheet by * which it may be later referenced. * @param {string} filter The sites to which this sheet will @@ -561,7 +561,7 @@ function Styles(name, store) { } Module("styles", { - requires: ["config", "liberator", "storage", "util"], + requires: ["config", "dactyl", "storage", "util"], init: function () { let (array = util.Array) { @@ -622,7 +622,7 @@ Module("styles", { } let err = styles.addSheet(false, name, filter, css); if (err) - liberator.echoerr(err); + dactyl.echoerr(err); } }, { @@ -733,7 +733,7 @@ Module("highlight", { if (scheme == "default") highlight.clear(); else - liberator.assert(io.sourceFromRuntimePath(["colors/" + scheme + ".vimp"]), + dactyl.assert(io.sourceFromRuntimePath(["colors/" + scheme + ".vimp"]), "E185: Cannot find color scheme " + scheme); autocommands.trigger("ColorScheme", { name: scheme }); }, @@ -759,7 +759,7 @@ Module("highlight", { args.shift(); let [key, css] = args; - liberator.assert(!(clear && css), "E488: Trailing characters"); + dactyl.assert(!(clear && css), "E488: Trailing characters"); if (!css && !clear) { // List matching keys @@ -779,7 +779,7 @@ Module("highlight", { else { let error = highlight.set(key, css, clear, "-append" in args); if (error) - liberator.echoerr(error); + dactyl.echoerr(error); } }, { diff --git a/common/content/tabs.js b/common/content/tabs.js index 12bc8399..dbabc928 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -40,7 +40,7 @@ const Tabs = Module("tabs", { statusline.updateTabCount(true); this.updateSelectionHistory(); if (options["focuscontent"]) - setTimeout(function () { liberator.focusContent(true); }, 10); // just make sure, that no widget has focus + setTimeout(function () { dactyl.focusContent(true); }, 10); // just make sure, that no widget has focus }, /** @@ -65,12 +65,12 @@ const Tabs = Module("tabs", { */ get tabsBound() Boolean(styles.get(true, "tab-binding")), set tabsBound(val) { - let fragment = liberator.has("MacUnix") ? "tab-mac" : "tab"; + let fragment = dactyl.has("MacUnix") ? "tab-mac" : "tab"; if (!val) styles.removeSheet(true, "tab-binding"); else if (!this.tabsBound) styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul", - ".tabbrowser-tab { -moz-binding: url(chrome://liberator/content/bindings.xml#" + fragment + ") !important; }" + + ".tabbrowser-tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#" + fragment + ") !important; }" + // FIXME: better solution for themes? ".tabbrowser-tab[busy] > .tab-icon > .tab-icon-image { list-style-image: url('chrome://global/skin/icons/loading_16.png') !important; }"); }, @@ -105,9 +105,9 @@ const Tabs = Module("tabs", { // useful for autocommands, and they get index arguments. --Kris getLocalStore: function (tabIndex) { let tab = this.getTab(tabIndex); - if (!tab.liberatorStore) - tab.liberatorStore = {}; - return tab.liberatorStore; + if (!tab.dactylStore) + tab.dactylStore = {}; + return tab.dactylStore; }, /** @@ -230,29 +230,29 @@ const Tabs = Module("tabs", { else { if (buffer.URL != "about:blank" || window.getWebNavigation().sessionHistory.count > 0) { - liberator.open("about:blank", liberator.NEW_BACKGROUND_TAB); + dactyl.open("about:blank", dactyl.NEW_BACKGROUND_TAB); config.tabbrowser.removeTab(tab); } else - liberator.beep(); + dactyl.beep(); } }, Thunderbird: function (tab) { if (config.tabbrowser.mTabs.length > 1) config.tabbrowser.removeTab(tab); else - liberator.beep(); + dactyl.beep(); }, Songbird: function (tab) { if (config.tabbrowser.mTabs.length > 1) config.tabbrowser.removeTab(tab); else { if (buffer.URL != "about:blank" || window.getWebNavigation().sessionHistory.count > 0) { - liberator.open("about:blank", liberator.NEW_BACKGROUND_TAB); + dactyl.open("about:blank", dactyl.NEW_BACKGROUND_TAB); config.tabbrowser.removeTab(tab); } else - liberator.beep(); + dactyl.beep(); } } }[config.hostApplication] || function () {}; @@ -261,10 +261,10 @@ const Tabs = Module("tabs", { count = 1; if (quitOnLastTab >= 1 && config.tabbrowser.mTabs.length <= count) { - if (liberator.windows.length > 1) + if (dactyl.windows.length > 1) window.close(); else - liberator.quit(quitOnLastTab == 2); + dactyl.quit(quitOnLastTab == 2); return; } @@ -310,7 +310,7 @@ const Tabs = Module("tabs", { let index = Tabs.indexFromSpec(spec, wrap); // FIXME: if (index == -1) - liberator.beep(); + dactyl.beep(); else config.tabbrowser.mTabContainer.selectedIndex = index; }, @@ -435,9 +435,9 @@ const Tabs = Module("tabs", { matches.push(index); } if (matches.length == 0) - liberator.echoerr("E94: No matching buffer for " + buffer); + dactyl.echoerr("E94: No matching buffer for " + buffer); else if (matches.length > 1 && !allowNonUnique) - liberator.echoerr("E93: More than one match for " + buffer); + dactyl.echoerr("E93: More than one match for " + buffer); else { if (reverse) { index = matches.length - count; @@ -485,7 +485,7 @@ const Tabs = Module("tabs", { * Selects the alternate tab. */ selectAlternateTab: function () { - liberator.assert(tabs.alternate != null && tabs.getTab() != tabs.alternate, + dactyl.assert(tabs.alternate != null && tabs.getTab() != tabs.alternate, "E23: No alternate page"); // NOTE: this currently relies on v.tabs.index() returning the @@ -495,7 +495,7 @@ const Tabs = Module("tabs", { // TODO: since a tab close is more like a bdelete for us we // should probably reopen the closed tab when a 'deleted' // alternate is selected - liberator.assert(index >= 0, "E86: Buffer does not exist"); // TODO: This should read "Buffer N does not exist" + dactyl.assert(index >= 0, "E86: Buffer does not exist"); // TODO: This should read "Buffer N does not exist" tabs.select(index); }, @@ -599,9 +599,9 @@ const Tabs = Module("tabs", { } if (removed > 0) - liberator.echomsg(removed + " fewer tab(s)", 9); + dactyl.echomsg(removed + " fewer tab(s)", 9); else - liberator.echoerr("E94: No matching tab for " + arg); + dactyl.echoerr("E94: No matching tab for " + arg); } else // just remove the current tab tabs.remove(tabs.getTab(), Math.max(count, 1), special, 0); @@ -619,7 +619,7 @@ const Tabs = Module("tabs", { let alternate = tabs.alternate; try { - liberator.execute(args[0], null, true); + dactyl.execute(args[0], null, true); } finally { tabs.updateSelectionHistory([tabs.getTab(), alternate]); @@ -634,9 +634,9 @@ const Tabs = Module("tabs", { commands.add(["tab"], "Execute a command and tell it to output in a new tab", function (args) { - liberator.forceNewTab = true; - liberator.execute(args.string, null, true); - liberator.forceNewTab = false; + dactyl.forceNewTab = true; + dactyl.execute(args.string, null, true); + dactyl.forceNewTab = false; }, { argCount: "+", completer: function (context) completion.ex(context), @@ -648,7 +648,7 @@ const Tabs = Module("tabs", { function (args) { for (let i = 0; i < tabs.count; i++) { tabs.select(i); - liberator.execute(args.string, null, true); + dactyl.execute(args.string, null, true); } }, { argCount: "1", @@ -673,7 +673,7 @@ const Tabs = Module("tabs", { if (/^\d+$/.test(arg)) tabs.select("-" + arg, true); else - liberator.echoerr("E488: Trailing characters"); + dactyl.echoerr("E488: Trailing characters"); } else if (count > 0) tabs.select("-" + count, true); @@ -696,7 +696,7 @@ const Tabs = Module("tabs", { // count is ignored if an arg is specified, as per Vim if (arg) { - liberator.assert(/^\d+$/.test(arg), "E488: Trailing characters"); + dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); index = arg - 1; } else @@ -705,7 +705,7 @@ const Tabs = Module("tabs", { if (index < tabs.count) tabs.select(index, true); else - liberator.beep(); + dactyl.beep(); } else tabs.select("+1", true); @@ -731,7 +731,7 @@ const Tabs = Module("tabs", { // if a numeric arg is specified any count is ignored; if a // count and non-numeric arg are both specified then E488 if (arg && count > 0) { - liberator.assert(/^\d+$/.test(arg), "E488: Trailing characters"); + dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters"); tabs.switchTo(arg, special); } else if (count > 0) @@ -755,7 +755,7 @@ const Tabs = Module("tabs", { commands.add(["quita[ll]", "qa[ll]"], "Quit " + config.name, - function (args) { liberator.quit(false, args.bang); }, { + function (args) { dactyl.quit(false, args.bang); }, { argCount: "0", bang: true }); @@ -779,7 +779,7 @@ const Tabs = Module("tabs", { let arg = args[0]; // FIXME: tabmove! N should probably produce an error - liberator.assert(!arg || /^([+-]?\d+)$/.test(arg), + dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg), "E488: Trailing characters"); // if not specified, move to after the last tab @@ -797,7 +797,7 @@ const Tabs = Module("tabs", { commands.add(["tabopen", "t[open]", "tabnew"], "Open one or more URLs in a new tab", function (args) { - liberator.open(args.string || "about:blank", { from: "tabopen", where: liberator.NEW_TAB, background: args.bang }); + dactyl.open(args.string || "about:blank", { from: "tabopen", where: dactyl.NEW_TAB, background: args.bang }); }, { bang: true, completer: function (context) completion.url(context), @@ -808,7 +808,7 @@ const Tabs = Module("tabs", { commands.add(["tabde[tach]"], "Detach current tab to its own window", function () { - liberator.assert(tabs.count > 1, "Can't detach the last tab"); + dactyl.assert(tabs.count > 1, "Can't detach the last tab"); tabs.detachTab(null); }, @@ -837,14 +837,14 @@ const Tabs = Module("tabs", { commands.add(["taba[ttach]"], "Attach the current tab to another window", function (args) { - liberator.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)), + dactyl.assert(args.length <= 2 && !args.some(function (i) !/^\d+$/.test(i)), "E488: Trailing characters"); let [winIndex, tabIndex] = args.map(parseInt); - let win = liberator.windows[winIndex - 1]; + let win = dactyl.windows[winIndex - 1]; - liberator.assert(win, "Window " + winIndex + " does not exist"); - liberator.assert(win != window, "Can't reattach to the same window"); + dactyl.assert(win, "Window " + winIndex + " does not exist"); + dactyl.assert(win != window, "Can't reattach to the same window"); let browser = win.getBrowser(); let dummy = browser.addTab("about:blank"); @@ -870,7 +870,7 @@ const Tabs = Module("tabs", { }); } - if (liberator.has("tabs_undo")) { + if (dactyl.has("tabs_undo")) { commands.add(["u[ndo]"], "Undo closing of a tab", function (args) { @@ -889,7 +889,7 @@ const Tabs = Module("tabs", { return; } - liberator.echoerr("Exxx: No matching closed tab"); + dactyl.echoerr("Exxx: No matching closed tab"); } }, { argCount: "?", @@ -915,10 +915,10 @@ const Tabs = Module("tabs", { } - if (liberator.has("session")) { + if (dactyl.has("session")) { commands.add(["wqa[ll]", "wq", "xa[ll]"], "Save the session and quit", - function () { liberator.quit(true); }, + function () { dactyl.quit(true); }, { argCount: "0" }); } }, @@ -999,7 +999,7 @@ const Tabs = Module("tabs", { { count: true }); // TODO: feature dependencies - implies "session"? - if (liberator.has("tabs_undo")) { + if (dactyl.has("tabs_undo")) { mappings.add([modes.NORMAL], ["u"], "Undo closing of a tab", function (count) { commands.get("undo").execute("", false, count); }, diff --git a/common/content/template.js b/common/content/template.js index c6e822f5..199f39e4 100644 --- a/common/content/template.js +++ b/common/content/template.js @@ -22,7 +22,7 @@ const Template = Module("template", { if (sep && n++) ret += sep; if (interruptable && n % interruptable == 0) - liberator.threadYield(true, true); + dactyl.threadYield(true, true); ret += val; } return ret; diff --git a/common/content/util.js b/common/content/util.js index 7dfe3c3b..8061534b 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -10,7 +10,7 @@ const XHTML = Namespace("html", "http://www.w3.org/1999/xhtml"); const XUL = Namespace("xul", "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); -const NS = Namespace("liberator", "http://vimperator.org/namespaces/liberator"); +const NS = Namespace("dactyl", "http://vimperator.org/namespaces/liberator"); default xml namespace = XHTML; const Util = Module("util", { @@ -79,7 +79,7 @@ const Util = Module("util", { clipboardHelper.copyString(str); if (verbose) - liberator.echo("Yanked " + str, commandline.FORCE_SINGLELINE); + dactyl.echo("Yanked " + str, commandline.FORCE_SINGLELINE); }, /** @@ -310,7 +310,7 @@ const Util = Module("util", { const PATH = FILE.leafName.replace(/\..*/, "") + "/"; const TIME = Date.now(); - liberator.initHelp(); + dactyl.initHelp(); let zip = services.create("zipWriter"); zip.open(FILE, File.MODE_CREATE | File.MODE_WRONLY | File.MODE_TRUNCATE); function addURIEntry(file, uri) @@ -324,8 +324,8 @@ const Util = Module("util", { .split(" ").map(Array.concat)); let chrome = {}; - for (let [file,] in Iterator(services.get("liberator:").FILE_MAP)) { - liberator.open("liberator://help/" + file); + for (let [file,] in Iterator(services.get("dactyl:").FILE_MAP)) { + dactyl.open("dactyl://help/" + file); events.waitForPageLoad(); let data = [ '\n', @@ -343,12 +343,12 @@ const Util = Module("util", { data.push(" xmlns=" + XHTML.uri.quote()); for (let { name: name, value: value } in util.Array.itervalues(node.attributes)) { - if (name == "liberator:highlight") { + if (name == "dactyl:highlight") { name = "class"; value = "hl-" + value; } if (name == "href") { - if (value.indexOf("liberator://help-tag/") == 0) + if (value.indexOf("dactyl://help-tag/") == 0) value = services.get("io").newChannel(value, null, null).originalURI.path.substr(1); if (!/[#\/]/.test(value)) value += ".xhtml"; @@ -423,14 +423,14 @@ const Util = Module("util", { return xmlhttp; } catch (e) { - liberator.log("Error opening " + url + ": " + e, 1); + dactyl.log("Error opening " + url + ": " + e, 1); return null; } }, /** * Evaluates an XPath expression in the current or provided - * document. It provides the xhtml, xhtml2 and liberator XML + * document. It provides the xhtml, xhtml2 and dactyl XML * namespaces. The result may be used as an iterator. * * @param {string} expression The XPath expression to evaluate. @@ -454,7 +454,7 @@ const Util = Module("util", { return { xhtml: "http://www.w3.org/1999/xhtml", xhtml2: "http://www.w3.org/2002/06/xhtml2", - liberator: NS.uri + dactyl: NS.uri }[prefix] || null; }, asIterator ? XPathResult.ORDERED_NODE_ITERATOR_TYPE : XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, @@ -559,7 +559,7 @@ const Util = Module("util", { return false; const NAMESPACES = util.Array.toObject([ - [NS, 'liberator'], + [NS, 'dactyl'], [XHTML, 'html'], [XUL, 'xul'] ]); @@ -674,7 +674,7 @@ const Util = Module("util", { let endTime = Date.now() + time; while (start < end) { if (Date.now() > endTime) { - liberator.threadYield(true, true); + dactyl.threadYield(true, true); endTime = Date.now() + time; } yield start++; diff --git a/common/locale/en-US/all.xml b/common/locale/en-US/all.xml index e6287999..07353904 100644 --- a/common/locale/en-US/all.xml +++ b/common/locale/en-US/all.xml @@ -1,11 +1,11 @@ - + - + all diff --git a/common/locale/en-US/autocommands.xml b/common/locale/en-US/autocommands.xml index 3a84542c..3f9e5f89 100644 --- a/common/locale/en-US/autocommands.xml +++ b/common/locale/en-US/autocommands.xml @@ -1,11 +1,11 @@ - + - +

Automatic commands

@@ -31,7 +31,7 @@ variables.

-

Add cmd to the list of commands &liberator.appname; will execute on event for a URL matching pat:

+

Add cmd to the list of commands &dactyl.appname; will execute on event for a URL matching pat:

  • :autocmd[!] events pat: list/remove autocommands filtered by events and pat
  • diff --git a/common/locale/en-US/browsing.xml b/common/locale/en-US/browsing.xml index 801c93fa..ecb82671 100644 --- a/common/locale/en-US/browsing.xml +++ b/common/locale/en-US/browsing.xml @@ -1,19 +1,19 @@ - + - +

    Browsing

    -&liberator.appname; overrides nearly all &liberator.host; keys in order to make browsing more +&dactyl.appname; overrides nearly all &dactyl.host; keys in order to make browsing more pleasant for Vim users. On the rare occasions when you want to pass a keystroke -to &liberator.host;, or to the web page, and have it retain its original meaning you +to &dactyl.host;, or to the web page, and have it retain its original meaning you have 2 possibilities: @@ -21,7 +21,7 @@ have 2 possibilities: CTRL-Z

    - Disable all &liberator.appname; keys except and pass them to the next event + Disable all &dactyl.appname; keys except and pass them to the next event handler. This is especially useful if JavaScript controlled forms (e.g., the RichEdit form fields of Gmail) don't work anymore. To exit this mode, press . If you also need to pass in this mode to the web page, @@ -37,10 +37,10 @@ have 2 possibilities:

    If you only need to pass a single key to a JavaScript form field or another - extension prefix the key with . Also works to unshadow &liberator.host; - shortcuts like which are otherwise hidden in &liberator.appname;. When - &liberator.appname; mode is temporarily disabled with , will pass - the next key to &liberator.appname; instead of the web page. + extension prefix the key with . Also works to unshadow &dactyl.host; + shortcuts like which are otherwise hidden in &dactyl.appname;. When + &dactyl.appname; mode is temporarily disabled with , will pass + the next key to &dactyl.appname; instead of the web page.

    @@ -87,7 +87,7 @@ have 2 possibilities: opens a Google search for linus torvalds).
  • - Passed directly to &liberator.host; in all other cases + Passed directly to &dactyl.host; in all other cases (:open www.osnews.com, www.slashdot.org opens OSNews in the current, and Slashdot in a new background tab). @@ -441,7 +441,7 @@ have 2 possibilities:

    Quit current tab. If this is the last tab in the window, close the window. If - this was the last window, close &liberator.appname;. When quitting &liberator.appname;, the + this was the last window, close &dactyl.appname;. When quitting &dactyl.appname;, the session is not stored.

    @@ -453,7 +453,7 @@ have 2 possibilities: :quitall

    - Quit &liberator.appname;. Quit &liberator.appname;, no matter how many tabs/windows are open. + Quit &dactyl.appname;. Quit &dactyl.appname;, no matter how many tabs/windows are open. The session is not stored.

    @@ -484,7 +484,7 @@ have 2 possibilities: :xall

    - Save the session and quit. Quit &liberator.appname;, no matter how many tabs/windows + Save the session and quit. Quit &dactyl.appname;, no matter how many tabs/windows are open. The session is stored. :wq is different from Vim, as it closes the window instead of just one tab by popular demand. Complain on the mailing list if you want to change that. @@ -507,7 +507,7 @@ have 2 possibilities: ZZ

    - Quit and save the session. Quit &liberator.appname;, no matter how many tabs/windows + Quit and save the session. Quit &dactyl.appname;, no matter how many tabs/windows are open. The session is stored. Works like :xall.

    diff --git a/common/locale/en-US/buffer.xml b/common/locale/en-US/buffer.xml index da56c7bb..7daff506 100644 --- a/common/locale/en-US/buffer.xml +++ b/common/locale/en-US/buffer.xml @@ -1,17 +1,17 @@ - + - +

    Buffer

    -&liberator.appname; holds exactly one buffer object for each tab. It is usually an +&dactyl.appname; holds exactly one buffer object for each tab. It is usually an (X)HTML document with advanced features.

    Buffer information

    @@ -358,7 +358,7 @@ default zoom levels are 30%, 50%, 67%, 80%, 90%, 100%, 110%, 120%, 133%, 150%, The available zoom range can be changed by setting the 'zoom.minPercent' and -'zoom.maxPercent' &liberator.host; +'zoom.maxPercent' &dactyl.host; preferences. The zoom levels can be changed using the 'toolkit.ZoomManager.zoomLevels' preference. diff --git a/common/locale/en-US/cmdline.xml b/common/locale/en-US/cmdline.xml index f4223061..d2734a51 100644 --- a/common/locale/en-US/cmdline.xml +++ b/common/locale/en-US/cmdline.xml @@ -1,11 +1,11 @@ - + - +

    Command-line mode

    diff --git a/common/locale/en-US/developer.xml b/common/locale/en-US/developer.xml index 5bf793a7..572505bf 100644 --- a/common/locale/en-US/developer.xml +++ b/common/locale/en-US/developer.xml @@ -1,13 +1,13 @@ - + - ]>

    Developer information

    @@ -63,7 +63,7 @@

    If you don't know in which file/section you should put some documentation, ask on the mailing list or on - #vimperator. + #pentadactyl.

    Help tags

    @@ -89,7 +89,7 @@
    &tab;@topic
    The topic of the link. Either a help topic or a fully-qualified URI.
    em
    Emphasized text. (HelpEm)
    str
    A string, with its contents wrapped in quotes. (HelpString)
    -
    logo
    &liberator.appname;'s logo. (Logo)
    +
    logo
    &dactyl.appname;'s logo. (Logo)
    Items
    @@ -129,7 +129,7 @@
    &tab;@summary
    A short description of the plugin, shown in its section head.
    project
    The project for which this plugin was intended.
    -
    &tab;@name
    The name of the project (i.e., &liberator.name;)
    +
    &tab;@name
    The name of the project (i.e., &dactyl.name;)
    &tab;@minVersion
    The minimum version of the project for which this plugin is intended to work.
    &tab;@maxVersion
    The maximum version of the project for which this plugin is intended to work.
    @@ -153,13 +153,13 @@

    Writing plugins

    - Writing &liberator.appname; plugins is incredibly simple. + Writing &dactyl.appname; plugins is incredibly simple. Plugins are simply JavaScript files which run with full chrome - privileges and have full access to the &liberator.appname; and - &liberator.host; APIs. Each plugin has its own global object, + privileges and have full access to the &dactyl.appname; and + &dactyl.host; APIs. Each plugin has its own global object, which means that the variables and functions that you create won't pollute the global window or private - liberator namespaces. This means that there's no need + dactyl namespaces. This means that there's no need to wrap your plugin in a closure, as is often the practice in JavaScript development. Furthermore, any plugin which is installed in your runtimepath/plugin directory @@ -186,7 +186,7 @@ var INFO = xmlns="http://vimperator.org/namespaces/liberator"> Kris Maglione MIT - +

    This plugin provides the same features as the ever popular FlashBlock Firefox addon. Flash animations are substituted with place holders which @@ -216,9 +216,9 @@ var INFO = The inline XML is made possible by E4X. It's important that the documentation be assigned to the - INFO variable, or &liberator.appname; will not be able + INFO variable, or &dactyl.appname; will not be able to find it. The documentation that you provide behaves exactly - as other &liberator.appname; documentation, which means that + as other &dactyl.appname; documentation, which means that the tags you provide are available via :help with full tag completion and cross-referencing support. Although documentation is not required, we strongly recommend that all diff --git a/common/locale/en-US/eval.xml b/common/locale/en-US/eval.xml index 0b49eb68..5f3df1e1 100644 --- a/common/locale/en-US/eval.xml +++ b/common/locale/en-US/eval.xml @@ -1,11 +1,11 @@ - + - +

    Expression evaluation

    @@ -84,12 +84,12 @@

    The special version :javascript! opens the JavaScript console of - &liberator.host;. + &dactyl.host;.

    completion is available for :javascript cmd (but not - yet for the :js <<EOF multiline widget). Be aware that &liberator.appname; needs + yet for the :js <<EOF multiline widget). Be aware that &dactyl.appname; needs to run cmd through eval() to get the completions, which could have unwanted side effects.

    diff --git a/common/locale/en-US/gui.xml b/common/locale/en-US/gui.xml index 4affd063..eb7fce01 100644 --- a/common/locale/en-US/gui.xml +++ b/common/locale/en-US/gui.xml @@ -1,18 +1,18 @@ - + - + -

    &liberator.appname;'s GUI

    +

    &dactyl.appname;'s GUI

    - Although &liberator.appname; offers the most frequently used &liberator.host; functionality via + Although &dactyl.appname; offers the most frequently used &dactyl.host; functionality via Ex and Normal mode commands there may be times when directly accessing the GUI is required. There are commands for accessing the menu system, standard dialogs and the sidebar. @@ -26,7 +26,7 @@

    Execute menu from the command line. This command provides command-line access - to all menu items available from the main &liberator.host; menubar. menu is a + to all menu items available from the main &dactyl.host; menubar. menu is a hierarchical path to the menu item with each submenu separated by a period. E.g. :emenu File.Open File…

    @@ -41,10 +41,10 @@ :addons

    - Show available &liberator.host; Extensions and Themes. + Show available &dactyl.host; Extensions and Themes. You can add/remove/disable browser extensions from this dialog. - Be aware that not all &liberator.host; extensions work, because &liberator.appname; overrides - some key bindings and changes &liberator.host;'s GUI. + Be aware that not all &dactyl.host; extensions work, because &dactyl.appname; overrides + some key bindings and changes &dactyl.host;'s GUI.

    @@ -52,13 +52,13 @@ :dia :dialog - :dialog &liberator.host;-dialog + :dialog &dactyl.host;-dialog -

    Open a &liberator.host; dialog.

    +

    Open a &dactyl.host; dialog.

    Available dialogs:

    -
    about
    About Mozilla &liberator.host;;
    +
    about
    About Mozilla &dactyl.host;;
    addbookmark
    Add bookmark for the current page
    addons
    Manage Add-ons
    bookmarks
    List your bookmarks
    @@ -75,7 +75,7 @@
    pageinfo
    Show information about the current page
    pagesource
    View page source
    places
    Places Organizer: Manage your bookmarks and history
    -
    preferences
    Show &liberator.host; preferences dialog
    +
    preferences
    Show &dactyl.host; preferences dialog
    printpreview
    Preview the page before printing
    printsetup
    Setup the page size and orientation before printing
    print
    Show print dialog
    @@ -93,7 +93,7 @@ :downloads

    - Show progress of current downloads. Open the original &liberator.host; download dialog + Show progress of current downloads. Open the original &dactyl.host; download dialog in a new tab. Here, downloads can be paused, canceled and resumed.

    @@ -191,7 +191,7 @@

    Open the sidebar window. name is any of the menu items listed under the - standard &liberator.host; View->Sidebar menu. Add-ons, Preferences and Downloads are + standard &dactyl.host; View->Sidebar menu. Add-ons, Preferences and Downloads are also available in the sidebar.

    @@ -231,7 +231,7 @@
  • Security: The security information button is displayed when appropriate - as per &liberator.host;. The color of the status bar also changes to reflect the + as per &dactyl.host;. The color of the status bar also changes to reflect the current security status of the loaded page.
    • black – the site's identity is unverified and the connection is unencrypted
    • @@ -242,7 +242,7 @@
    • Extensions: Any extension buttons that would normally be installed to the - &liberator.host; status bar are appended to the end of the status line. + &dactyl.host; status bar are appended to the end of the status line.
    diff --git a/common/locale/en-US/hints.xml b/common/locale/en-US/hints.xml index b9439e0e..a5018aa7 100644 --- a/common/locale/en-US/hints.xml +++ b/common/locale/en-US/hints.xml @@ -1,17 +1,17 @@ - + - +

    Hints

    -Hints are the way in which &liberator.appname; allows you to follow links on a page. By +Hints are the way in which &dactyl.appname; allows you to follow links on a page. By providing each link with a suitable hint, you can access all links with a similar amount of minimal effort. This contrasts strongly with the traditional approaches offered by the mouse, in which you must first find and then aim for @@ -47,7 +47,7 @@ tedious unless you always visit the first link on a page. Start QuickHint mode, but open link in a new tab. Like normal QuickHint mode (activated with f) but opens the link in a new tab. The new tab will be loaded in background according to the - browser.tabs.loadInBackground &liberator.host; preference. + browser.tabs.loadInBackground &dactyl.host; preference.

    diff --git a/common/locale/en-US/index.xml b/common/locale/en-US/index.xml index 0546ff9a..3f91379c 100644 --- a/common/locale/en-US/index.xml +++ b/common/locale/en-US/index.xml @@ -1,11 +1,11 @@ - + - +

    Index

    @@ -37,7 +37,7 @@ This file contains a list of all available commands, mappings and options.
    Scroll window upwards in the buffer
    Pass through next key
    Decrement last number in URL
    -
    Temporarily ignore all &liberator.appname; key bindings
    +
    Temporarily ignore all &dactyl.appname; key bindings
    @@ -258,7 +258,7 @@ This file contains a list of all available commands, mappings and options.
    :delmarks
    Delete the specified marks
    :delqmarks
    Delete the specified QuickMarks
    :delstyle
    Delete any matching styles
    -
    :dialog
    Open a &liberator.host; dialog
    +
    :dialog
    Open a &dactyl.host; dialog
    :doautoall
    Apply the autocommands matching the specified URL to all buffers
    :doautocmd
    Apply the autocommands matching the specified URL to the current buffer
    :downloads
    Show progress of current downloads
    @@ -280,7 +280,7 @@ This file contains a list of all available commands, mappings and options.
    :hardcopy
    Print current document
    :help
    Open the help page
    :helpall
    Open the single unchunked help page
    -
    :highlight
    Style &liberator.appname;
    +
    :highlight
    Style &dactyl.appname;
    :history
    Show recently visited URLs
    :iabbrev
    Abbreviate a key sequence in Insert mode
    :iabclear
    Remove all abbreviations in Insert mode
    @@ -301,7 +301,7 @@ This file contains a list of all available commands, mappings and options.
    :marks
    Show all location marks of current web page
    :messages
    Display previously given messages
    :messclear
    Clear the message history
    -
    :mk&liberator.name;rc
    Write current key mappings and changed options to the config file
    +
    :mk&dactyl.name;rc
    Write current key mappings and changed options to the config file
    :nmap
    Map a key sequence in Normal mode
    :nmapclear
    Remove all mappings in Normal mode
    :nnoremap
    Map a key sequence without remapping keys in Normal mode
    @@ -314,12 +314,12 @@ This file contains a list of all available commands, mappings and options.
    :pageinfo
    Show various page information
    :pagestyle
    Select the author style sheet to apply
    :play
    Replay a recorded macro
    -
    :preferences
    Show &liberator.host; preferences dialog
    +
    :preferences
    Show &dactyl.host; preferences dialog
    :pwd
    Print the current directory name
    :qmark
    Mark a URL with a letter for quick access
    :qmarks
    Show all QuickMarks
    :quit
    Quit current tab
    -
    :quitall
    Quit &liberator.appname;
    +
    :quitall
    Quit &dactyl.appname;
    :redraw
    Redraw the screen
    :reload
    Reload the current web page
    :reloadall
    Reload all tab pages
    @@ -337,7 +337,7 @@ This file contains a list of all available commands, mappings and options.
    :source
    Read Ex commands from a file
    :stop
    Stop loading the current web page
    :stopall
    Stop loading all tab pages
    -
    :style
    Style &liberator.appname; and web sites
    +
    :style
    Style &dactyl.appname; and web sites
    :styledisable
    Disable a user style sheet
    :styleenable
    Enable a user style sheet
    :styletoggle
    Toggle a user style sheet
    @@ -392,7 +392,7 @@ This file contains a list of all available commands, mappings and options.
    eventignore
    List of autocommand event names which should be ignored
    exrc
    Allow reading of an RC file in the current directory
    extendedhinttags
    XPath string of hintable elements activated by ;
    -
    fileencoding
    Changes the character encoding that &liberator.appname; uses to read and write files
    +
    fileencoding
    Changes the character encoding that &dactyl.appname; uses to read and write files
    followhints
    Change the behaviour of in Hints mode
    fullscreen
    Show the current window fullscreen
    guioptions
    Show or hide certain GUI elements like the menu or toolbar
    diff --git a/common/locale/en-US/insert.xml b/common/locale/en-US/insert.xml index 262a49ed..fa82b2fb 100644 --- a/common/locale/en-US/insert.xml +++ b/common/locale/en-US/insert.xml @@ -1,11 +1,11 @@ - + - +

    Insert mode

    diff --git a/common/locale/en-US/map.xml b/common/locale/en-US/map.xml index e613162a..fa6b0db1 100644 --- a/common/locale/en-US/map.xml +++ b/common/locale/en-US/map.xml @@ -1,11 +1,11 @@ - + - +

    Key mappings, abbreviations, and user-defined commands

    @@ -33,12 +33,12 @@
  • Normal mode: When browsing normally
  • Visual mode: When selecting text with the cursor keys
  • Insert mode: When interacting with text fields on a website
  • -
  • Command-line mode: When typing into the &liberator.appname; command line
  • +
  • Command-line mode: When typing into the &dactyl.appname; command line
Mappings are NOT saved between sessions, make sure you put them in your - &liberator.name;rc file! + &dactyl.name;rc file!

Map commands

@@ -279,7 +279,7 @@

Abbreviations

- &liberator.appname; can automatically replace words identified as abbreviations, + &dactyl.appname; can automatically replace words identified as abbreviations, which may be used to save typing or to correct commonly misspelled words. An abbreviation can be one of three types that are defined by the types of constituent characters. Whitespace and quotes are non-keyword @@ -475,7 +475,7 @@

buffer
buffers
color
color schemes
command
Ex commands
-
dialog
&liberator.host; dialogs
+
dialog
&dactyl.host; dialogs
dir
directories
environment
environment variables
event
autocommand events
@@ -486,8 +486,8 @@
macro
named macros
mapping
user mappings
menu
menu items
-
option
&liberator.appname; options
-
preference
&liberator.host; preferences
+
option
&dactyl.appname; options
+
preference
&dactyl.host; preferences
search
search engines and keywords
shellcmd
shell commands
sidebar
sidebar panels
diff --git a/common/locale/en-US/marks.xml b/common/locale/en-US/marks.xml index c8617d44..831d77b9 100644 --- a/common/locale/en-US/marks.xml +++ b/common/locale/en-US/marks.xml @@ -1,25 +1,25 @@ - + - +

Marks

- &liberator.appname; supports a number of different marks: + &dactyl.appname; supports a number of different marks:

  • Bookmarks which allow you to mark a web page as one of your favorites for easy access.
  • QuickMarks allow you to define up to 62 (a-zA-Z0-9) web sites (or groups of web sites) which you visit most often.
  • Local marks to store the position within a web page.
  • -
  • History is also a special type of marks, as &liberator.appname; automatically remembers sites which you have visited in the past.
  • +
  • History is also a special type of marks, as &dactyl.appname; automatically remembers sites which you have visited in the past.

Bookmarks

diff --git a/common/locale/en-US/message.xml b/common/locale/en-US/message.xml index 86112cc0..721fbbc8 100644 --- a/common/locale/en-US/message.xml +++ b/common/locale/en-US/message.xml @@ -1,11 +1,11 @@ - + - +

Error and informational messages

@@ -14,7 +14,7 @@ message-history

- &liberator.appname; stores all info and error messages in a message + &dactyl.appname; stores all info and error messages in a message history. The type of info messages output can be controlled by the verbose option. The number of stored messages can be set with the messages option. diff --git a/common/locale/en-US/options.xml b/common/locale/en-US/options.xml index 5b7ca1f3..921394eb 100644 --- a/common/locale/en-US/options.xml +++ b/common/locale/en-US/options.xml @@ -1,18 +1,18 @@ - + - +

Options

- &liberator.appname; has a number of internal variables and switches which can be set to + &dactyl.appname; has a number of internal variables and switches which can be set to achieve special effects. These options come in 5 forms:

@@ -227,19 +227,19 @@ character) or $VAR. %VAR% is also supported on Windows.

-

Setting &liberator.host; options

+

Setting &dactyl.host; options

-

&liberator.host; options can be viewed and set with the following commands:

+

&dactyl.host; options can be viewed and set with the following commands:

:prefs :preferences :pref[erences]

- Show the &liberator.host; preferences dialog. You can change the browser - preferences from this dialog. Be aware that not all &liberator.host; - preferences work, because &liberator.appname; overrides some key bindings and - changes &liberator.host;'s GUI. + Show the &dactyl.host; preferences dialog. You can change the browser + preferences from this dialog. Be aware that not all &dactyl.host; + preferences work, because &dactyl.appname; overrides some key bindings and + changes &dactyl.host;'s GUI.

@@ -249,7 +249,7 @@ :pref[erences]!

- Opens about:config in the current tab where you can change advanced &liberator.host; + Opens about:config in the current tab where you can change advanced &dactyl.host; preferences.

@@ -260,7 +260,7 @@ :se[t]! preference=value

- Change any &liberator.host; preference (those in the about:config + Change any &dactyl.host; preference (those in the about:config window). You can also reset/delete those preferences with :set! preference&.

@@ -270,7 +270,7 @@ overridden-preferences

- &liberator.appname; sets several &liberator.host; preferences at startup. If this is undesirable, + &dactyl.appname; sets several &dactyl.host; preferences at startup. If this is undesirable, they can be changed to a different value in your RC file using :set! preference=value

@@ -371,7 +371,7 @@
s
Search engines and keyword URLs
f
Local files
-
l
&liberator.host; location bar entries (bookmarks and history sorted in an intelligent way)
+
l
&dactyl.host; location bar entries (bookmarks and history sorted in an intelligent way)
b
Bookmarks
h
History
S
Search engine suggestions
@@ -410,7 +410,7 @@

- If defsearch is empty, then &liberator.host; will always attempt to + If defsearch is empty, then &dactyl.host; will always attempt to open the raw [arg].

@@ -430,7 +430,7 @@

- &liberator.appname; will not behave correctly if the editor forks its own + &dactyl.appname; will not behave correctly if the editor forks its own process, such as with gvim without the -f argument. @@ -513,7 +513,7 @@ string UTF-8 -

Changes the character encoding that &liberator.appname; uses to read and write files.

+

Changes the character encoding that &dactyl.appname; uses to read and write files.

@@ -644,7 +644,7 @@
contains
The typed characters are split on whitespace, and these character groups have to match anywhere inside the text of the link.
wordstartswith
The typed characters are matched with the beginning of the first word (see wordseparators) in the link as long as possible. If no matches occur in the current word, then the matching is continued at the beginning of the next word. The words are worked through in the order they appear in the link. If the typed characters contain spaces, then the characters are split on whitespace. These character groups are then matched with the beginning of the words, beginning at the first one and continuing with the following words in the order they appear in the link.
firstletters
Behaves like wordstartswith, but non-matching words aren't overleaped.
-
custom
Delegate to a custom function: liberator.plugins.customHintMatcher(hintString)
+
custom
Delegate to a custom function: dactyl.plugins.customHintMatcher(hintString)
@@ -756,7 +756,7 @@

Use Insert mode as the default for text areas. This is useful if you - want to use the known &liberator.host; interface for editing text areas. + want to use the known &dactyl.host; interface for editing text areas. Input fields default to this behaviour irrespective of this option's setting.

@@ -814,9 +814,9 @@

Load plugin scripts when starting up. When on, yet unloaded plugins - are automatically loaded after the &liberator.name;rc file has been + are automatically loaded after the &dactyl.name;rc file has been sourced. To load plugins earlier, use the :loadplugins - command within the &liberator.name;rc. + command within the &dactyl.name;rc.

@@ -962,7 +962,7 @@ effective.

- This option does not change the popup blocker of &liberator.host; in any way. + This option does not change the popup blocker of &dactyl.host; in any way.
@@ -985,13 +985,13 @@ - $&liberator.idname;_RUNTIME + $&dactyl.idname;_RUNTIME 'rtp' 'runtimepath' 'runtimepath' 'rtp' stringlist - $&liberator.idname;_RUNTIME or - Unix, Mac: ~/.&liberator.name;, - Windows: ~/&liberator.name; + $&dactyl.idname;_RUNTIME or + Unix, Mac: ~/.&dactyl.name;, + Windows: ~/&dactyl.name;

List of directories searched for runtime files:

@@ -1003,17 +1003,17 @@

Example:

- :set runtimepath=~/my&liberator.name;,~/.&liberator.name; + :set runtimepath=~/my&dactyl.name;,~/.&dactyl.name;

This will search for plugins in both - ~/my&liberator.name;/plugin and - ~/.&liberator.name;/plugin + ~/my&dactyl.name;/plugin and + ~/.&dactyl.name;/plugin

- On startup, if the environment variable $&liberator.idname;_RUNTIME does not - exist, &liberator.appname; will set it to match this value. + On startup, if the environment variable $&dactyl.idname;_RUNTIME does not + exist, &dactyl.appname; will set it to match this value.

@@ -1212,15 +1212,15 @@ 'titlestring' 'titlestring' string - &liberator.appname; + &dactyl.appname;

- Change the title of the browser window. &liberator.appname; changes the - browser title from Title of web page - Mozilla &liberator.host; - to Title of web page - &liberator.appname;. If you don't like + Change the title of the browser window. &dactyl.appname; changes the + browser title from Title of web page - Mozilla &dactyl.host; + to Title of web page - &dactyl.appname;. If you don't like that, you can restore it with:

- :set titlestring=Mozilla &liberator.host; + :set titlestring=Mozilla &dactyl.host;
@@ -1266,7 +1266,7 @@

Define which info messages are displayed. When bigger than zero, - &liberator.appname; will give messages about what it is doing. These can be + &dactyl.appname; will give messages about what it is doing. These can be viewed at any time with the :messages command. The highest value is 15, being the most verbose mode.

diff --git a/common/locale/en-US/pattern.xml b/common/locale/en-US/pattern.xml index 036d8b1f..403df7de 100644 --- a/common/locale/en-US/pattern.xml +++ b/common/locale/en-US/pattern.xml @@ -1,20 +1,20 @@ - + - +

Text search commands

- &liberator.appname; provides a Vim-like interface to &liberator.host;'s standard text search + &dactyl.appname; provides a Vim-like interface to &dactyl.host;'s standard text search functionality. There is no support for using regular expressions in search - commands as &liberator.host; does not provide native regex support. It is unlikely that + commands as &dactyl.host; does not provide native regex support. It is unlikely that this will ever be available.

diff --git a/common/locale/en-US/print.xml b/common/locale/en-US/print.xml index 0e98332b..370c490d 100644 --- a/common/locale/en-US/print.xml +++ b/common/locale/en-US/print.xml @@ -1,11 +1,11 @@ - + - +

Printing

@@ -34,7 +34,7 @@ -

&liberator.host; printing dialogs

+

&dactyl.host; printing dialogs

The "Print Preview" and "Page Setup" dialogs can be opened via the :dialog diff --git a/common/locale/en-US/repeat.xml b/common/locale/en-US/repeat.xml index 0ef1069a..b93052fc 100644 --- a/common/locale/en-US/repeat.xml +++ b/common/locale/en-US/repeat.xml @@ -1,17 +1,17 @@ - + - +

Repeating commands

-

&liberator.appname; can repeat a number of commands and record macros.

+

&dactyl.appname; can repeat a number of commands and record macros.

Single repeats

@@ -21,7 +21,7 @@

Repeat the last keyboard mapping count times. Note that, unlike in Vim, this - does not apply solely to editing commands, mainly because &liberator.appname; doesn't + does not apply solely to editing commands, mainly because &dactyl.appname; doesn't have them.

@@ -139,8 +139,8 @@ function hello2() {

are only available within the scope of the script.

- The .&liberator.name;rc file in your home directory and any - files in ~/.&liberator.name;/plugin/ are always + The .&dactyl.name;rc file in your home directory and any + files in ~/.&dactyl.name;/plugin/ are always sourced at startup. ~ is supported as a shortcut for the $HOME directory. If ! is specified, errors are not printed. @@ -155,10 +155,10 @@ function hello2() {

Load all unloaded plugins immediately. Because plugins are automatically - loaded after &liberator.name;rc is sourced, this command must be placed early - in the &liberator.name;rc file if &liberator.name;rc also includes commands that are + loaded after &dactyl.name;rc is sourced, this command must be placed early + in the &dactyl.name;rc file if &dactyl.name;rc also includes commands that are implemented by plugins. Additionally, this command allows for sourcing - new plugins without restarting &liberator.appname;. + new plugins without restarting &dactyl.appname;.

@@ -194,7 +194,7 @@ function hello2() { :finish

- Stop sourcing a script file. This can only be called from within a &liberator.appname; + Stop sourcing a script file. This can only be called from within a &dactyl.appname; script file.

@@ -213,7 +213,7 @@ function hello2() { which might be slow, so take the results with a grain of salt.

-

If code starts with a :, it is executed as a &liberator.appname; command.

+

If code starts with a :, it is executed as a &dactyl.appname; command.

Use the special version with ! if you just want to run any command multiple diff --git a/common/locale/en-US/starting.xml b/common/locale/en-US/starting.xml index daf5b590..77041097 100644 --- a/common/locale/en-US/starting.xml +++ b/common/locale/en-US/starting.xml @@ -1,22 +1,22 @@ - + - + -

Starting &liberator.appname;

+

Starting &dactyl.appname;

startup-options

- Command-line options can be passed to &liberator.appname; via the -&liberator.name; &liberator.host; + Command-line options can be passed to &dactyl.appname; via the -&dactyl.name; &dactyl.host; option. These are passed as single string argument. - E.g., &liberator.hostbin; -&liberator.name; ++cmd 'set exrc' +u 'tempRcFile' ++noplugin + E.g., &dactyl.hostbin; -&dactyl.name; ++cmd 'set exrc' +u 'tempRcFile' ++noplugin

@@ -72,24 +72,24 @@

Initialization

-

At startup, &liberator.appname; completes the following tasks in order.

+

At startup, &dactyl.appname; completes the following tasks in order.

    -
  1. &liberator.appname; can perform user initialization commands. When +
  2. &dactyl.appname; can perform user initialization commands. When one of the following is successfully located, it is executed, and no further locations are tried.
      -
    1. - $&liberator.idname;_INIT — May contain a single Ex command (e.g., +
    2. + $&dactyl.idname;_INIT — May contain a single Ex command (e.g., ":source file").
    3. -
    4. - ~/&liberator.name;rc — Windows only. If this file exists, its contents - are executed and $MY_&liberator.idname;RC set to its path. +
    5. + ~/&dactyl.name;rc — Windows only. If this file exists, its contents + are executed and $MY_&dactyl.idname;RC set to its path.
    6. - ~/.&liberator.name;rc — If this file exists, its contents are executed. + ~/.&dactyl.name;rc — If this file exists, its contents are executed.
  3. @@ -121,7 +121,7 @@ The user's ~ (i.e., "home") directory is determined as follows:
    • On Unix and Mac, the environment variable $HOME is used.
    • - On Windows, &liberator.appname; checks for the existence of + On Windows, &dactyl.appname; checks for the existence of %HOME%, then %USERPROFILE%, and then %HOMEDRIVE%%HOMEPATH%. It uses the first one it finds. @@ -131,13 +131,13 @@ The user's ~ (i.e., "home") directory is determined as follows:

      Saving settings

      - :mkv :mk&liberator.name;rc + :mkv :mk&dactyl.name;rc :mkvimperatorrc! file

      Write current key mappings and changed options to file. If no - file is specified then ~/.&liberator.name;rc is written unless this file - already exists. The special version :mk&liberator.name;rc! will overwrite + file is specified then ~/.&dactyl.name;rc is written unless this file + already exists. The special version :mk&dactyl.name;rc! will overwrite file if it exists.

      @@ -155,7 +155,7 @@ The user's ~ (i.e., "home") directory is determined as follows: :res :restart :restart -

      Force &liberator.host; to restart. Useful when installing extensions.

      +

      Force &dactyl.host; to restart. Useful when installing extensions.

      diff --git a/common/locale/en-US/styling.xml b/common/locale/en-US/styling.xml index 05959626..a442114c 100644 --- a/common/locale/en-US/styling.xml +++ b/common/locale/en-US/styling.xml @@ -1,20 +1,20 @@ - + - +

      Styling the GUI and web pages

      - &liberator.appname; allows you to style both the browser and any web pages you view. All + &dactyl.appname; allows you to style both the browser and any web pages you view. All styling is specified via CSS. Although you may style any user interface element - via the :style command, most &liberator.appname; elements can be styled with the + via the :style command, most &dactyl.appname; elements can be styled with the :highlight command, for convenience.

      @@ -43,7 +43,7 @@ Highlight group with css. css is one or more comma separated CSS declarations (E.g. color: blue; background-color: red). Normally, css is checked for valid syntax before it's applied. Once you're certain it's valid, - ! can be used to skip the check to speed up &liberator.appname; startup. selector + ! can be used to skip the check to speed up &dactyl.appname; startup. selector can be any valid CSS selector, such as :hover, and, if provided, will restrict the match to matching elements.

      @@ -51,7 +51,7 @@

      Valid groups are:

      -
      Bell
      &liberator.appname;'s visual bell
      +
      Bell
      &dactyl.appname;'s visual bell
      Boolean
      A JavaScript Boolean object
      CmdLine
      The command line
      CmdOutput
      diff --git a/common/locale/en-US/tabs.xml b/common/locale/en-US/tabs.xml index 5c0b06cd..90f0c2da 100644 --- a/common/locale/en-US/tabs.xml +++ b/common/locale/en-US/tabs.xml @@ -1,11 +1,11 @@ - + - +

      Tabs

      @@ -355,7 +355,7 @@ See opening for other ways to open new tabs. :undoall

      - Undo closing of all closed tabs. &liberator.host; stores up to 10 closed tabs, even + Undo closing of all closed tabs. &dactyl.host; stores up to 10 closed tabs, even after a browser restart.

      diff --git a/common/locale/en-US/various.xml b/common/locale/en-US/various.xml index 7f7f7327..caf78003 100644 --- a/common/locale/en-US/various.xml +++ b/common/locale/en-US/various.xml @@ -1,11 +1,11 @@ - + - +

      Other help

      @@ -78,7 +78,7 @@

      Warning: Input redirection (< foo) not done, also do not run commands which - require stdin or it will hang &liberator.host;! It is possible to launch background + require stdin or it will hang &dactyl.host;! It is possible to launch background processes, though (e.g. :! xterm &).

      @@ -147,7 +147,7 @@ :version!

      - Show version information. You can show the &liberator.host; version page with + Show version information. You can show the &dactyl.host; version page with :version!.

      diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index d749ecbf..f0fd006e 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -119,7 +119,7 @@ function writeFile(file, data) { var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); var prefService = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService) - .getBranch("extensions.liberator.datastore."); + .getBranch("extensions.dactyl.datastore."); var json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON); function getCharPref(name) { @@ -296,9 +296,9 @@ var storage = { addObserver: function addObserver(key, callback, ref) { if (ref) { - if (!ref.liberatorStorageRefs) - ref.liberatorStorageRefs = []; - ref.liberatorStorageRefs.push(callback); + if (!ref.dactylStorageRefs) + ref.dactylStorageRefs = []; + ref.dactylStorageRefs.push(callback); var callbackRef = Cu.getWeakReference(callback); } else { @@ -322,7 +322,7 @@ var storage = { removeDeadObservers: function () { for (let [key, ary] in Iterator(observers)) { - observers[key] = ary = ary.filter(function (o) o.callback.get() && (!o.ref || o.ref.get() && o.ref.get().liberatorStorageRefs)); + observers[key] = ary = ary.filter(function (o) o.callback.get() && (!o.ref || o.ref.get() && o.ref.get().dactylStorageRefs)); if (!ary.length) delete observers[key]; } diff --git a/common/skin/liberator.css b/common/skin/dactyl.css similarity index 60% rename from common/skin/liberator.css rename to common/skin/dactyl.css index f4d60dba..b7213f3e 100644 --- a/common/skin/liberator.css +++ b/common/skin/dactyl.css @@ -1,45 +1,45 @@ -@namespace liberator url("http://vimperator.org/namespaces/liberator"); +@namespace dactyl url("http://vimperator.org/namespaces/liberator"); @namespace html url("http://www.w3.org/1999/xhtml"); /* Applied to all content */ -[liberator|activeframe] { - -moz-binding: url(chrome://liberator/content/bindings.xml#frame); +[dactyl|activeframe] { + -moz-binding: url(chrome://dactyl/content/bindings.xml#frame); } -[liberator|highlight~=HintImage], -[liberator|highlight~=Hint] { +[dactyl|highlight~=HintImage], +[dactyl|highlight~=Hint] { z-index: 5000; position: absolute !important; } -[liberator|highlight~=Search] { +[dactyl|highlight~=Search] { display: inline !important; } /* Applied only to completion buffer and MOW */ @-moz-document - url-prefix(chrome://liberator/) { + url-prefix(chrome://dactyl/) { *:-moz-loading, *:-moz-broken { display: none !important; } -[liberator|highlight~=Completions] { +[dactyl|highlight~=Completions] { width: 100%; display: table; } -[liberator|highlight~=CompItem], -[liberator|highlight~=CompTitle] { +[dactyl|highlight~=CompItem], +[dactyl|highlight~=CompTitle] { display: table-row; } -[liberator|highlight~=Completions] > ul { +[dactyl|highlight~=Completions] > ul { display: table-row; } -[liberator|highlight~=CompItem] > *, -[liberator|highlight~=CompTitle] > * { - -moz-binding: url(chrome://liberator/content/bindings.xml#compitem-td); +[dactyl|highlight~=CompItem] > *, +[dactyl|highlight~=CompTitle] > * { + -moz-binding: url(chrome://dactyl/content/bindings.xml#compitem-td); display: table-cell; vertical-align: middle; } -[liberator|highlight~=CompMsg] { +[dactyl|highlight~=CompMsg] { height: 1.5em; line-height: 1.5em !important; } @@ -69,11 +69,11 @@ @-moz-document url-prefix(chrome://) { -.liberator-container > * { +.dactyl-container > * { font-family: inherit; } -#liberator-completions { +#dactyl-completions { -moz-user-focus: ignore; overflow: -moz-scrollbars-none !important; /* does not seem to work fully */ border-width: 0px !important; @@ -90,17 +90,17 @@ statusbarpanel { font-family: monospace; } -#liberator-statusline { +#dactyl-statusline { font-family: monospace; margin: 0px; } -#liberator-statusline > label { +#dactyl-statusline > label { padding: 0px 0px 0px 8px; } -#liberator-statusline > label:first-child { +#dactyl-statusline > label:first-child { padding: 0px; } -#liberator-statusline-field-url { +#dactyl-statusline-field-url { background-color: inherit; color: inherit; } @@ -113,23 +113,23 @@ statusbarpanel { display: none; } -#liberator-commandline-prompt { +#dactyl-commandline-prompt { background-color: inherit; margin: 0px; padding: 0px; } -#liberator-commandline-command { +#dactyl-commandline-command { background-color: inherit; color: inherit; margin: 0px; } -#liberator-commandline-command html|*:focus { +#dactyl-commandline-command html|*:focus { outline-width: 0px !important } -#liberator-commandline-command .textbox-search-icons { +#dactyl-commandline-command .textbox-search-icons { visibility: collapse !important; } -#liberator-message { +#dactyl-message { margin: 0px; } @@ -140,39 +140,39 @@ statusbarpanel { /* MOW */ -#liberator-completions, -#liberator-multiline-output, -#liberator-multiline-input { +#dactyl-completions, +#dactyl-multiline-output, +#dactyl-multiline-input { overflow: hidden; background-color: white; color: black; } -#liberator-completions-content, -#liberator-multiline-output-content, -#liberator-multiline-input { +#dactyl-completions-content, +#dactyl-multiline-output-content, +#dactyl-multiline-input { white-space: pre; font-family: -moz-fixed; margin: 0px; } -#liberator-completions-content *, -#liberator-multiline-output-content *, -#liberator-commandline-prompt *, -#liberator-commandline-command { +#dactyl-completions-content *, +#dactyl-multiline-output-content *, +#dactyl-commandline-prompt *, +#dactyl-commandline-command { font: inherit; } -#liberator-completions-content table, -#liberator-multiline-output-content table { +#dactyl-completions-content table, +#dactyl-multiline-output-content table { white-space: inherit; border-spacing: 0px; } -#liberator-completions-content td, -#liberator-multiline-output-content td, -#liberator-completions-content th, -#liberator-multiline-output-content th { +#dactyl-completions-content td, +#dactyl-multiline-output-content td, +#dactyl-completions-content th, +#dactyl-multiline-output-content th { padding: 0px 2px; } diff --git a/muttator/AUTHORS b/muttator/AUTHORS index 1d99f498..7a381185 100644 --- a/muttator/AUTHORS +++ b/muttator/AUTHORS @@ -7,5 +7,5 @@ Inactive/former developers: Patches: * Christian Dietrich (too many to list) -A lot of people contributed to Vimperator, which is the basis of Muttator, so please refer +A lot of people contributed to Pentadactyl, which is the basis of Muttator, so please refer to that AUTHOR file for more contributors. diff --git a/muttator/NEWS b/muttator/NEWS index 41f3dc80..58c574ef 100644 --- a/muttator/NEWS +++ b/muttator/NEWS @@ -59,6 +59,6 @@ 2008-04-29: * version 0.1 - * first public release, straight port from Vimperator with many basic mappings + * first public release, straight port from Pentadactyl with many basic mappings // vim: set filetype=asciidoc: diff --git a/muttator/chrome.manifest b/muttator/chrome.manifest index a5d8a170..15f308fb 100644 --- a/muttator/chrome.manifest +++ b/muttator/chrome.manifest @@ -1,18 +1,18 @@ # Thunderbird content muttator content/ skin muttator classic/1.0 skin/ -locale liberator en-US locale/en-US/ +locale dactyl en-US locale/en-US/ -content liberator ../common/content/ -resource liberator ../common/modules/ -skin liberator classic/1.0 ../common/skin/ +content dactyl ../common/content/ +resource dactyl ../common/modules/ +skin dactyl classic/1.0 ../common/skin/ -override chrome://liberator/content/liberator.dtd chrome://muttator/content/liberator.dtd -override chrome://liberator/content/config.js chrome://muttator/content/config.js +override chrome://dactyl/content/dactyl.dtd chrome://muttator/content/dactyl.dtd +override chrome://dactyl/content/config.js chrome://muttator/content/config.js -overlay chrome://messenger/content/messenger.xul chrome://liberator/content/liberator.xul +overlay chrome://messenger/content/messenger.xul chrome://dactyl/content/dactyl.xul overlay chrome://messenger/content/messenger.xul chrome://muttator/content/muttator.xul -overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://muttator/content/compose/liberator.xul +overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://muttator/content/compose/dactyl.xul overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://muttator/content/compose/compose.xul diff --git a/muttator/content/addressbook.js b/muttator/content/addressbook.js index 944aa1af..00401853 100644 --- a/muttator/content/addressbook.js +++ b/muttator/content/addressbook.js @@ -62,9 +62,9 @@ const Addressbook = Module("addressbook", { if (addresses.length < 1) { if (!filter) - liberator.echoerr("Exxx: No contacts", commandline.FORCE_SINGLELINE); + dactyl.echoerr("Exxx: No contacts", commandline.FORCE_SINGLELINE); else - liberator.echoerr("Exxx: No contacts matching string '" + filter + "'", commandline.FORCE_SINGLELINE); + dactyl.echoerr("Exxx: No contacts matching string '" + filter + "'", commandline.FORCE_SINGLELINE); return false; } @@ -99,9 +99,9 @@ const Addressbook = Module("addressbook", { displayName = this.generateDisplayName(firstName, lastName); if (addressbook.add(mailAddr, firstName, lastName, displayName)) - liberator.echomsg("Added address: " + displayName + " <" + mailAddr + ">", 1, commandline.FORCE_SINGLELINE); + dactyl.echomsg("Added address: " + displayName + " <" + mailAddr + ">", 1, commandline.FORCE_SINGLELINE); else - liberator.echoerr("Exxx: Could not add contact `" + mailAddr + "'", commandline.FORCE_SINGLELINE); + dactyl.echoerr("Exxx: Could not add contact `" + mailAddr + "'", commandline.FORCE_SINGLELINE); }, { @@ -126,7 +126,7 @@ const Addressbook = Module("addressbook", { var to = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor; } catch (e) { - liberator.beep(); + dactyl.beep(); } if (!to) diff --git a/muttator/content/compose/dactyl.dtd b/muttator/content/compose/dactyl.dtd new file mode 100644 index 00000000..c92f0174 --- /dev/null +++ b/muttator/content/compose/dactyl.dtd @@ -0,0 +1,4 @@ + + + + diff --git a/muttator/content/compose/dactyl.xul b/muttator/content/compose/dactyl.xul new file mode 100644 index 00000000..bcdb613a --- /dev/null +++ b/muttator/content/compose/dactyl.xul @@ -0,0 +1,98 @@ + + + + + + +]> + + + +
<{outfile@.*all.html:h2:h1 style="border\: none"}>{target}