1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:17:59 +01:00

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
This commit is contained in:
Kris Maglione
2010-08-28 18:02:03 -04:00
parent 2e830d380a
commit 924863cd61
141 changed files with 1836 additions and 1850 deletions

30
.hgtags
View File

@@ -1,17 +1,17 @@
c5d6d5cd0dd426585f8e5afa314183208a610e59 muttator-0.5 c5d6d5cd0dd426585f8e5afa314183208a610e59 muttator-0.5
fe9ffcfb48c7050f5e6872285ff0197eb54cf213 vimperator-0.4.1 fe9ffcfb48c7050f5e6872285ff0197eb54cf213 pentadactyl-0.4.1
d063e0e23d668dcf807e2032f032a3d23486ec48 vimperator-0.5 d063e0e23d668dcf807e2032f032a3d23486ec48 pentadactyl-0.5
ce28bfd79dcc119abf59e9318d524144f45d53f5 vimperator-0.5-branch-HEAD-merge-1 ce28bfd79dcc119abf59e9318d524144f45d53f5 pentadactyl-0.5-branch-HEAD-merge-1
019506ce1fa1a647f27fb4aed293b6e0fe629d31 vimperator-0.5.1 019506ce1fa1a647f27fb4aed293b6e0fe629d31 pentadactyl-0.5.1
605db9f5c6cb5a1d65c95211f78d0a480a1566fd vimperator-0.5.2 605db9f5c6cb5a1d65c95211f78d0a480a1566fd pentadactyl-0.5.2
3b8c0bcbbf8663fde9f959efbc1ad5fda3d9d1f6 vimperator-0.5.3 3b8c0bcbbf8663fde9f959efbc1ad5fda3d9d1f6 pentadactyl-0.5.3
c9273973fc735678c3930bc15fb4915414907d23 vimperator-1.0 c9273973fc735678c3930bc15fb4915414907d23 pentadactyl-1.0
96b65677b4c5a29525fd791aaadbc51a4ba7b7c2 vimperator-1.1 96b65677b4c5a29525fd791aaadbc51a4ba7b7c2 pentadactyl-1.1
ff456886599eb7ad2cdd718eac498b6c8a9efc75 vimperator-1.2 ff456886599eb7ad2cdd718eac498b6c8a9efc75 pentadactyl-1.2
e34e4c4a9c24488f570d08200182542134e05f29 vimperator-2.0 e34e4c4a9c24488f570d08200182542134e05f29 pentadactyl-2.0
e34e4c4a9c24488f570d08200182542134e05f29 vimperator-2.0 e34e4c4a9c24488f570d08200182542134e05f29 pentadactyl-2.0
f65383ca4fc4872827f3f23350ae503c93cd66a4 vimperator-2.0~alpha1 f65383ca4fc4872827f3f23350ae503c93cd66a4 pentadactyl-2.0~alpha1
75873caffbe7327bfd1c27e615378d2a196a9286 vimperator-2.1 75873caffbe7327bfd1c27e615378d2a196a9286 pentadactyl-2.1
7777c3e4d29893701a64f46adbd60b3b06cda7a6 vimperator-2.2~beta1 7777c3e4d29893701a64f46adbd60b3b06cda7a6 pentadactyl-2.2~beta1
d4c91b705d551c63c5a0d929248ec873e978a188 vimperator-2.2 d4c91b705d551c63c5a0d929248ec873e978a188 pentadactyl-2.2
ca14d185b1506c77b748925770731b66d3dddfbe xulmus-0.1 ca14d185b1506c77b748925770731b66d3dddfbe xulmus-0.1

View File

@@ -1,6 +1,6 @@
= Hacking = = 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 your changes. In case you do, please keep the following in mind, and we'll be
happy to accept your patches. happy to accept your patches.
@@ -20,7 +20,7 @@ important, please ask.
In general: Just look at the existing source code! In general: Just look at the existing source code!
We try to target experienced JavaScript developers who do not 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 code, nor necessarily understand in-depth concepts of other
languages like Lisp or Python. Therefore, the coding style should languages like Lisp or Python. Therefore, the coding style should
feel natural to any JavaScript developer. Of course, this does not feel natural to any JavaScript developer. Of course, this does not

View File

@@ -1,4 +1,4 @@
DIRS = muttator vimperator xulmus DIRS = muttator pentadactyl xulmus
TARGETS = clean distclean doc help info jar release xpi TARGETS = clean distclean doc help info jar release xpi
.SILENT: .SILENT:

View File

@@ -4,7 +4,7 @@ TOP = $(shell pwd)
OS = $(shell uname -s) OS = $(shell uname -s)
BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S") BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S")
BASE = $(TOP)/../common BASE = $(TOP)/../common
GOOGLE_PROJ = vimperator-labs GOOGLE_PROJ = pentadactyl-labs
GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files
LOCALEDIR = locale LOCALEDIR = locale

File diff suppressed because one or more lines are too long

View File

@@ -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}"] let channel = Components.classesByID["{61ba33c0-3031-11d3-8cd0-0060b0fc14a3}"]
.getService(Ci.nsIProtocolHandler) .getService(Ci.nsIProtocolHandler)
.newChannel(ioService.newURI("chrome://liberator/content/data", null, null)) .newChannel(ioService.newURI("chrome://dactyl/content/data", null, null))
.QueryInterface(Ci.nsIRequest); .QueryInterface(Ci.nsIRequest);
const systemPrincipal = channel.owner; const systemPrincipal = channel.owner;
channel.cancel(NS_BINDING_ABORTED); channel.cancel(NS_BINDING_ABORTED);
@@ -39,9 +39,9 @@ function makeChannel(url, orig) {
channel.originalURI = orig; channel.originalURI = orig;
return channel; return channel;
} }
function fakeChannel(orig) makeChannel("chrome://liberator/content/does/not/exist", orig); function fakeChannel(orig) makeChannel("chrome://dactyl/content/does/not/exist", orig);
function redirect(to, orig) { function redirect(to, orig, time) {
let html = <html><head><meta http-equiv="Refresh" content={"0;" + to}/></head></html>.toXMLString(); let html = <html><head><meta http-equiv="Refresh" content={(time || 0) + ";" + to}/></head></html>.toXMLString();
return makeChannel(dataURL('text/html', html), ioService.newURI(to, null, null)); return makeChannel(dataURL('text/html', html), ioService.newURI(to, null, null));
} }
@@ -86,7 +86,7 @@ ChromeData.prototype = {
} }
}; };
function Liberator() { function Dactyl() {
this.wrappedJSObject = this; this.wrappedJSObject = this;
const self = this; const self = this;
@@ -94,18 +94,18 @@ function Liberator() {
this.FILE_MAP = {}; this.FILE_MAP = {};
this.OVERLAY_MAP = {}; this.OVERLAY_MAP = {};
} }
Liberator.prototype = { Dactyl.prototype = {
contractID: "@mozilla.org/network/protocol;1?name=liberator", contractID: "@mozilla.org/network/protocol;1?name=dactyl",
classID: Components.ID("{9c8f2530-51c8-4d41-b356-319e0b155c44}"), classID: Components.ID("{9c8f2530-51c8-4d41-b356-319e0b155c44}"),
classDescription: "Liberator utility protocol", classDescription: "Dactyl utility protocol",
QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIProtocolHandler]), QueryInterface: XPCOMUtils.generateQI([Components.interfaces.nsIProtocolHandler]),
_xpcom_factory: { _xpcom_factory: {
createInstance: function (outer, iid) { createInstance: function (outer, iid) {
if (!Liberator.instance) if (!Dactyl.instance)
Liberator.instance = new Liberator(); Dactyl.instance = new Dactyl();
if (outer != null) if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION; 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, defaultPort: -1,
allowPort: function (port, scheme) false, allowPort: function (port, scheme) false,
protocolFlags: 0 protocolFlags: 0
@@ -134,6 +134,9 @@ Liberator.prototype = {
newChannel: function (uri) { newChannel: function (uri) {
try { try {
if (!("all" in this.FILE_MAP))
return redirect(uri.spec, uri, 1);
switch(uri.host) { switch(uri.host) {
case "help": case "help":
let url = this.FILE_MAP[uri.path.replace(/^\/|#.*/g, "")]; let url = this.FILE_MAP[uri.path.replace(/^\/|#.*/g, "")];
@@ -144,7 +147,7 @@ Liberator.prototype = {
case "help-tag": case "help-tag":
let tag = uri.path.substr(1); let tag = uri.path.substr(1);
if (tag in this.HELP_TAGS) 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) {} catch (e) {}
@@ -153,8 +156,8 @@ Liberator.prototype = {
}; };
if (XPCOMUtils.generateNSGetFactory) if (XPCOMUtils.generateNSGetFactory)
const NSGetFactory = XPCOMUtils.generateNSGetFactory([ChromeData, Liberator]); const NSGetFactory = XPCOMUtils.generateNSGetFactory([ChromeData, Dactyl]);
else else
const NSGetModule = XPCOMUtils.generateNSGetModule([ChromeData, Liberator]); const NSGetModule = XPCOMUtils.generateNSGetModule([ChromeData, Dactyl]);
// vim: set fdm=marker sw=4 ts=4 et: // vim: set fdm=marker sw=4 ts=4 et:

View File

@@ -35,7 +35,7 @@ const AutoCommands = Module("autocommands", {
add: function (events, regex, cmd) { add: function (events, regex, cmd) {
if (typeof events == "string") { if (typeof events == "string") {
events = events.split(","); 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) { events.forEach(function (event) {
this._store.push(AutoCommand(event, RegExp(regex), cmd)); 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); 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 lastPattern = null;
let url = args.url || ""; let url = args.url || "";
@@ -127,22 +127,22 @@ const AutoCommands = Module("autocommands", {
for (let [, autoCmd] in Iterator(autoCmds)) { for (let [, autoCmd] in Iterator(autoCmds)) {
if (autoCmd.pattern.test(url)) { if (autoCmd.pattern.test(url)) {
if (!lastPattern || lastPattern.source != autoCmd.pattern.source) 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; lastPattern = autoCmd.pattern;
liberator.echomsg("autocommand " + autoCmd.command, 9); dactyl.echomsg("autocommand " + autoCmd.command, 9);
if (typeof autoCmd.command == "function") { if (typeof autoCmd.command == "function") {
try { try {
autoCmd.command.call(autoCmd, args); autoCmd.command.call(autoCmd, args);
} }
catch (e) { catch (e) {
liberator.reportError(e); dactyl.reportError(e);
liberator.echoerr(e); dactyl.echoerr(e);
} }
} }
else 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); RegExp(regex);
} }
catch (e) { catch (e) {
liberator.assert(false, "E475: Invalid argument: " + regex); dactyl.assert(false, "E475: Invalid argument: " + regex);
} }
if (event) { if (event) {
@@ -171,7 +171,7 @@ const AutoCommands = Module("autocommands", {
validEvents.push("*"); validEvents.push("*");
events = event.split(","); 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); "E216: No such group or event: " + event);
} }
@@ -221,7 +221,7 @@ const AutoCommands = Module("autocommands", {
function (args) { function (args) {
// Vim compatible // Vim compatible
if (args.length == 0) { if (args.length == 0) {
liberator.echomsg("No matching autocommands"); dactyl.echomsg("No matching autocommands");
return; return;
} }
@@ -230,14 +230,14 @@ const AutoCommands = Module("autocommands", {
let validEvents = config.autocommands.map(function (e) e[0]); let validEvents = config.autocommands.map(function (e) e[0]);
// TODO: add command validators // TODO: add command validators
liberator.assert(event != "*", dactyl.assert(event != "*",
"E217: Can't execute autocommands for ALL events"); "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); "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"); "No matching autocommands");
if (this.name == "doautoall" && liberator.has("tabs")) { if (this.name == "doautoall" && dactyl.has("tabs")) {
let current = tabs.index(); let current = tabs.index();
for (let i = 0; i < tabs.count; i++) { for (let i = 0; i < tabs.count; i++) {

View File

@@ -1,14 +1,14 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl" <bindings xmlns="http://www.mozilla.org/xbl"
xmlns:liberator="http://vimperator.org/namespaces/liberator" xmlns:dactyl="http://vimperator.org/namespaces/liberator"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl" xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="frame"> <binding id="frame">
<content> <content>
<html:div liberator:highlight="FrameIndicator"/> <html:div dactyl:highlight="FrameIndicator"/>
<children/> <children/>
</content> </content>
</binding> </binding>
@@ -19,17 +19,17 @@
<binding id="tab" display="xul:hbox" <binding id="tab" display="xul:hbox"
extends="chrome://global/content/bindings/tabbox.xml#tab"> extends="chrome://global/content/bindings/tabbox.xml#tab">
<content chromedir="ltr" closetabtext="Close Tab"> <content chromedir="ltr" closetabtext="Close Tab">
<xul:stack class="tab-icon liberator-tab-stack"> <xul:stack class="tab-icon dactyl-tab-stack">
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image" liberator:highlight="TabIcon"/> <xul:image xbl:inherits="validate,src=image" class="tab-icon-image" dactyl:highlight="TabIcon"/>
<xul:vbox> <xul:vbox>
<xul:spring flex="1"/> <xul:spring flex="1"/>
<xul:label xbl:inherits="value=ordinal" liberator:highlight="TabIconNumber"/> <xul:label xbl:inherits="value=ordinal" dactyl:highlight="TabIconNumber"/>
<xul:spring flex="1"/> <xul:spring flex="1"/>
</xul:vbox> </xul:vbox>
</xul:stack> </xul:stack>
<xul:label xbl:inherits="value=ordinal" liberator:highlight="TabNumber"/> <xul:label xbl:inherits="value=ordinal" dactyl:highlight="TabNumber"/>
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" class="tab-text" liberator:highlight="TabText"/> <xul:label flex="1" xbl:inherits="value=label,crop,accesskey" class="tab-text" dactyl:highlight="TabText"/>
<xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button" liberator:highlight="TabClose"/> <xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button" dactyl:highlight="TabClose"/>
</content> </content>
</binding> </binding>
<binding id="tab-mac" <binding id="tab-mac"
@@ -37,17 +37,17 @@
<content chromedir="ltr" closetabtext="Close Tab"> <content chromedir="ltr" closetabtext="Close Tab">
<xul:hbox class="tab-image-left" xbl:inherits="selected"/> <xul:hbox class="tab-image-left" xbl:inherits="selected"/>
<xul:hbox class="tab-image-middle" flex="1" align="center" xbl:inherits="selected"> <xul:hbox class="tab-image-middle" flex="1" align="center" xbl:inherits="selected">
<xul:stack class="tab-icon liberator-tab-stack"> <xul:stack class="tab-icon dactyl-tab-stack">
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image"/> <xul:image xbl:inherits="validate,src=image" class="tab-icon-image"/>
<xul:image class="tab-extra-status"/> <xul:image class="tab-extra-status"/>
<xul:vbox> <xul:vbox>
<xul:spring flex="1"/> <xul:spring flex="1"/>
<xul:label xbl:inherits="value=ordinal" liberator:highlight="TabIconNumber"/> <xul:label xbl:inherits="value=ordinal" dactyl:highlight="TabIconNumber"/>
<xul:spring flex="1"/> <xul:spring flex="1"/>
</xul:vbox> </xul:vbox>
</xul:stack> </xul:stack>
<xul:stack class="tab-text-stack"> <xul:stack class="tab-text-stack">
<xul:label xbl:inherits="value=ordinal" class="tab-text" liberator:highlight="TabNumber"/> <xul:label xbl:inherits="value=ordinal" class="tab-text" dactyl:highlight="TabNumber"/>
</xul:stack> </xul:stack>
<xul:stack class="tab-text-stack" flex="1"> <xul:stack class="tab-text-stack" flex="1">
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" crop="right" class="tab-text"/> <xul:label flex="1" xbl:inherits="value=label,crop,accesskey" crop="right" class="tab-text"/>

View File

@@ -10,7 +10,7 @@ const DEFAULT_FAVICON = "chrome://mozapps/skin/places/defaultFavicon.png";
// also includes methods for dealing with keywords and search engines // also includes methods for dealing with keywords and search engines
const Bookmarks = Module("bookmarks", { const Bookmarks = Module("bookmarks", {
requires: ["autocommands", "config", "liberator", "storage", "services"], requires: ["autocommands", "config", "dactyl", "storage", "services"],
init: function () { init: function () {
const faviconService = services.get("favicon"); const faviconService = services.get("favicon");
@@ -47,7 +47,7 @@ const Bookmarks = Module("bookmarks", {
const storage = modules.storage; const storage = modules.storage;
function Cache(name, store) { function Cache(name, store) {
const rootFolders = [bookmarksService.toolbarFolder, bookmarksService.bookmarksMenuFolder, bookmarksService.unfiledBookmarksFolder]; 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 bookmarks = [];
let self = this; let self = this;
@@ -154,7 +154,7 @@ const Bookmarks = Module("bookmarks", {
onItemVisited: function onItemVisited() {}, onItemVisited: function onItemVisited() {},
onItemMoved: function onItemMoved() {}, onItemMoved: function onItemMoved() {},
onItemAdded: function onItemAdded(itemId, folder, index) { 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 (bookmarksService.getItemType(itemId) == bookmarksService.TYPE_BOOKMARK) {
if (self.isBookmark(itemId)) { if (self.isBookmark(itemId)) {
let bmark = loadBookmark(readBookmark(itemId)); let bmark = loadBookmark(readBookmark(itemId));
@@ -163,14 +163,14 @@ const Bookmarks = Module("bookmarks", {
} }
}, },
onItemRemoved: function onItemRemoved(itemId, folder, index) { onItemRemoved: function onItemRemoved(itemId, folder, index) {
// liberator.dump("onItemRemoved(" + itemId + ", " + folder + ", " + index + ")\n"); // dactyl.dump("onItemRemoved(" + itemId + ", " + folder + ", " + index + ")\n");
if (deleteBookmark(itemId)) if (deleteBookmark(itemId))
storage.fireEvent(name, "remove", itemId); storage.fireEvent(name, "remove", itemId);
}, },
onItemChanged: function onItemChanged(itemId, property, isAnnotation, value) { onItemChanged: function onItemChanged(itemId, property, isAnnotation, value) {
if (isAnnotation) if (isAnnotation)
return; 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]; let bookmark = bookmarks.filter(function (item) item.id == itemId)[0];
if (bookmark) { if (bookmark) {
if (property == "tags") if (property == "tags")
@@ -241,7 +241,7 @@ const Bookmarks = Module("bookmarks", {
} }
} }
catch (e) { catch (e) {
liberator.log(e, 0); dactyl.log(e, 0);
return false; return false;
} }
@@ -285,13 +285,13 @@ const Bookmarks = Module("bookmarks", {
return bmarks.length; return bmarks.length;
} }
catch (e) { catch (e) {
liberator.log(e, 0); dactyl.log(e, 0);
return 0; return 0;
} }
}, },
// TODO: add filtering // 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() { getSearchEngines: function getSearchEngines() {
let searchEngines = []; let searchEngines = [];
for (let [, engine] in Iterator(services.get("browserSearch").getVisibleEngines({}))) { 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); let items = completion.runCompleter("bookmark", filter, maxItems, tags);
if (items.length) 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) 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) 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) else if (tags.length > 0)
liberator.echoerr("E283: No bookmarks matching tags: \"" + tags + "\""); dactyl.echoerr("E283: No bookmarks matching tags: \"" + tags + "\"");
else else
liberator.echoerr("No bookmarks set"); dactyl.echoerr("No bookmarks set");
return null; return null;
} }
}, { }, {
@@ -494,10 +494,10 @@ const Bookmarks = Module("bookmarks", {
if (bookmarks.add(false, title, url, keyword, tags, args.bang)) { if (bookmarks.add(false, title, url, keyword, tags, args.bang)) {
let extra = (title == url) ? "" : " (" + title + ")"; 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 else
liberator.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE); dactyl.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE);
}, { }, {
argCount: "?", argCount: "?",
bang: true, bang: true,
@@ -537,7 +537,7 @@ const Bookmarks = Module("bookmarks", {
function (resp) { function (resp) {
if (resp && resp.match(/^y(es)?$/i)) { if (resp && resp.match(/^y(es)?$/i)) {
bookmarks._cache.bookmarks.forEach(function (bmark) { services.get("bookmarks").removeItem(bmark.id); }); 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 url = args.string || buffer.URL;
let deletedCount = bookmarks.remove(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);
} }
}, },

View File

@@ -16,7 +16,7 @@ const Browser = Module("browser", {
// TODO: support 'nrformats'? -> probably not worth it --mst // TODO: support 'nrformats'? -> probably not worth it --mst
incrementURL: function (count) { incrementURL: function (count) {
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/); let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
liberator.assert(matches); dactyl.assert(matches);
let [, pre, number, post] = matches; let [, pre, number, post] = matches;
let newNumber = parseInt(number, 10) + count; let newNumber = parseInt(number, 10) + count;
@@ -26,7 +26,7 @@ const Browser = Module("browser", {
newNumberStr = "0" + newNumberStr; newNumberStr = "0" + newNumberStr;
} }
liberator.open(pre + newNumberStr + post); dactyl.open(pre + newNumberStr + post);
} }
}, { }, {
options: function () { options: function () {
@@ -46,7 +46,7 @@ const Browser = Module("browser", {
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val); PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE); getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
} }
catch (e) { liberator.reportError(e); } catch (e) { dactyl.reportError(e); }
return null; return null;
}, },
completer: function (context) completion.charset(context) completer: function (context) completion.charset(context)
@@ -138,7 +138,7 @@ const Browser = Module("browser", {
mappings.add([modes.NORMAL], ["~"], mappings.add([modes.NORMAL], ["~"],
"Open home directory", "Open home directory",
function () { liberator.open("~"); }); function () { dactyl.open("~"); });
mappings.add([modes.NORMAL], ["gh"], mappings.add([modes.NORMAL], ["gh"],
"Open homepage", "Open homepage",
@@ -148,7 +148,7 @@ const Browser = Module("browser", {
"Open homepage in a new tab", "Open homepage in a new tab",
function () { function () {
let homepages = gHomeButton.getHomePage(); 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"], 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 url = url.replace(/^(.*:\/+.*?)\/+$/, "$1/"); // get rid of more than 1 / at the end
if (url == buffer.URL) if (url == buffer.URL)
liberator.beep(); dactyl.beep();
else else
liberator.open(url); dactyl.open(url);
}, },
{ count: true }); { count: true });
@@ -189,8 +189,8 @@ const Browser = Module("browser", {
"Go to the root of the website", "Go to the root of the website",
function () { function () {
let uri = content.document.location; let uri = content.document.location;
liberator.assert(!/(about|mailto):/.test(uri.protocol)); // exclude these special protocols for now dactyl.assert(!/(about|mailto):/.test(uri.protocol)); // exclude these special protocols for now
liberator.open(uri.protocol + "//" + (uri.host || "") + "/"); dactyl.open(uri.protocol + "//" + (uri.host || "") + "/");
}); });
mappings.add([modes.NORMAL], ["<C-l>"], mappings.add([modes.NORMAL], ["<C-l>"],
@@ -202,7 +202,7 @@ const Browser = Module("browser", {
commands.add(["downl[oads]", "dl"], commands.add(["downl[oads]", "dl"],
"Show progress of current downloads", "Show progress of current downloads",
function () { function () {
liberator.open("chrome://mozapps/content/downloads/downloads.xul", dactyl.open("chrome://mozapps/content/downloads/downloads.xul",
{ from: "downloads"}); { from: "downloads"});
}, },
{ argCount: "0" }); { argCount: "0" });
@@ -213,9 +213,9 @@ const Browser = Module("browser", {
args = args.string; args = args.string;
if (args) if (args)
liberator.open(args); dactyl.open(args);
else else
liberator.open("about:blank"); dactyl.open("about:blank");
}, { }, {
completer: function (context) completion.url(context), completer: function (context) completion.url(context),
literal: 0, literal: 0,

View File

@@ -158,7 +158,7 @@ const Buffer = Module("buffer", {
title: doc.title title: doc.title
}; };
if (liberator.has("tabs")) { if (dactyl.has("tabs")) {
args.tab = tabs.getContentIndex(doc) + 1; args.tab = tabs.getContentIndex(doc) + 1;
args.doc = "tabs.getTab(" + (args.tab - 1) + ").linkedBrowser.contentDocument"; 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 // event listener which is is called on each page load, even if the
// page is loaded in a background tab // page is loaded in a background tab
onPageLoad: function onPageLoad(event) { 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) { if (event.originalTarget instanceof HTMLDocument) {
let doc = event.originalTarget; let doc = event.originalTarget;
// document is part of a frameset // document is part of a frameset
@@ -201,7 +205,7 @@ const Buffer = Module("buffer", {
doc.pageIsFullyLoaded = 1; doc.pageIsFullyLoaded = 1;
if (doc != config.browser.contentDocument) 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); this._triggerLoadAutocmd("PageLoad", doc);
} }
@@ -233,7 +237,7 @@ const Buffer = Module("buffer", {
// is not the focused frame // is not the focused frame
if (document.commandDispatcher.focusedWindow == webProgress.DOMWindow) { if (document.commandDispatcher.focusedWindow == webProgress.DOMWindow) {
setTimeout(function () { modes.reset(false); }, setTimeout(function () { modes.reset(false); },
liberator.mode == modes.HINTS ? 500 : 0); dactyl.mode == modes.HINTS ? 500 : 0);
} }
} }
else if (flags & Ci.nsIWebProgressListener.STATE_STOP) { else if (flags & Ci.nsIWebProgressListener.STATE_STOP) {
@@ -284,7 +288,7 @@ const Buffer = Module("buffer", {
if (ssli == 1) if (ssli == 1)
statusline.updateUrl("Link: " + link); statusline.updateUrl("Link: " + link);
else if (ssli == 2) else if (ssli == 2)
liberator.echo("Link: " + link, commandline.DISALLOW_MULTILINE); dactyl.echo("Link: " + link, commandline.DISALLOW_MULTILINE);
} }
if (link == "") { if (link == "") {
@@ -343,9 +347,9 @@ const Buffer = Module("buffer", {
* tab. * tab.
*/ */
get localStore() { get localStore() {
if (!content.liberatorStore) if (!content.dactylStore)
content.liberatorStore = {}; content.dactylStore = {};
return content.liberatorStore; return content.dactylStore;
}, },
@@ -471,7 +475,7 @@ const Buffer = Module("buffer", {
*/ */
focusAllowed: function (elem) { focusAllowed: function (elem) {
let win = elem.ownerDocument && elem.ownerDocument.defaultView || 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) { focusElement: function (elem) {
let doc = window.content.document; let doc = window.content.document;
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem; let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
win.liberatorFocusAllowed = true; win.dactylFocusAllowed = true;
if (isinstance(elem, [HTMLFrameElement, HTMLIFrameElement])) if (isinstance(elem, [HTMLFrameElement, HTMLIFrameElement]))
elem.contentWindow.focus(); elem.contentWindow.focus();
@@ -531,14 +535,14 @@ const Buffer = Module("buffer", {
// <link>s have higher priority than normal <a> hrefs // <link>s have higher priority than normal <a> hrefs
let elems = frame.document.getElementsByTagName("link"); let elems = frame.document.getElementsByTagName("link");
for (let elem in iter(elems)) { for (let elem in iter(elems)) {
liberator.open(elem.href); dactyl.open(elem.href);
return true; return true;
} }
// no links? ok, look for hrefs // no links? ok, look for hrefs
elems = frame.document.getElementsByTagName("a"); elems = frame.document.getElementsByTagName("a");
for (let elem in iter(elems)) { for (let elem in iter(elems)) {
buffer.followLink(elem, liberator.CURRENT_TAB); buffer.followLink(elem, dactyl.CURRENT_TAB);
return true; return true;
} }
@@ -548,7 +552,7 @@ const Buffer = Module("buffer", {
let elem = res.snapshotItem(i); let elem = res.snapshotItem(i);
if (regex.test(elem.textContent) || regex.test(elem.title) || if (regex.test(elem.textContent) || regex.test(elem.title) ||
Array.some(elem.childNodes, function (child) regex.test(child.alt))) { Array.some(elem.childNodes, function (child) regex.test(child.alt))) {
buffer.followLink(elem, liberator.CURRENT_TAB); buffer.followLink(elem, dactyl.CURRENT_TAB);
return true; return true;
} }
} }
@@ -562,7 +566,7 @@ const Buffer = Module("buffer", {
ret = Array.some(window.content.frames, followFrame); ret = Array.some(window.content.frames, followFrame);
if (!ret) if (!ret)
liberator.beep(); dactyl.beep();
}, },
/** /**
@@ -570,7 +574,7 @@ const Buffer = Module("buffer", {
* *
* @param {Node} elem The element to click. * @param {Node} elem The element to click.
* @param {number} where Where to open the link. See * @param {number} where Where to open the link. See
* {@link liberator.open}. * {@link dactyl.open}.
*/ */
followLink: function (elem, where) { followLink: function (elem, where) {
let doc = elem.ownerDocument; let doc = elem.ownerDocument;
@@ -594,18 +598,18 @@ const Buffer = Module("buffer", {
let ctrlKey = false, shiftKey = false; let ctrlKey = false, shiftKey = false;
switch (where) { switch (where) {
case liberator.NEW_TAB: case dactyl.NEW_TAB:
case liberator.NEW_BACKGROUND_TAB: case dactyl.NEW_BACKGROUND_TAB:
ctrlKey = true; ctrlKey = true;
shiftKey = (where != liberator.NEW_BACKGROUND_TAB); shiftKey = (where != dactyl.NEW_BACKGROUND_TAB);
break; break;
case liberator.NEW_WINDOW: case dactyl.NEW_WINDOW:
shiftKey = true; shiftKey = true;
break; break;
case liberator.CURRENT_TAB: case dactyl.CURRENT_TAB:
break; break;
default: default:
liberator.log("Invalid where argument for followLink()", 0); dactyl.log("Invalid where argument for followLink()", 0);
} }
buffer.focusElement(elem); buffer.focusElement(elem);
@@ -660,7 +664,7 @@ const Buffer = Module("buffer", {
window.saveURL(url, text, null, true, skipPrompt, makeURI(url, doc.characterSet)); window.saveURL(url, text, null, true, skipPrompt, makeURI(url, doc.characterSet));
} }
catch (e) { catch (e) {
liberator.echoerr(e); dactyl.echoerr(e);
} }
}, },
@@ -818,7 +822,7 @@ const Buffer = Module("buffer", {
if (next > frames.length - 1) { if (next > frames.length - 1) {
if (current == frames.length - 1) if (current == frames.length - 1)
liberator.beep(); dactyl.beep();
next = frames.length - 1; // still allow the frame indicator to be activated next = frames.length - 1; // still allow the frame indicator to be activated
} }
} }
@@ -827,7 +831,7 @@ const Buffer = Module("buffer", {
if (next < 0) { if (next < 0) {
if (current == 0) if (current == 0)
liberator.beep(); dactyl.beep();
next = 0; // still allow the frame indicator to be activated 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. * @param {Node} elem The element to query.
*/ */
showElementInfo: function (elem) { showElementInfo: function (elem) {
liberator.echo(<>Element:<br/>{util.objectToString(elem, true)}</>, commandline.FORCE_MULTILINE); dactyl.echo(<>Element:<br/>{util.objectToString(elem, true)}</>, commandline.FORCE_MULTILINE);
}, },
/** /**
@@ -881,7 +885,7 @@ const Buffer = Module("buffer", {
info += ", bookmarked"; info += ", bookmarked";
let pageInfoText = <>{file.quote()} [{info}] {title}</>; let pageInfoText = <>{file.quote()} [{info}] {title}</>;
liberator.echo(pageInfoText, commandline.FORCE_SINGLELINE); dactyl.echo(pageInfoText, commandline.FORCE_SINGLELINE);
return; return;
} }
@@ -890,7 +894,7 @@ const Buffer = Module("buffer", {
let opt = buffer.pageInfo[option]; let opt = buffer.pageInfo[option];
return opt ? template.table(opt[1], opt[0](true)) : undefined; return opt ? template.table(opt[1], opt[0](true)) : undefined;
}, <br/>); }, <br/>);
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); url = url.substr(PREFIX.length);
else else
url = PREFIX + url; 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), ZOOM_MAX: "ZoomManager" in window && Math.round(ZoomManager.MAX * 100),
setZoom: function setZoom(value, fullZoom) { 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 + "%)"); "Zoom value out of range (" + Buffer.ZOOM_MIN + " - " + Buffer.ZOOM_MAX + "%)");
if (fullZoom !== undefined) if (fullZoom !== undefined)
@@ -986,7 +990,7 @@ const Buffer = Module("buffer", {
let i = util.Math.constrain(cur + steps, 0, values.length - 1); let i = util.Math.constrain(cur + steps, 0, values.length - 1);
if (i == cur && fullZoom == ZoomManager.useFullZoom) if (i == cur && fullZoom == ZoomManager.useFullZoom)
liberator.beep(); dactyl.beep();
Buffer.setZoom(Math.round(values[i] * 100), fullZoom); Buffer.setZoom(Math.round(values[i] * 100), fullZoom);
}, },
@@ -994,7 +998,7 @@ const Buffer = Module("buffer", {
checkScrollYBounds: function checkScrollYBounds(win, direction) { checkScrollYBounds: function checkScrollYBounds(win, direction) {
// NOTE: it's possible to have scrollY > scrollMaxY - FF bug? // NOTE: it's possible to have scrollY > scrollMaxY - FF bug?
if (direction > 0 && win.scrollY >= win.scrollMaxY || direction < 0 && win.scrollY == 0) if (direction > 0 && win.scrollY >= win.scrollMaxY || direction < 0 && win.scrollY == 0)
liberator.beep(); dactyl.beep();
}, },
findScrollableWindow: function findScrollableWindow() { findScrollableWindow: function findScrollableWindow() {
@@ -1103,7 +1107,7 @@ const Buffer = Module("buffer", {
openUploadPrompt: function openUploadPrompt(elem) { openUploadPrompt: function openUploadPrompt(elem) {
commandline.input("Upload file: ", function (path) { commandline.input("Upload file: ", function (path) {
let file = io.File(path); let file = io.File(path);
liberator.assert(file.exists()); dactyl.assert(file.exists());
elem.value = file.path; elem.value = file.path;
}, { }, {
@@ -1116,7 +1120,7 @@ const Buffer = Module("buffer", {
commands.add(["frameo[nly]"], commands.add(["frameo[nly]"],
"Show only the current frame's page", "Show only the current frame's page",
function (args) { function (args) {
liberator.open(tabs.localStore.focusedFrame.document.documentURI); dactyl.open(tabs.localStore.focusedFrame.document.documentURI);
}, },
{ argCount: "0" }); { argCount: "0" });
@@ -1126,17 +1130,17 @@ const Buffer = Module("buffer", {
let arg = args[0]; let arg = args[0];
// FIXME: arg handling is a bit of a mess, check for filename // 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"); "E488: Trailing characters");
options.withContext(function () { options.withContext(function () {
if (arg) { if (arg) {
options.setPref("print.print_to_file", "true"); options.setPref("print.print_to_file", "true");
options.setPref("print.print_to_filename", io.File(arg.substr(1)).path); 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 else
liberator.echomsg("Sending to printer..."); dactyl.echomsg("Sending to printer...");
options.setPref("print.always_print_silent", args.bang); options.setPref("print.always_print_silent", args.bang);
options.setPref("print.show_print_progress", !args.bang); options.setPref("print.show_print_progress", !args.bang);
@@ -1145,9 +1149,9 @@ const Buffer = Module("buffer", {
}); });
if (arg) if (arg)
liberator.echomsg("Printed: " + arg.substr(1)); dactyl.echomsg("Printed: " + arg.substr(1));
else else
liberator.echomsg("Print job sent."); dactyl.echomsg("Print job sent.");
}, },
{ {
argCount: "?", argCount: "?",
@@ -1173,7 +1177,7 @@ const Buffer = Module("buffer", {
let titles = buffer.alternateStyleSheets.map(function (stylesheet) stylesheet.title); 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); "E475: Invalid argument: " + arg);
if (options["usermode"]) if (options["usermode"])
@@ -1206,7 +1210,7 @@ const Buffer = Module("buffer", {
if (filename) { if (filename) {
let file = io.File(filename); let file = io.File(filename);
liberator.assert(!file.exists() || args.bang, dactyl.assert(!file.exists() || args.bang,
"E13: File exists (add ! to override)"); "E13: File exists (add ! to override)");
chosenData = { file: file, uri: window.makeURI(doc.location.href, doc.characterSet) }; 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); level = util.Math.constrain(level, Buffer.ZOOM_MIN, Buffer.ZOOM_MAX);
} }
else else
liberator.assert(false, "E488: Trailing characters"); dactyl.assert(false, "E488: Trailing characters");
if (args.bang) if (args.bang)
buffer.fullZoom = level; buffer.fullZoom = level;
@@ -1389,12 +1393,12 @@ const Buffer = Module("buffer", {
function (count) { buffer.scrollLines(-Math.max(count, 1)); }, function (count) { buffer.scrollLines(-Math.max(count, 1)); },
{ count: true }); { count: true });
mappings.add(myModes, liberator.has("mail") ? ["h"] : ["h", "<Left>"], mappings.add(myModes, dactyl.has("mail") ? ["h"] : ["h", "<Left>"],
"Scroll document to the left", "Scroll document to the left",
function (count) { buffer.scrollColumns(-Math.max(count, 1)); }, function (count) { buffer.scrollColumns(-Math.max(count, 1)); },
{ count: true }); { count: true });
mappings.add(myModes, liberator.has("mail") ? ["l"] : ["l", "<Right>"], mappings.add(myModes, dactyl.has("mail") ? ["l"] : ["l", "<Right>"],
"Scroll document to the right", "Scroll document to the right",
function (count) { buffer.scrollColumns(Math.max(count, 1)); }, function (count) { buffer.scrollColumns(Math.max(count, 1)); },
{ count: true }); { count: true });
@@ -1420,7 +1424,7 @@ const Buffer = Module("buffer", {
mappings.add(myModes, ["%"], mappings.add(myModes, ["%"],
"Scroll to {count} percent of the document", "Scroll to {count} percent of the document",
function (count) { function (count) {
liberator.assert(count > 0 && count <= 100); dactyl.assert(count > 0 && count <= 100);
buffer.scrollToPercent(buffer.scrollXPercent, count); buffer.scrollToPercent(buffer.scrollXPercent, count);
}, },
{ count: true }); { count: true });
@@ -1492,7 +1496,7 @@ const Buffer = Module("buffer", {
return computedStyle.visibility != "hidden" && computedStyle.display != "none"; 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]; let elem = elements[util.Math.constrain(count, 1, elements.length) - 1];
buffer.focusElement(elem); buffer.focusElement(elem);
util.scrollIntoView(elem); util.scrollIntoView(elem);
@@ -1503,24 +1507,24 @@ const Buffer = Module("buffer", {
mappings.add(myModes, ["gP"], mappings.add(myModes, ["gP"],
"Open (put) a URL based on the current clipboard contents in a new buffer", "Open (put) a URL based on the current clipboard contents in a new buffer",
function () { function () {
liberator.open(util.readFromClipboard(), dactyl.open(util.readFromClipboard(),
liberator[options.get("activate").has("paste") ? "NEW_BACKGROUND_TAB" : "NEW_TAB"]); dactyl[options.get("activate").has("paste") ? "NEW_BACKGROUND_TAB" : "NEW_TAB"]);
}); });
mappings.add(myModes, ["p", "<MiddleMouse>"], mappings.add(myModes, ["p", "<MiddleMouse>"],
"Open (put) a URL based on the current clipboard contents in the current buffer", "Open (put) a URL based on the current clipboard contents in the current buffer",
function () { function () {
let url = util.readFromClipboard(); let url = util.readFromClipboard();
liberator.assert(url); dactyl.assert(url);
liberator.open(url); dactyl.open(url);
}); });
mappings.add(myModes, ["P"], mappings.add(myModes, ["P"],
"Open (put) a URL based on the current clipboard contents in a new buffer", "Open (put) a URL based on the current clipboard contents in a new buffer",
function () { function () {
let url = util.readFromClipboard(); let url = util.readFromClipboard();
liberator.assert(url); dactyl.assert(url);
liberator.open(url, { from: "paste", where: liberator.NEW_TAB }); dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB });
}); });
// reloading // reloading
@@ -1537,7 +1541,7 @@ const Buffer = Module("buffer", {
"Copy selected text or current word", "Copy selected text or current word",
function () { function () {
let sel = buffer.getCurrentWord(); let sel = buffer.getCurrentWord();
liberator.assert(sel); dactyl.assert(sel);
util.copyToClipboard(sel, true); util.copyToClipboard(sel, true);
}); });

View File

@@ -15,7 +15,7 @@
* this class when the chrome is ready. * this class when the chrome is ready.
*/ */
const CommandLine = Module("commandline", { const CommandLine = Module("commandline", {
requires: ["config", "liberator", "modes", "services", "storage", "template", "util"], requires: ["config", "dactyl", "modes", "services", "storage", "template", "util"],
init: function () { init: function () {
const self = this; const self = this;
@@ -124,7 +124,7 @@ const CommandLine = Module("commandline", {
////////////////////// VARIABLES /////////////////////////////////////////////// ////////////////////// VARIABLES ///////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{ /////////////////////////////////////////////////////////////////////////////{{{
this._completionList = ItemList("liberator-completions"); this._completionList = ItemList("dactyl-completions");
this._completions = null; this._completions = null;
this._history = null; this._history = null;
@@ -132,25 +132,25 @@ const CommandLine = Module("commandline", {
this._lastSubstring = ""; this._lastSubstring = "";
// the containing box for the this._promptWidget and this._commandWidget // 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 // 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 // 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._commandWidget.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
this._messageBox.inputField.QueryInterface(Ci.nsIDOMNSEditableElement); this._messageBox.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
// the widget used for multiline output // 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._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 // 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 // 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" // 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) { this.registerCallback("submit", modes.EX, function (command) {
commands.repeat = command; commands.repeat = command;
liberator.execute(command); dactyl.execute(command);
}); });
this.registerCallback("complete", modes.EX, function (context) { this.registerCallback("complete", modes.EX, function (context) {
context.fork("ex", 0, completion, "ex"); context.fork("ex", 0, completion, "ex");
@@ -256,7 +256,7 @@ const CommandLine = Module("commandline", {
this._setHighlightGroup(highlightGroup); this._setHighlightGroup(highlightGroup);
this._messageBox.value = str; this._messageBox.value = str;
liberator.triggerObserver("echoLine", str, highlightGroup, forceSingle); dactyl.triggerObserver("echoLine", str, highlightGroup, forceSingle);
if (!this._commandShown()) if (!this._commandShown())
commandline.hide(); commandline.hide();
@@ -277,7 +277,7 @@ const CommandLine = Module("commandline", {
let doc = this._multilineOutputWidget.contentDocument; let doc = this._multilineOutputWidget.contentDocument;
let win = this._multilineOutputWidget.contentWindow; 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. // If it's already XML, assume it knows what it's doing.
// Otherwise, white space is significant. // Otherwise, white space is significant.
@@ -350,7 +350,7 @@ const CommandLine = Module("commandline", {
get quiet() this._quiet, get quiet() this._quiet,
set quiet(val) { set quiet(val) {
this._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" : ""; node.style.opacity = this._quiet || this._silent ? "0" : "";
}); });
}, },
@@ -448,7 +448,7 @@ const CommandLine = Module("commandline", {
this._history = null; this._history = null;
statusline.updateProgress(""); // we may have a "match x of y" visible statusline.updateProgress(""); // we may have a "match x of y" visible
liberator.focusContent(false); dactyl.focusContent(false);
this._multilineInputWidget.collapsed = true; this._multilineInputWidget.collapsed = true;
this._completionList.hide(); this._completionList.hide();
@@ -495,7 +495,7 @@ const CommandLine = Module("commandline", {
* the MOW. * the MOW.
*/ */
echo: function echo(str, highlightGroup, flags) { 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) if (this._silent)
return; return;
@@ -505,11 +505,11 @@ const CommandLine = Module("commandline", {
this._messageHistory.add({ str: str, highlight: highlightGroup }); this._messageHistory.add({ str: str, highlight: highlightGroup });
if ((flags & this.ACTIVE_WINDOW) && if ((flags & this.ACTIVE_WINDOW) &&
window != services.get("windowWatcher").activeWindow && window != services.get("windowWatcher").activeWindow &&
services.get("windowWatcher").activeWindow.liberator) services.get("windowWatcher").activeWindow.dactyl)
return; return;
// The DOM isn't threadsafe. It must only be accessed from the main thread. // 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) if ((flags & this.DISALLOW_MULTILINE) && !this._outputContainer.collapsed)
return; return;
@@ -625,7 +625,7 @@ const CommandLine = Module("commandline", {
else if (event.type == "focus") { else if (event.type == "focus") {
if (!this._commandShown() && event.target == this._commandWidget.inputField) { if (!this._commandShown() && event.target == this._commandWidget.inputField) {
event.target.blur(); event.target.blur();
liberator.beep(); dactyl.beep();
} }
} }
else if (event.type == "input") { else if (event.type == "input") {
@@ -655,7 +655,7 @@ const CommandLine = Module("commandline", {
event.preventDefault(); event.preventDefault();
event.stopPropagation(); event.stopPropagation();
liberator.assert(this._history); dactyl.assert(this._history);
this._history.select(/Up/.test(key), !/(Page|S-)/.test(key)); this._history.select(/Up/.test(key), !/(Page|S-)/.test(key));
} }
// user pressed <Tab> to get completions of a command // user pressed <Tab> to get completions of a command
@@ -690,7 +690,7 @@ const CommandLine = Module("commandline", {
/** /**
* Multiline input events, they will come straight from * Multiline input events, they will come straight from
* #liberator-multiline-input in the XUL. * #dactyl-multiline-input in the XUL.
* *
* @param {Event} event * @param {Event} event
*/ */
@@ -722,8 +722,8 @@ const CommandLine = Module("commandline", {
/** /**
* Handle events when we are in multiline output mode, these come from * Handle events when we are in multiline output mode, these come from
* liberator when modes.extended & modes.MULTILINE_OUTPUT and also from * dactyl when modes.extended & modes.MULTILINE_OUTPUT and also from
* #liberator-multiline-output in the XUL. * #dactyl-multiline-output in the XUL.
* *
* @param {Event} event * @param {Event} event
*/ */
@@ -745,9 +745,9 @@ const CommandLine = Module("commandline", {
event.preventDefault(); event.preventDefault();
// FIXME: Why is this needed? --djk // FIXME: Why is this needed? --djk
if (event.target.getAttribute("href") == "#") if (event.target.getAttribute("href") == "#")
liberator.open(event.target.textContent, where); dactyl.open(event.target.textContent, where);
else else
liberator.open(event.target.href, where); dactyl.open(event.target.href, where);
} }
switch (key) { switch (key) {
@@ -757,20 +757,20 @@ const CommandLine = Module("commandline", {
tabs.select(parseInt(event.originalTarget.parentNode.parentNode.firstChild.textContent, 10) - 1); tabs.select(parseInt(event.originalTarget.parentNode.parentNode.firstChild.textContent, 10) - 1);
} }
else else
openLink(liberator.CURRENT_TAB); openLink(dactyl.CURRENT_TAB);
break; break;
case "<MiddleMouse>": case "<MiddleMouse>":
case "<C-LeftMouse>": case "<C-LeftMouse>":
case "<C-M-LeftMouse>": case "<C-M-LeftMouse>":
openLink({ where: liberator.NEW_TAB, background: true }); openLink({ where: dactyl.NEW_TAB, background: true });
break; break;
case "<S-MiddleMouse>": case "<S-MiddleMouse>":
case "<C-S-LeftMouse>": case "<C-S-LeftMouse>":
case "<C-M-S-LeftMouse>": case "<C-M-S-LeftMouse>":
openLink({ where: liberator.NEW_TAB, background: false }); openLink({ where: dactyl.NEW_TAB, background: false });
break; break;
case "<S-LeftMouse>": case "<S-LeftMouse>":
openLink(liberator.NEW_WINDOW); openLink(dactyl.NEW_WINDOW);
break; break;
} }
@@ -1039,7 +1039,7 @@ const CommandLine = Module("commandline", {
*/ */
sanitize: function (timespan) { sanitize: function (timespan) {
let range = [0, Number.MAX_VALUE]; 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"]); range = Sanitizer.getClearRange(timespan || options["sanitizetimespan"]);
const self = this; const self = this;
@@ -1082,7 +1082,7 @@ const CommandLine = Module("commandline", {
this.index += diff; this.index += diff;
if (this.index < 0 || this.index > this.store.length) { if (this.index < 0 || this.index > this.store.length) {
this.index = util.Math.constrain(this.index, 0, 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 // I don't know why this kludge is needed. It
// prevents the caret from moving to the end of // prevents the caret from moving to the end of
// the input field. // the input field.
@@ -1305,7 +1305,7 @@ const CommandLine = Module("commandline", {
for (let [, context] in Iterator(list)) { for (let [, context] in Iterator(list)) {
function done() !(idx >= n + context.items.length || idx == -2 && !context.items.length); function done() !(idx >= n + context.items.length || idx == -2 && !context.items.length);
while (context.incomplete && !done()) while (context.incomplete && !done())
liberator.threadYield(false, true); dactyl.threadYield(false, true);
if (done()) if (done())
break; break;
@@ -1371,7 +1371,7 @@ const CommandLine = Module("commandline", {
} }
if (this.items.length == 0) if (this.items.length == 0)
liberator.beep(); dactyl.beep();
} }
}), }),
@@ -1388,10 +1388,10 @@ const CommandLine = Module("commandline", {
return ""; return "";
try { try {
arg = liberator.eval(arg); arg = dactyl.eval(arg);
} }
catch (e) { catch (e) {
liberator.echoerr(e); dactyl.echoerr(e);
return null; return null;
} }
@@ -1410,17 +1410,17 @@ const CommandLine = Module("commandline", {
{ {
name: "ec[ho]", name: "ec[ho]",
description: "Echo the expression", description: "Echo the expression",
action: liberator.echo action: dactyl.echo
}, },
{ {
name: "echoe[rr]", name: "echoe[rr]",
description: "Echo the expression as an error message", description: "Echo the expression as an error message",
action: liberator.echoerr action: dactyl.echoerr
}, },
{ {
name: "echom[sg]", name: "echom[sg]",
description: "Echo the expression as an informational message", description: "Echo the expression as an informational message",
action: liberator.echomsg action: dactyl.echomsg
} }
].forEach(function (command) { ].forEach(function (command) {
commands.add([command.name], commands.add([command.name],
@@ -1448,7 +1448,7 @@ const CommandLine = Module("commandline", {
XML.ignoreWhitespace = false; XML.ignoreWhitespace = false;
let list = template.map(commandline._messageHistory.messages, function (message) let list = template.map(commandline._messageHistory.messages, function (message)
<div highlight={message.highlight + " Message"}>{message.str}</div>); <div highlight={message.highlight + " Message"}>{message.str}</div>);
liberator.echo(list, commandline.FORCE_MULTILINE); dactyl.echo(list, commandline.FORCE_MULTILINE);
} }
}, },
{ argCount: "0" }); { argCount: "0" });
@@ -1461,7 +1461,7 @@ const CommandLine = Module("commandline", {
commands.add(["sil[ent]"], commands.add(["sil[ent]"],
"Run a command silently", "Run a command silently",
function (args) { 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), completer: function (context) completion.ex(context),
literal: 0 literal: 0
@@ -1497,7 +1497,7 @@ const CommandLine = Module("commandline", {
mappings.add([modes.NORMAL], mappings.add([modes.NORMAL],
["g<"], "Redisplay the last command output", ["g<"], "Redisplay the last command output",
function () { function () {
liberator.assert(this._lastMowOutput); dactyl.assert(this._lastMowOutput);
this._echoMultiline(this._lastMowOutput, commandline.HL_NORMAL); this._echoMultiline(this._lastMowOutput, commandline.HL_NORMAL);
}); });
}, },
@@ -1527,8 +1527,8 @@ const CommandLine = Module("commandline", {
}, },
styles: function () { styles: function () {
let fontSize = util.computedStyle(document.getElementById(config.mainWindowId)).fontSize; let fontSize = util.computedStyle(document.getElementById(config.mainWindowId)).fontSize;
styles.registerSheet("chrome://liberator/skin/liberator.css"); styles.registerSheet("chrome://dactyl/skin/dactyl.css");
let error = styles.addSheet(true, "font-size", "chrome://liberator/content/buffer.xhtml", let error = styles.addSheet(true, "font-size", "chrome://dactyl/content/buffer.xhtml",
"body { font-size: " + fontSize + "; }"); "body { font-size: " + fontSize + "; }");
} }
}); });
@@ -1547,7 +1547,7 @@ const ItemList = Class("ItemList", {
var iframe = document.getElementById(id); var iframe = document.getElementById(id);
if (!iframe) { 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 return; // XXX
} }
@@ -1573,7 +1573,7 @@ const ItemList = Class("ItemList", {
_autoSize: function () { _autoSize: function () {
if (this._container.collapsed) 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._minHeight = Math.max(this._minHeight, this._divNodes.completions.getBoundingClientRect().bottom);
this._container.height = this._minHeight; this._container.height = this._minHeight;
@@ -1706,7 +1706,7 @@ const ItemList = Class("ItemList", {
this._divNodes.noCompletions.style.display = haveCompletions ? "none" : "block"; 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; return true;
}, },
@@ -1780,7 +1780,7 @@ const ItemList = Class("ItemList", {
//if (index == 0) //if (index == 0)
// this.start = now; // this.start = now;
//if (index == Math.min(len - 1, 100)) //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 onEvent: function onEvent(event) false

View File

@@ -80,7 +80,7 @@ const Command = Class("Command", {
return; return;
args.count = count; args.count = count;
args.bang = bang; args.bang = bang;
liberator.trapErrors(self.action, self, args, modifiers); dactyl.trapErrors(self.action, self, args, modifiers);
} }
if (this.hereDoc) { if (this.hereDoc) {
@@ -188,7 +188,7 @@ const Command = Class("Command", {
/** /**
* @property {function} Should return an array of <b>Object</b>s suitable * @property {function} Should return an array of <b>Object</b>s suitable
* to be passed to {@link Commands#commandToString}, one for each past * 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. * startups.
*/ */
serial: null, serial: null,
@@ -309,7 +309,7 @@ const Commands = Module("commands", {
if (command.user && replace) if (command.user && replace)
commands.removeUserCommand(command.name); commands.removeUserCommand(command.name);
else { 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; return false;
} }
} }
@@ -538,7 +538,7 @@ const Commands = Module("commands", {
if (complete) if (complete)
complete.message = error; complete.message = error;
else else
liberator.echoerr(error); dactyl.echoerr(error);
} }
outer: outer:
@@ -571,7 +571,7 @@ const Commands = Module("commands", {
let sep = sub[optname.length]; let sep = sub[optname.length];
if (sep == "=" || /\s/.test(sep) && opt[1] != this.OPTION_NOARG) { if (sep == "=" || /\s/.test(sep) && opt[1] != this.OPTION_NOARG) {
[count, arg, quote, error] = getNextArg(sub.substr(optname.length + 1)); [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 we add the argument to an option after a space, it MUST not be empty
if (sep != "=" && !quote && arg.length == 0) if (sep != "=" && !quote && arg.length == 0)
@@ -584,7 +584,7 @@ const Commands = Module("commands", {
let context = null; let context = null;
if (!complete && quote) { if (!complete && quote) {
liberator.echoerr("Invalid argument for option " + optname); dactyl.echoerr("Invalid argument for option " + optname);
return null; return null;
} }
@@ -655,18 +655,18 @@ const Commands = Module("commands", {
// if not an option, treat this token as an argument // if not an option, treat this token as an argument
let [count, arg, quote, error] = getNextArg(sub); let [count, arg, quote, error] = getNextArg(sub);
liberator.assert(!error, error); dactyl.assert(!error, error);
if (complete) { if (complete) {
args.quote = Commands.complQuote[quote] || Commands.complQuote[""]; args.quote = Commands.complQuote[quote] || Commands.complQuote[""];
args.completeFilter = arg || ""; args.completeFilter = arg || "";
} }
else if (count == -1) { else if (count == -1) {
liberator.echoerr("Error parsing arguments: " + arg); dactyl.echoerr("Error parsing arguments: " + arg);
return null; return null;
} }
else if (!onlyArgumentsRemaining && /^-/.test(arg)) { else if (!onlyArgumentsRemaining && /^-/.test(arg)) {
liberator.echoerr("Invalid option: " + arg); dactyl.echoerr("Invalid option: " + arg);
return null; return null;
} }
@@ -703,7 +703,7 @@ const Commands = Module("commands", {
if (args.length == 0 && /^[1+]$/.test(argCount) || if (args.length == 0 && /^[1+]$/.test(argCount) ||
literal != null && /[1+]/.test(argCount) && !/\S/.test(args.literalArg || "")) { literal != null && /[1+]/.test(argCount) && !/\S/.test(args.literalArg || "")) {
if (!complete) { if (!complete) {
liberator.echoerr("E471: Argument required"); dactyl.echoerr("E471: Argument required");
return null; return null;
} }
} }
@@ -816,7 +816,7 @@ const Commands = Module("commands", {
arg += res[2].replace(/\\(.)/g, "$1"); arg += res[2].replace(/\\(.)/g, "$1");
break; break;
case "vimperator": case "pentadactyl":
if ((res = str.match(/^()((?:[^\\\s"']|\\.)+)((?:\\$)?)/))) if ((res = str.match(/^()((?:[^\\\s"']|\\.)+)((?:\\$)?)/)))
arg += res[2].replace(/\\(.)/g, "$1"); arg += res[2].replace(/\\(.)/g, "$1");
else if ((res = str.match(/^(")((?:[^\\"]|\\.)*)("?)/))) else if ((res = str.match(/^(")((?:[^\\"]|\\.)*)("?)/)))
@@ -864,10 +864,10 @@ const Commands = Module("commands", {
function (count) { function (count) {
if (commands.repeat) { if (commands.repeat) {
for (let i in util.interruptibleRange(0, Math.max(count, 1), 100)) for (let i in util.interruptibleRange(0, Math.max(count, 1), 100))
liberator.execute(commands.repeat); dactyl.execute(commands.repeat);
} }
else else
liberator.echoerr("E30: No previous command line"); dactyl.echoerr("E30: No previous command line");
}, },
{ count: true }); { count: true });
}, },
@@ -923,7 +923,7 @@ const Commands = Module("commands", {
} }
} }
catch (e) { catch (e) {
liberator.reportError(e); dactyl.reportError(e);
} }
} }
} }
@@ -944,7 +944,7 @@ const Commands = Module("commands", {
count: this.count && args.count count: this.count && args.count
}; };
liberator.execute(commands.replaceTokens(this.replacementText, tokens)); dactyl.execute(commands.replaceTokens(this.replacementText, tokens));
} }
// TODO: offer completion.ex? // TODO: offer completion.ex?
@@ -968,7 +968,7 @@ const Commands = Module("commands", {
function (args) { function (args) {
let cmd = args[0]; 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) { if (args.literalArg) {
let nargsOpt = args["-nargs"] || "0"; let nargsOpt = args["-nargs"] || "0";
@@ -984,15 +984,15 @@ const Commands = Module("commands", {
completeOpt = completeOpt.substr(7); completeOpt = completeOpt.substr(7);
completeFunc = function () { completeFunc = function () {
try { try {
var completer = liberator.eval(completeOpt); var completer = dactyl.eval(completeOpt);
if (!(completer instanceof Function)) if (!(completer instanceof Function))
throw new TypeError("User-defined custom completer " + completeOpt.quote() + " is not a function"); throw new TypeError("User-defined custom completer " + completeOpt.quote() + " is not a function");
} }
catch (e) { catch (e) {
liberator.echo(":" + this.name + " ..."); dactyl.echo(":" + this.name + " ...");
liberator.echoerr("E117: Unknown function: " + completeOpt); dactyl.echoerr("E117: Unknown function: " + completeOpt);
liberator.log(e); dactyl.log(e);
return undefined; return undefined;
} }
return completer.apply(this, Array.slice(arguments)); return completer.apply(this, Array.slice(arguments));
@@ -1013,7 +1013,7 @@ const Commands = Module("commands", {
}, args.bang); }, args.bang);
if (!added) if (!added)
liberator.echoerr("E174: Command already exists: add ! to replace it"); dactyl.echoerr("E174: Command already exists: add ! to replace it");
} }
else { else {
function completerToString(completer) { function completerToString(completer) {
@@ -1041,7 +1041,7 @@ const Commands = Module("commands", {
commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); commandline.echo(str, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
} }
else else
liberator.echomsg("No user-defined commands found"); dactyl.echomsg("No user-defined commands found");
} }
}, { }, {
bang: true, bang: true,
@@ -1100,7 +1100,7 @@ const Commands = Module("commands", {
if (commands.get(name)) if (commands.get(name))
commands.removeUserCommand(name); commands.removeUserCommand(name);
else else
liberator.echoerr("E184: No such user-defined command: " + name); dactyl.echoerr("E184: No such user-defined command: " + name);
}, { }, {
argCount: "1", argCount: "1",
completer: function (context) completion.userCommand(context) completer: function (context) completion.userCommand(context)

View File

@@ -217,7 +217,7 @@ const CompletionContext = Class("CompletionContext", {
return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring }; return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring };
} }
catch (e) { catch (e) {
liberator.reportError(e); dactyl.reportError(e);
return { start: 0, items: [], longestAllSubstring: "" }; return { start: 0, items: [], longestAllSubstring: "" };
} }
}, },
@@ -260,7 +260,7 @@ const CompletionContext = Class("CompletionContext", {
this._completions = items; this._completions = items;
let self = this; let self = this;
if (this.updateAsync && !this.noUpdate) 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 get createRow() this._createRow || template.completionRow, // XXX
@@ -325,8 +325,8 @@ const CompletionContext = Class("CompletionContext", {
let lock = {}; let lock = {};
this.cache.backgroundLock = lock; this.cache.backgroundLock = lock;
this.incomplete = true; this.incomplete = true;
let thread = this.getCache("backgroundThread", liberator.newThread); let thread = this.getCache("backgroundThread", dactyl.newThread);
liberator.callAsync(thread, this, function () { dactyl.callAsync(thread, this, function () {
if (this.cache.backgroundLock != lock) if (this.cache.backgroundLock != lock)
return; return;
let items = this.generate(); let items = this.generate();
@@ -609,7 +609,7 @@ const CompletionContext = Class("CompletionContext", {
wait: function wait(interruptable, timeout) { wait: function wait(interruptable, timeout) {
let end = Date.now() + timeout; let end = Date.now() + timeout;
while (this.incomplete && (!timeout || Date.now() > end)) while (this.incomplete && (!timeout || Date.now() > end))
liberator.threadYield(false, interruptable); dactyl.threadYield(false, interruptable);
return this.incomplete; return this.incomplete;
} }
}, { }, {

View File

@@ -40,7 +40,7 @@ const ConfigBase = Class(ModuleBase, {
/** /**
* @property {string[]} A list of features available in this * @property {string[]} A list of features available in this
* application. Used extensively in feature test macros. Use * 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. * in this array.
*/ */
features: [], features: [],
@@ -56,7 +56,7 @@ const ConfigBase = Class(ModuleBase, {
hostApplication: null, 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. * arbitrary application-specific initialization code.
*/ */
init: function () {}, init: function () {},
@@ -75,7 +75,7 @@ const ConfigBase = Class(ModuleBase, {
/** /**
* @property {[[]]} An array of application specific mode specifications. * @property {[[]]} An array of application specific mode specifications.
* The values of each mode are passed to modes.addMode during * The values of each mode are passed to modes.addMode during
* liberator startup. * dactyl startup.
*/ */
modes: [], modes: [],
@@ -92,8 +92,8 @@ const ConfigBase = Class(ModuleBase, {
get outputHeight() config.browser.mPanelContainer.boxObject.height, get outputHeight() config.browser.mPanelContainer.boxObject.height,
/** /**
* @property {[string]} A list of extra scripts in the liberator or * @property {[string]} A list of extra scripts in the dactyl or
* application namespaces which should be loaded before liberator * application namespaces which should be loaded before dactyl
* initialization. * initialization.
*/ */
scripts: [], scripts: [],

View File

@@ -6,7 +6,7 @@
(function () { (function () {
const modules = {}; const modules = {};
const BASE = "chrome://liberator/content/"; const BASE = "chrome://dactyl/content/";
modules.modules = modules; modules.modules = modules;
@@ -23,7 +23,7 @@
continue; continue;
if (Components.utils.reportError) if (Components.utils.reportError)
Components.utils.reportError(e); Components.utils.reportError(e);
dump("liberator: Loading script " + script + ": " + e + "\n"); dump("dactyl: Loading script " + script + ": " + e + "\n");
dump(e.stack + "\n"); dump(e.stack + "\n");
} }
} }
@@ -40,7 +40,7 @@
"completion.js", "completion.js",
"configbase.js", "configbase.js",
"config.js", "config.js",
"liberator.js", "dactyl.js",
"editor.js", "editor.js",
"events.js", "events.js",
"finder.js", "finder.js",

View File

@@ -13,23 +13,23 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm", modules);
const plugins = { __proto__: modules }; const plugins = { __proto__: modules };
const userContext = { __proto__: modules }; const userContext = { __proto__: modules };
const EVAL_ERROR = "__liberator_eval_error"; const EVAL_ERROR = "__dactyl_eval_error";
const EVAL_RESULT = "__liberator_eval_result"; const EVAL_RESULT = "__dactyl_eval_result";
const EVAL_STRING = "__liberator_eval_string"; const EVAL_STRING = "__dactyl_eval_string";
// Move elsewhere? // Move elsewhere?
const Storage = Module("storage", { const Storage = Module("storage", {
requires: ["services"], requires: ["services"],
init: function () { 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. modules.Timer = this.Timer; // Fix me, please.
try { try {
let infoPath = services.create("file"); let infoPath = services.create("file");
infoPath.initWithPath(File.expandPath(IO.runtimePath.replace(/,.*/, ""))); infoPath.initWithPath(File.expandPath(IO.runtimePath.replace(/,.*/, "")));
infoPath.append("info"); infoPath.append("info");
infoPath.append(liberator.profileName); infoPath.append(dactyl.profileName);
this.storage.infoPath = infoPath; this.storage.infoPath = infoPath;
} }
catch (e) {} catch (e) {}
@@ -51,11 +51,11 @@ const FailedAssertion = Class("FailedAssertion", Error, {
} }
}); });
const Liberator = Module("liberator", { const Dactyl = Module("dactyl", {
requires: ["config", "services"], requires: ["config", "services"],
init: function () { init: function () {
window.liberator = this; window.dactyl = this;
window.liberator = this; window.liberator = this;
modules.liberator = this; modules.liberator = this;
this.observers = {}; this.observers = {};
@@ -69,14 +69,14 @@ const Liberator = Module("liberator", {
/** @property {string} The name of the current user profile. */ /** @property {string} The name of the current user profile. */
this.profileName = services.get("directory").get("ProfD", Ci.nsIFile).leafName.replace(/^.+?\./, ""); this.profileName = services.get("directory").get("ProfD", Ci.nsIFile).leafName.replace(/^.+?\./, "");
config.features.push(Liberator.getPlatformFeature()); config.features.push(Dactyl.getPlatformFeature());
}, },
destroy: function () { destroy: function () {
autocommands.trigger(config.name + "LeavePre", {}); autocommands.trigger(config.name + "LeavePre", {});
storage.saveAll(); storage.saveAll();
liberator.triggerObserver("shutdown", null); dactyl.triggerObserver("shutdown", null);
liberator.dump("All liberator modules destroyed\n"); dactyl.dump("All dactyl modules destroyed\n");
autocommands.trigger(config.name + "Leave", {}); autocommands.trigger(config.name + "Leave", {});
}, },
@@ -87,7 +87,7 @@ const Liberator = Module("liberator", {
get mode() modes.main, get mode() modes.main,
set mode(value) modes.main = value, set mode(value) modes.main = value,
get menuItems() Liberator.getMenuItems(), get menuItems() Dactyl.getMenuItems(),
/** @property {Element} The currently focused element. */ /** @property {Element} The currently focused element. */
get focus() document.commandDispatcher.focusedElement, get focus() document.commandDispatcher.focusedElement,
@@ -135,15 +135,15 @@ const Liberator = Module("liberator", {
forceNewTab: false, forceNewTab: false,
forceNewWindow: 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 version: "@VERSION@ (created: @DATE@)", // these VERSION and DATE tokens are replaced by the Makefile
/** /**
* @property {Object} The map of command-line options. These are * @property {Object} The map of command-line options. These are
* specified in the argument to the host application's -{config.name} * 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: * Supported options:
* +u=RCFILE Use RCFILE instead of .vimperatorrc. * +u=RCFILE Use RCFILE instead of .pentadactylrc.
* ++noplugin Don't load plugins. * ++noplugin Don't load plugins.
*/ */
commandLineOptions: { commandLineOptions: {
@@ -184,7 +184,7 @@ const Liberator = Module("liberator", {
// FIXME: popups clear the command line // FIXME: popups clear the command line
if (options["visualbell"]) { if (options["visualbell"]) {
// flash the visual bell // flash the visual bell
let popup = document.getElementById("liberator-visualbell"); let popup = document.getElementById("dactyl-visualbell");
let win = config.visualbellWindow; let win = config.visualbellWindow;
let rect = win.getBoundingClientRect(); let rect = win.getBoundingClientRect();
let width = rect.right - rect.left; let width = rect.right - rect.left;
@@ -199,7 +199,7 @@ const Liberator = Module("liberator", {
let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound); let soundService = Cc["@mozilla.org/sound;1"].getService(Ci.nsISound);
soundService.beep(); 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}/, ""); let stack = Error().stack.replace(/(?:.*\n){2}/, "");
if (frames != null) if (frames != null)
[stack] = stack.match(RegExp("(?:.*\n){0," + frames + "}")); [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; str = str.fileName + ":" + str.lineNumber + ": " + str;
if (options["errorbells"]) if (options["errorbells"])
liberator.beep(); dactyl.beep();
commandline.echo(str, commandline.HL_ERRORMSG, flags); commandline.echo(str, commandline.HL_ERRORMSG, flags);
}, },
@@ -318,20 +318,7 @@ const Liberator = Module("liberator", {
* See {@link CommandLine#echo}. * See {@link CommandLine#echo}.
*/ */
echomsg: function (str, verbosity, flags) { echomsg: function (str, verbosity, flags) {
// TODO: is there a reason for this? --djk flags |= commandline.APPEND_TO_MESSAGES;
// 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;
if (verbosity == null) if (verbosity == null)
verbosity = 0; // verbosity level is exclusionary verbosity = 0; // verbosity level is exclusionary
@@ -362,7 +349,7 @@ const Liberator = Module("liberator", {
context[EVAL_ERROR] = null; context[EVAL_ERROR] = null;
context[EVAL_STRING] = str; context[EVAL_STRING] = str;
context[EVAL_RESULT] = null; context[EVAL_RESULT] = null;
this.loadScript("chrome://liberator/content/eval.js", context); this.loadScript("chrome://dactyl/content/eval.js", context);
if (context[EVAL_ERROR]) { if (context[EVAL_ERROR]) {
try { try {
context[EVAL_ERROR].fileName = io.sourcing.file; context[EVAL_ERROR].fileName = io.sourcing.file;
@@ -383,7 +370,7 @@ const Liberator = Module("liberator", {
// partial sixth level expression evaluation // partial sixth level expression evaluation
// TODO: what is that really needed for, and where could it be used? // TODO: what is that really needed for, and where could it be used?
// Or should it be removed? (c) Viktor // 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 // I agree, the name is confusing, and so is the
// description --Kris // description --Kris
evalExpression: function (string) { evalExpression: function (string) {
@@ -393,7 +380,7 @@ const Liberator = Module("liberator", {
if (matches) { if (matches) {
let opt = this.options.get(matches[1]); 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 type = opt.type;
let value = opt.getter(); let value = opt.getter();
@@ -442,7 +429,7 @@ const Liberator = Module("liberator", {
if (command === null) { if (command === null) {
err = "E492: Not a " + config.name.toLowerCase() + " command: " + str; err = "E492: Not a " + config.name.toLowerCase() + " command: " + str;
liberator.focusContent(); dactyl.focusContent();
} }
else if (command.action === null) else if (command.action === null)
err = "E666: Internal error: command.action === null"; // TODO: need to perform this test? -- djk 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) else if (special && !command.bang)
err = "E477: No ! allowed"; err = "E477: No ! allowed";
liberator.assert(!err, err); dactyl.assert(!err, err);
if (!silent) if (!silent)
commandline.command = str.replace(/^\s*:\s*/, ""); commandline.command = str.replace(/^\s*:\s*/, "");
@@ -485,14 +472,14 @@ const Liberator = Module("liberator", {
} }
catch (e) {} catch (e) {}
if (clearFocusedElement && liberator.focus) if (clearFocusedElement && dactyl.focus)
liberator.focus.blur(); dactyl.focus.blur();
if (elem && elem != liberator.focus) if (elem && elem != dactyl.focus)
elem.focus(); elem.focus();
}, },
/** /**
* Returns whether this Liberator extension supports <b>feature</b>. * Returns whether this Dactyl extension supports <b>feature</b>.
* *
* @param {string} feature The feature name. * @param {string} feature The feature name.
* @returns {boolean} * @returns {boolean}
@@ -519,7 +506,7 @@ const Liberator = Module("liberator", {
* @returns {string} * @returns {string}
*/ */
findHelp: function (topic, unchunked) { findHelp: function (topic, unchunked) {
if (topic in services.get("liberator:").FILE_MAP) if (topic in services.get("dactyl:").FILE_MAP)
return topic; return topic;
unchunked = !!unchunked; unchunked = !!unchunked;
let items = completion._runCompleter("help", topic, null, unchunked).items; let items = completion._runCompleter("help", topic, null, unchunked).items;
@@ -544,13 +531,18 @@ const Liberator = Module("liberator", {
* Initialize the help system. * Initialize the help system.
*/ */
initHelp: function () { initHelp: function () {
if(!this.helpInitialized) { if ("noscriptOverlay" in window) {
let namespaces = [config.name.toLowerCase(), "liberator"]; noscriptOverlay.safeAllow("chrome-data:", true, false);
services.get("liberator:").init({}); noscriptOverlay.safeAllow("dactyl:", true, false);
}
let tagMap = services.get("liberator:").HELP_TAGS; if(!this.helpInitialized) {
let fileMap = services.get("liberator:").FILE_MAP; let namespaces = [config.name.toLowerCase(), "dactyl"];
let overlayMap = services.get("liberator:").OVERLAY_MAP; 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 // Left as an XPCOM instantiation so it can easilly be moved
// into XPCOM code. // into XPCOM code.
@@ -583,7 +575,7 @@ const Liberator = Module("liberator", {
tagMap[elem.value] = file; 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 // Scrape the list of help files from all.xml
// Always process main and overlay files, since XSLTProcessor and // Always process main and overlay files, since XSLTProcessor and
@@ -591,7 +583,7 @@ const Liberator = Module("liberator", {
tagMap.all = "all"; tagMap.all = "all";
let files = findHelpFile("all").map(function (doc) let files = findHelpFile("all").map(function (doc)
[f.value for (f in util.evaluateXPath( [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. // Scrape the tags from the rest of the help files.
util.Array.flatten(files).forEach(function (file) { util.Array.flatten(files).forEach(function (file) {
@@ -602,7 +594,6 @@ const Liberator = Module("liberator", {
// Process plugin help entries. // Process plugin help entries.
XML.ignoreWhiteSpace = false; 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.prettyPrinting = true; // Should be false, but ignoreWhiteSpace=false doesn't work correctly. This is the lesser evil.
XML.prettyIndent = 4; XML.prettyIndent = 4;
@@ -613,17 +604,18 @@ const Liberator = Module("liberator", {
context.INFO; context.INFO;
let help = '<?xml version="1.0"?>\n' + let help = '<?xml version="1.0"?>\n' +
'<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?>\n' + '<?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>\n' +
'<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd">' + '<!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">' +
<document xmlns={NS} <document xmlns={NS}
name="plugins" title={config.name + " Plugins"}> name="plugins" title={config.name + " Plugins"}>
<h1 tag="using-plugins">Using Plugins</h1> <h1 tag="using-plugins">Using Plugins</h1>
<toc start="2"/>
{body} {body}
</document>.toXMLString(); </document>.toXMLString();
fileMap["plugins"] = function () ['text/xml;charset=UTF-8', help]; 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; this.helpInitialized = true;
} }
}, },
@@ -637,20 +629,21 @@ const Liberator = Module("liberator", {
* @returns {string} * @returns {string}
*/ */
help: function (topic, unchunked) { help: function (topic, unchunked) {
liberator.initHelp(); dactyl.initHelp();
if (!topic) { if (!topic) {
let helpFile = unchunked ? "all" : options["helpfile"]; 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 else
liberator.echomsg("Sorry, help file " + helpFile.quote() + " not found"); dactyl.echomsg("Sorry, help file " + helpFile.quote() + " not found");
return; return;
} }
let page = this.findHelp(topic, unchunked); 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")) if (options.get("activate").has("all", "help"))
content.postMessage("fragmentChange", "*"); content.postMessage("fragmentChange", "*");
}, },
@@ -664,17 +657,17 @@ const Liberator = Module("liberator", {
loadPlugins: function () { loadPlugins: function () {
function sourceDirectory(dir) { 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) { 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 { try {
io.source(file.path, false); io.source(file.path, false);
liberator.pluginFiles[file.path] = true; dactyl.pluginFiles[file.path] = true;
} }
catch (e) { catch (e) {
liberator.reportError(e); dactyl.reportError(e);
} }
} }
else if (file.isDirectory()) else if (file.isDirectory())
@@ -685,15 +678,15 @@ const Liberator = Module("liberator", {
let dirs = io.getRuntimeDirectories("plugin"); let dirs = io.getRuntimeDirectories("plugin");
if (dirs.length == 0) { if (dirs.length == 0) {
liberator.log("No user plugin directory found", 3); dactyl.log("No user plugin directory found", 3);
return; 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); + [dir.path.replace(/.plugin$/, "") for ([, dir] in Iterator(dirs))].join(",") + '"', 2);
dirs.forEach(function (dir) { dirs.forEach(function (dir) {
liberator.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3); dactyl.echomsg("Searching for \"" + (dir.path + "/**/*.{js,vimp}") + "\"", 3);
sourceDirectory(dir); sourceDirectory(dir);
}); });
}, },
@@ -715,7 +708,7 @@ const Liberator = Module("liberator", {
// options does not exist at the very beginning // options does not exist at the very beginning
if (modules.options) if (modules.options)
verbose = options.getPref("extensions.liberator.loglevel", 0); verbose = options.getPref("extensions.dactyl.loglevel", 0);
if (level > verbose) if (level > verbose)
return; return;
@@ -736,25 +729,25 @@ const Liberator = Module("liberator", {
* or: * or:
* [["url1", postdata1], ["url2", postdata2], ...] * [["url1", postdata1], ["url2", postdata2], ...]
* @param {number|Object} where If ommited, CURRENT_TAB is assumed but NEW_TAB * @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 * @param {boolean} force Don't prompt whether to open more than 20
* tabs. * tabs.
* @returns {boolean} * @returns {boolean}
*/ */
open: function (urls, params, force) { open: function (urls, params, force) {
// convert the string to an array of converted URLs // 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 // This is strange. And counterintuitive. Is it really
// necessary? --Kris // necessary? --Kris
if (typeof urls == "string") if (typeof urls == "string")
urls = liberator.stringToURLArray(urls); urls = dactyl.stringToURLArray(urls);
if (urls.length > 20 && !force) { if (urls.length > 20 && !force) {
commandline.input("This will open " + urls.length + " new tabs. Would you like to continue? (yes/[no]) ", commandline.input("This will open " + urls.length + " new tabs. Would you like to continue? (yes/[no]) ",
function (resp) { function (resp) {
if (resp && resp.match(/^y(es)?$/i)) if (resp && resp.match(/^y(es)?$/i))
liberator.open(urls, params, true); dactyl.open(urls, params, true);
}); });
return; return;
} }
@@ -768,11 +761,11 @@ const Liberator = Module("liberator", {
if (params[opt]) if (params[opt])
flags |= Ci.nsIWebNavigation["LOAD_FLAGS_" + flag]; flags |= Ci.nsIWebNavigation["LOAD_FLAGS_" + flag];
let where = params.where || liberator.CURRENT_TAB; let where = params.where || dactyl.CURRENT_TAB;
let background = ("background" in params) ? params.background : params.where == liberator.NEW_BACKGROUND_TAB; let background = ("background" in params) ? params.background : params.where == dactyl.NEW_BACKGROUND_TAB;
if ("from" in params && liberator.has("tabs")) { if ("from" in params && dactyl.has("tabs")) {
if (!('where' in params) && options.get("newtab").has("all", params.from)) 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); background = !options.get("activate").has("all", params.from);
} }
@@ -787,13 +780,13 @@ const Liberator = Module("liberator", {
// decide where to load the first url // decide where to load the first url
switch (where) { switch (where) {
case liberator.CURRENT_TAB: case dactyl.CURRENT_TAB:
browser.loadURIWithFlags(url, flags, null, null, postdata); browser.loadURIWithFlags(url, flags, null, null, postdata);
break; break;
case liberator.NEW_TAB: case dactyl.NEW_TAB:
if (!liberator.has("tabs")) { if (!dactyl.has("tabs")) {
open(urls, liberator.NEW_WINDOW); open(urls, dactyl.NEW_WINDOW);
return; return;
} }
@@ -803,7 +796,7 @@ const Liberator = Module("liberator", {
}); });
break; break;
case liberator.NEW_WINDOW: case dactyl.NEW_WINDOW:
window.open(); window.open();
let win = services.get("windowMediator").getMostRecentWindow("navigator:browser"); let win = services.get("windowMediator").getMostRecentWindow("navigator:browser");
win.loadURI(url, null, postdata); win.loadURI(url, null, postdata);
@@ -814,12 +807,12 @@ const Liberator = Module("liberator", {
catch(e) {} catch(e) {}
} }
if (liberator.forceNewTab) if (dactyl.forceNewTab)
where = liberator.NEW_TAB; where = dactyl.NEW_TAB;
else if (liberator.forceNewWindow) else if (dactyl.forceNewWindow)
where = liberator.NEW_WINDOW; where = dactyl.NEW_WINDOW;
else if (!where) else if (!where)
where = liberator.CURRENT_TAB; where = dactyl.CURRENT_TAB;
for (let [, url] in Iterator(urls)) { for (let [, url] in Iterator(urls)) {
open(url, where); open(url, where);
@@ -940,12 +933,12 @@ const Liberator = Module("liberator", {
catch (e) { catch (e) {
if (e instanceof FailedAssertion) { if (e instanceof FailedAssertion) {
if (e.message) if (e.message)
liberator.echoerr(e.message); dactyl.echoerr(e.message);
else else
liberator.beep(); dactyl.beep();
} }
else else
liberator.reportError(e); dactyl.reportError(e);
return undefined; return undefined;
} }
}, },
@@ -969,14 +962,14 @@ const Liberator = Module("liberator", {
if (!(k in obj)) if (!(k in obj))
obj[k] = v; obj[k] = v;
} }
if (liberator.storeErrors) { if (dactyl.storeErrors) {
let errors = storage.newArray("errors", { store: false }); 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.toString = function () [String(v[0]) + "\n" + v[1] for ([k, v] in this)].join("\n\n");
errors.push([new Date, obj + obj.stack]); errors.push([new Date, obj + obj.stack]);
} }
liberator.dump(String(error)); dactyl.dump(String(error));
liberator.dump(obj); dactyl.dump(obj);
liberator.dump(""); dactyl.dump("");
} }
catch (e) { window.dump(e); } 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 * Parses a Dactyl command-line string i.e. the value of the
* -liberator command-line option. * -dactyl command-line option.
* *
* @param {string} cmdline The string to parse for command-line * @param {string} cmdline The string to parse for command-line
* options. * options.
@@ -1044,10 +1037,10 @@ const Liberator = Module("liberator", {
threadYield: function (flush, interruptable) { threadYield: function (flush, interruptable) {
let mainThread = services.get("threadManager").mainThread; let mainThread = services.get("threadManager").mainThread;
liberator.interrupted = false; dactyl.interrupted = false;
do { do {
mainThread.processNextEvent(!flush); mainThread.processNextEvent(!flush);
if (liberator.interrupted) if (dactyl.interrupted)
throw new Error("Interrupted"); throw new Error("Interrupted");
} }
while (flush === true && mainThread.hasPendingEvents()); 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 // show a usage index either in the MOW or as a full help page
showHelpIndex: function (tag, items, inMow) { showHelpIndex: function (tag, items, inMow) {
if (inMow) if (inMow)
liberator.echo(template.usage(items), commandline.FORCE_MULTILINE); dactyl.echo(template.usage(items), commandline.FORCE_MULTILINE);
else 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: function () {
options.add(["errorbells", "eb"], options.add(["errorbells", "eb"],
"Ring the bell when an error message is displayed", "Ring the bell when an error message is displayed",
@@ -1287,31 +1280,31 @@ const Liberator = Module("liberator", {
mappings: function () { mappings: function () {
mappings.add(modes.all, ["<F1>"], mappings.add(modes.all, ["<F1>"],
"Open the help page", "Open the help page",
function () { liberator.help(); }); function () { dactyl.help(); });
if (liberator.has("session")) { if (dactyl.has("session")) {
mappings.add([modes.NORMAL], ["ZQ"], mappings.add([modes.NORMAL], ["ZQ"],
"Quit and don't save the session", "Quit and don't save the session",
function () { liberator.quit(false); }); function () { dactyl.quit(false); });
} }
mappings.add([modes.NORMAL], ["ZZ"], mappings.add([modes.NORMAL], ["ZZ"],
"Quit and save the session", "Quit and save the session",
function () { liberator.quit(true); }); function () { dactyl.quit(true); });
}, },
commands: function () { commands: function () {
commands.add(["addo[ns]"], commands.add(["addo[ns]"],
"Manage available Extensions and Themes", "Manage available Extensions and Themes",
function () { function () {
liberator.open("chrome://mozapps/content/extensions/extensions.xul", dactyl.open("chrome://mozapps/content/extensions/extensions.xul",
{ from: "addons" }); { from: "addons" });
}, },
{ argCount: "0" }); { argCount: "0" });
commands.add(["beep"], commands.add(["beep"],
"Play a system beep", // Play? Wrong word. Implies some kind of musicality. --Kris "Play a system beep", // Play? Wrong word. Implies some kind of musicality. --Kris
function () { liberator.beep(); }, function () { dactyl.beep(); },
{ argCount: "0" }); { argCount: "0" });
commands.add(["dia[log]"], commands.add(["dia[log]"],
@@ -1320,11 +1313,11 @@ const Liberator = Module("liberator", {
let arg = args[0]; let arg = args[0];
try { 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](); config.dialogs[args[0]][1]();
} }
catch (e) { catch (e) {
liberator.echoerr("Error opening " + arg.quote() + ": " + e); dactyl.echoerr("Error opening " + arg.quote() + ": " + e);
} }
}, { }, {
argCount: "1", argCount: "1",
@@ -1339,9 +1332,9 @@ const Liberator = Module("liberator", {
"Execute the specified menu item from the command line", "Execute the specified menu item from the command line",
function (args) { function (args) {
let arg = args.literalArg; 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); "E334: Menu not found: " + arg);
for (let [, item] in Iterator(items)) { for (let [, item] in Iterator(items)) {
@@ -1363,11 +1356,11 @@ const Liberator = Module("liberator", {
// from quoted args // from quoted args
function (args) { function (args) {
try { try {
let cmd = liberator.eval(args.string); let cmd = dactyl.eval(args.string);
liberator.execute(cmd, null, true); dactyl.execute(cmd, null, true);
} }
catch (e) { catch (e) {
liberator.echoerr(e); dactyl.echoerr(e);
} }
}); });
@@ -1451,9 +1444,9 @@ const Liberator = Module("liberator", {
else if (file.isReadable() && file.isFile()) else if (file.isReadable() && file.isFile())
AddonManager.getInstallForFile(file, callResult("install"), "application/x-xpinstall"); AddonManager.getInstallForFile(file, callResult("install"), "application/x-xpinstall");
else if (file.isDirectory()) else if (file.isDirectory())
liberator.echomsg("Cannot install a directory: \"" + file.path + "\"", 0); dactyl.echomsg("Cannot install a directory: \"" + file.path + "\"", 0);
else else
liberator.echoerr("E484: Can't open file " + file.path); dactyl.echoerr("E484: Can't open file " + file.path);
}, { }, {
argCount: "1", argCount: "1",
completer: function (context) { completer: function (context) {
@@ -1487,9 +1480,9 @@ const Liberator = Module("liberator", {
function (args) { function (args) {
let name = args[0]; let name = args[0];
if (args.bang) if (args.bang)
liberator.assert(!name, "E488: Trailing characters"); dactyl.assert(!name, "E488: Trailing characters");
else else
liberator.assert(name, "E471: Argument required"); dactyl.assert(name, "E471: Argument required");
AddonManager.getAddonsByTypes(["extension"], function (list) { AddonManager.getAddonsByTypes(["extension"], function (list) {
if (!args.bang) if (!args.bang)
@@ -1514,11 +1507,11 @@ const Liberator = Module("liberator", {
AddonManager.getAddonsByTypes(["extension"], function (list) { AddonManager.getAddonsByTypes(["extension"], function (list) {
list = list.filter(function (extension) extension.name == args[0]); list = list.filter(function (extension) extension.name == args[0]);
if (!list.length || !list[0].optionsURL) if (!list.length || !list[0].optionsURL)
liberator.echoerr("E474: Invalid argument"); dactyl.echoerr("E474: Invalid argument");
else if (args.bang) else if (args.bang)
window.openDialog(list[0].optionsURL, "_blank", "chrome"); window.openDialog(list[0].optionsURL, "_blank", "chrome");
else else
liberator.open(list[0].optionsURL, { from: "extoptions" }); dactyl.open(list[0].optionsURL, { from: "extoptions" });
}); });
}, { }, {
argCount: "1", argCount: "1",
@@ -1559,9 +1552,9 @@ const Liberator = Module("liberator", {
} }
else { else {
if (filter) if (filter)
liberator.echoerr("Exxx: No extension matching \"" + filter + "\""); dactyl.echoerr("Exxx: No extension matching \"" + filter + "\"");
else else
liberator.echoerr("No extensions installed"); dactyl.echoerr("No extensions installed");
} }
}); });
}, },
@@ -1571,7 +1564,7 @@ const Liberator = Module("liberator", {
commands.add(["exu[sage]"], commands.add(["exu[sage]"],
"List all Ex commands with a short description", "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", argCount: "0",
bang: true bang: true
}); });
@@ -1590,9 +1583,9 @@ const Liberator = Module("liberator", {
commands.add([command.name], commands.add([command.name],
command.description, command.description,
function (args) { 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: "?", argCount: "?",
bang: true, bang: true,
@@ -1605,15 +1598,15 @@ const Liberator = Module("liberator", {
"Run a JavaScript command through eval()", "Run a JavaScript command through eval()",
function (args) { function (args) {
if (args.bang) { // open JavaScript console if (args.bang) { // open JavaScript console
liberator.open("chrome://global/content/console.xul", dactyl.open("chrome://global/content/console.xul",
{ from: "javascript" }); { from: "javascript" });
} }
else { else {
try { try {
liberator.eval(args.string); dactyl.eval(args.string);
} }
catch (e) { catch (e) {
liberator.echoerr(e); dactyl.echoerr(e);
} }
} }
}, { }, {
@@ -1625,7 +1618,7 @@ const Liberator = Module("liberator", {
commands.add(["loadplugins", "lpl"], commands.add(["loadplugins", "lpl"],
"Load all plugins immediately", "Load all plugins immediately",
function () { liberator.loadPlugins(); }, function () { dactyl.loadPlugins(); },
{ argCount: "0" }); { argCount: "0" });
commands.add(["norm[al]"], commands.add(["norm[al]"],
@@ -1638,18 +1631,18 @@ const Liberator = Module("liberator", {
commands.add(["optionu[sage]"], commands.add(["optionu[sage]"],
"List all options with a short description", "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", argCount: "0",
bang: true bang: true
}); });
commands.add(["q[uit]"], commands.add(["q[uit]"],
liberator.has("tabs") ? "Quit current tab" : "Quit application", dactyl.has("tabs") ? "Quit current tab" : "Quit application",
function (args) { function (args) {
if (liberator.has("tabs")) if (dactyl.has("tabs"))
tabs.remove(config.browser.mCurrentTab, 1, false, 1); tabs.remove(config.browser.mCurrentTab, 1, false, 1);
else else
liberator.quit(false, args.bang); dactyl.quit(false, args.bang);
}, { }, {
argCount: "0", argCount: "0",
bang: true bang: true
@@ -1657,7 +1650,7 @@ const Liberator = Module("liberator", {
commands.add(["res[tart]"], commands.add(["res[tart]"],
"Force " + config.name + " to restart", "Force " + config.name + " to restart",
function () { liberator.restart(); }, function () { dactyl.restart(); },
{ argCount: "0" }); { argCount: "0" });
var toolbox = document.getElementById("navigator-toolbox"); var toolbox = document.getElementById("navigator-toolbox");
@@ -1670,7 +1663,7 @@ const Liberator = Module("liberator", {
commands.add(names, desc, commands.add(names, desc,
function (args) { function (args) {
let toolbar = findToolbar(args[0]); let toolbar = findToolbar(args[0]);
liberator.assert(toolbar, "E474: Invalid argument"); dactyl.assert(toolbar, "E474: Invalid argument");
action(toolbar); action(toolbar);
}, { }, {
argcount: "1", argcount: "1",
@@ -1701,9 +1694,9 @@ const Liberator = Module("liberator", {
args = args.string; args = args.string;
if (args[0] == ":") if (args[0] == ":")
var method = function () liberator.execute(args, null, true); var method = function () dactyl.execute(args, null, true);
else else
method = liberator.eval("(function () {" + args + "})"); method = dactyl.eval("(function () {" + args + "})");
try { try {
if (count > 1) { if (count > 1) {
@@ -1756,13 +1749,13 @@ const Liberator = Module("liberator", {
let afterTime = Date.now(); let afterTime = Date.now();
if (afterTime - beforeTime >= 100) 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 else
liberator.echo("Total time: " + (afterTime - beforeTime) + " msec"); dactyl.echo("Total time: " + (afterTime - beforeTime) + " msec");
} }
} }
catch (e) { catch (e) {
liberator.echoerr(e); dactyl.echoerr(e);
} }
}, { }, {
argCount: "+", argCount: "+",
@@ -1787,7 +1780,7 @@ const Liberator = Module("liberator", {
try { try {
vbs.set(args.count || 1); vbs.set(args.count || 1);
vbs.setFrom = null; vbs.setFrom = null;
liberator.execute(args[0], null, true); dactyl.execute(args[0], null, true);
} }
finally { finally {
vbs.set(value); vbs.set(value);
@@ -1804,9 +1797,9 @@ const Liberator = Module("liberator", {
"Show version information", "Show version information",
function (args) { function (args) {
if (args.bang) if (args.bang)
liberator.open("about:"); dactyl.open("about:");
else else
liberator.echo(template.commandOutput(<>{config.name} {liberator.version} running on:<br/>{navigator.userAgent}</>)); dactyl.echo(template.commandOutput(<>{config.name} {dactyl.version} running on:<br/>{navigator.userAgent}</>));
}, { }, {
argCount: "0", argCount: "0",
bang: true bang: true
@@ -1814,7 +1807,7 @@ const Liberator = Module("liberator", {
commands.add(["viu[sage]"], commands.add(["viu[sage]"],
"List all mappings with a short description", "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", argCount: "0",
bang: true bang: true
}); });
@@ -1839,10 +1832,10 @@ const Liberator = Module("liberator", {
}; };
completion.help = function help(context, unchunked) { completion.help = function help(context, unchunked) {
liberator.initHelp(); dactyl.initHelp();
context.title = ["Help"]; context.title = ["Help"];
context.anchored = false; context.anchored = false;
context.completions = services.get("liberator:").HELP_TAGS; context.completions = services.get("dactyl:").HELP_TAGS;
if (unchunked) if (unchunked)
context.keys = { text: 0, description: function () "all" }; context.keys = { text: 0, description: function () "all" };
}; };
@@ -1851,7 +1844,7 @@ const Liberator = Module("liberator", {
context.title = ["Menu Path", "Label"]; context.title = ["Menu Path", "Label"];
context.anchored = false; context.anchored = false;
context.keys = { text: "fullMenuPath", description: function (item) item.getAttribute("label") }; context.keys = { text: "fullMenuPath", description: function (item) item.getAttribute("label") };
context.completions = liberator.menuItems; context.completions = dactyl.menuItems;
}; };
var toolbox = document.getElementById("navigator-toolbox"); var toolbox = document.getElementById("navigator-toolbox");
@@ -1863,34 +1856,34 @@ const Liberator = Module("liberator", {
completion.window = function window(context) { completion.window = function window(context) {
context.title = ["Window", "Title"] context.title = ["Window", "Title"]
context.keys = { text: function (win) liberator.windows.indexOf(win) + 1, description: function (win) win.document.title }; context.keys = { text: function (win) dactyl.windows.indexOf(win) + 1, description: function (win) win.document.title };
context.completions = liberator.windows; context.completions = dactyl.windows;
}; };
}, },
load: function () { 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()); services.add("commandLineHandler", "@mozilla.org/commandlinehandler/general-startup;1?type=" + config.name.toLowerCase());
let commandline = services.get("commandLineHandler").optionValue; let commandline = services.get("commandLineHandler").optionValue;
if (commandline) { if (commandline) {
let args = liberator.parseCommandLine(commandline); let args = dactyl.parseCommandLine(commandline);
liberator.commandLineOptions.rcFile = args["+u"]; dactyl.commandLineOptions.rcFile = args["+u"];
liberator.commandLineOptions.noPlugins = "++noplugin" in args; dactyl.commandLineOptions.noPlugins = "++noplugin" in args;
liberator.commandLineOptions.postCommands = args["+c"]; dactyl.commandLineOptions.postCommands = args["+c"];
liberator.commandLineOptions.preCommands = args["++cmd"]; dactyl.commandLineOptions.preCommands = args["++cmd"];
liberator.dump("Processing command-line option: " + commandline); 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 // first time intro message
const firstTime = "extensions." + config.name.toLowerCase() + ".firsttime"; const firstTime = "extensions." + config.name.toLowerCase() + ".firsttime";
if (options.getPref(firstTime, true)) { if (options.getPref(firstTime, true)) {
setTimeout(function () { setTimeout(function () {
liberator.help(); dactyl.help();
options.setPref(firstTime, false); options.setPref(firstTime, false);
}, 1000); }, 1000);
} }
@@ -1899,11 +1892,11 @@ const Liberator = Module("liberator", {
modes.reset(); modes.reset();
// TODO: we should have some class where all this guioptions stuff fits well // TODO: we should have some class where all this guioptions stuff fits well
Liberator.hideGUI(); Dactyl.hideGUI();
if (liberator.commandLineOptions.preCommands) if (dactyl.commandLineOptions.preCommands)
liberator.commandLineOptions.preCommands.forEach(function (cmd) { dactyl.commandLineOptions.preCommands.forEach(function (cmd) {
liberator.execute(cmd); dactyl.execute(cmd);
}); });
// finally, read the RC file and source plugins // 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 init = services.get("environment").get(extensionName + "_INIT");
let rcFile = io.getRCFile("~"); let rcFile = io.getRCFile("~");
if (liberator.commandLineOptions.rcFile) { if (dactyl.commandLineOptions.rcFile) {
let filename = liberator.commandLineOptions.rcFile; let filename = dactyl.commandLineOptions.rcFile;
if (!/^(NONE|NORC)$/.test(filename)) if (!/^(NONE|NORC)$/.test(filename))
io.source(io.File(filename).path, false); // let io.source handle any read failure like Vim io.source(io.File(filename).path, false); // let io.source handle any read failure like Vim
} }
else { else {
if (init) if (init)
liberator.execute(init); dactyl.execute(init);
else { else {
if (rcFile) { if (rcFile) {
io.source(rcFile.path, true); io.source(rcFile.path, true);
services.get("environment").set("MY_" + extensionName + "RC", rcFile.path); services.get("environment").set("MY_" + extensionName + "RC", rcFile.path);
} }
else 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); let localRCFile = io.getRCFile(io.getCurrentDirectory().path);
if (localRCFile && !localRCFile.equals(rcFile)) if (localRCFile && !localRCFile.equals(rcFile))
io.source(localRCFile.path, true); io.source(localRCFile.path, true);
} }
} }
if (liberator.commandLineOptions.rcFile == "NONE" || liberator.commandLineOptions.noPlugins) if (dactyl.commandLineOptions.rcFile == "NONE" || dactyl.commandLineOptions.noPlugins)
options["loadplugins"] = false; options["loadplugins"] = false;
if (options["loadplugins"]) if (options["loadplugins"])
liberator.loadPlugins(); dactyl.loadPlugins();
// after sourcing the initialization files, this function will set // after sourcing the initialization files, this function will set
// all gui options to their default values, if they have not been // all gui options to their default values, if they have not been
@@ -1954,18 +1947,18 @@ const Liberator = Module("liberator", {
option.value = option.value; option.value = option.value;
} }
if (liberator.commandLineOptions.postCommands) if (dactyl.commandLineOptions.postCommands)
liberator.commandLineOptions.postCommands.forEach(function (cmd) { dactyl.commandLineOptions.postCommands.forEach(function (cmd) {
liberator.execute(cmd); dactyl.execute(cmd);
}); });
liberator.triggerObserver("enter", null); dactyl.triggerObserver("enter", null);
autocommands.trigger(config.name + "Enter", {}); autocommands.trigger(config.name + "Enter", {});
}, 0); }, 0);
statusline.update(); statusline.update();
liberator.log(config.name + " fully initialized", 0); dactyl.log(config.name + " fully initialized", 0);
liberator.initialized = true; dactyl.initialized = true;
} }
}); });

104
common/content/dactyl.xul Normal file
View File

@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ***** BEGIN LICENSE BLOCK ***** {{{
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
This work is licensed for reuse under an MIT license. Details are
given in the LICENSE.txt file included with this file.
}}} ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://dactyl/skin/dactyl.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "dactyl.dtd" [
<!ENTITY dactyl.content "chrome://dactyl/content/">
<!ENTITY and "&amp;&amp;">
]>
<overlay id="dactyl"
xmlns:dactyl="http://vimperator.org/namespaces/liberator"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript;version=1.8" src="&dactyl.content;dactyl-overlay.js"/>
<window id="&dactyl.mainWindow;">
<stringbundleset id="dactyl-stringbundles">
<stringbundle id="dactyl-charset-bundle"
src="chrome://global/locale/charsetTitles.properties"/>
</stringbundleset>
<keyset id="mainKeyset">
<key id="key_open_vimbar" key=":" oncommand="window.dactyl &and; dactyl.modules.commandline.open(':', '', dactyl.modules.modes.EX);" modifiers=""/>
<key id="key_stop" keycode="VK_ESCAPE" oncommand="window.dactyl &and; dactyl.modules.events.onEscape();"/>
<!-- other keys are handled inside the event loop in events.js -->
</keyset>
<popupset>
<panel id="dactyl-visualbell" dactyl:highlight="Bell"/>
</popupset>
<!--this notifies us also of focus events in the XUL
from: http://developer.mozilla.org/en/docs/XUL_Tutorial:Updating_Commands !-->
<commandset id="onPentadactylFocus"
commandupdater="true"
events="focus"
oncommandupdate="if (window.dactyl &and; dactyl.modules.events != undefined) dactyl.modules.events.onFocusChange(event);"/>
<commandset id="onPentadactylSelect"
commandupdater="true"
events="select"
oncommandupdate="if (window.dactyl &and; dactyl.modules.events != undefined) dactyl.modules.events.onSelectionChange(event);"/>
<!-- As of Firefox 3.1pre, <iframe>.height changes do not seem to have immediate effect,
therefore we need to put them into a <vbox> for which that works just fine -->
<vbox class="dactyl-container" hidden="false" collapsed="true">
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="window.dactyl &and; dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
</vbox>
<vbox class="dactyl-container" hidden="false" collapsed="true">
<iframe id="dactyl-completions" src="chrome://dactyl/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="window.dactyl &and; dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
</vbox>
<stack orient="horizontal" align="stretch" class="dactyl-container" dactyl:highlight="CmdLine">
<textbox class="plain" id="dactyl-message" flex="1" readonly="true" dactyl:highlight="Normal"/>
<hbox id="dactyl-commandline" hidden="false" collapsed="true" class="dactyl-container" dactyl:highlight="Normal">
<label class="plain" id="dactyl-commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
<textbox class="plain" id="dactyl-commandline-command" flex="1" type="search" timeout="100"
oninput="window.dactyl &and; dactyl.modules.commandline.onEvent(event);"
onkeyup="window.dactyl &and; dactyl.modules.commandline.onEvent(event);"
onfocus="window.dactyl &and; dactyl.modules.commandline.onEvent(event);"
onblur="window.dactyl &and; dactyl.modules.commandline.onEvent(event);"/>
</hbox>
</stack>
<vbox class="dactyl-container" hidden="false" collapsed="false" dactyl:highlight="CmdLine">
<textbox id="dactyl-multiline-input" class="plain" flex="1" rows="1" hidden="false" collapsed="true" multiline="true" dactyl:highlight="Normal"
onkeypress="window.dactyl &and; dactyl.modules.commandline.onMultilineInputEvent(event);"
oninput="window.dactyl &and; dactyl.modules.commandline.onMultilineInputEvent(event);"
onblur="window.dactyl &and; dactyl.modules.commandline.onMultilineInputEvent(event);"/>
</vbox>
</window>
<statusbar id="status-bar" dactyl:highlight="StatusLine">
<hbox insertbefore="&dactyl.statusBefore;" insertafter="&dactyl.statusAfter;"
id="dactyl-statusline-field-status" flex="1" hidden="false" align="center">
<textbox class="plain" id="dactyl-statusline-field-url" readonly="false" flex="1" crop="end"/>
<label class="plain" id="dactyl-statusline-field-inputbuffer" flex="0"/>
<label class="plain" id="dactyl-statusline-field-progress" flex="0"/>
<label class="plain" id="dactyl-statusline-field-tabcount" flex="0"/>
<label class="plain" id="dactyl-statusline-field-bufferposition" flex="0"/>
<label class="plain" id="dactyl-statusline-field-zoomlevel" flex="0"/>
</hbox>
<!-- just hide them since other elements expect them -->
<statusbarpanel id="statusbar-display" hidden="true"/>
<statusbarpanel id="statusbar-progresspanel" hidden="true"/>
</statusbar>
</overlay>
<!-- vim: set fdm=marker sw=4 ts=4 et: -->

View File

@@ -91,7 +91,7 @@ const Editor = Module("editor", {
}, },
unselectText: function () { unselectText: function () {
let elem = liberator.focus; let elem = dactyl.focus;
// A error occurs if the element has been removed when "elem.selectionStart" is executed. // A error occurs if the element has been removed when "elem.selectionStart" is executed.
try { try {
if (elem && elem.selectionEnd) if (elem && elem.selectionEnd)
@@ -106,13 +106,13 @@ const Editor = Module("editor", {
}, },
pasteClipboard: function () { pasteClipboard: function () {
if (liberator.has("Win32")) { if (dactyl.has("Win32")) {
this.executeCommand("cmd_paste"); this.executeCommand("cmd_paste");
return; return;
} }
// FIXME: #93 (<s-insert> in the bottom of a long textarea bounces up) // FIXME: #93 (<s-insert> in the bottom of a long textarea bounces up)
let elem = liberator.focus; let elem = dactyl.focus;
if (elem.setSelectionRange && util.readFromClipboard()) { if (elem.setSelectionRange && util.readFromClipboard()) {
// readFromClipboard would return 'undefined' if not checked // readFromClipboard would return 'undefined' if not checked
@@ -139,7 +139,7 @@ const Editor = Module("editor", {
executeCommand: function (cmd, count) { executeCommand: function (cmd, count) {
let controller = Editor.getController(); let controller = Editor.getController();
if (!controller || !controller.supportsCommand(cmd) || !controller.isCommandEnabled(cmd)) { if (!controller || !controller.supportsCommand(cmd) || !controller.isCommandEnabled(cmd)) {
liberator.beep(); dactyl.beep();
return false; return false;
} }
@@ -157,7 +157,7 @@ const Editor = Module("editor", {
} }
catch (e) { catch (e) {
if (!didCommand) if (!didCommand)
liberator.beep(); dactyl.beep();
return false; return false;
} }
} }
@@ -220,7 +220,7 @@ const Editor = Module("editor", {
break; break;
default: default:
liberator.beep(); dactyl.beep();
return false; return false;
} }
@@ -240,7 +240,7 @@ const Editor = Module("editor", {
break; break;
default: default:
liberator.beep(); dactyl.beep();
return false; return false;
} }
return true; return true;
@@ -297,7 +297,7 @@ const Editor = Module("editor", {
return i + 1; // always position the cursor after the char return i + 1; // always position the cursor after the char
} }
liberator.beep(); dactyl.beep();
return -1; return -1;
}, },
@@ -322,7 +322,7 @@ const Editor = Module("editor", {
return i; return i;
} }
liberator.beep(); dactyl.beep();
return -1; return -1;
}, },
@@ -330,10 +330,10 @@ const Editor = Module("editor", {
// TODO: save return value in v:shell_error // TODO: save return value in v:shell_error
let args = commands.parseArgs(options["editor"], [], "*", true); let args = commands.parseArgs(options["editor"], [], "*", true);
liberator.assert(args.length >= 1, "No editor specified"); dactyl.assert(args.length >= 1, "No editor specified");
args.push(path); args.push(path);
liberator.callFunctionInThread(null, io.run, io.expandPath(args.shift()), args, true); dactyl.callFunctionInThread(null, io.run, io.expandPath(args.shift()), args, true);
}, },
// TODO: clean up with 2 functions for textboxes and currentEditor? // TODO: clean up with 2 functions for textboxes and currentEditor?
@@ -343,7 +343,7 @@ const Editor = Module("editor", {
let textBox = null; let textBox = null;
if (!(config.isComposeWindow)) if (!(config.isComposeWindow))
textBox = liberator.focus; textBox = dactyl.focus;
if (!forceEditing && textBox && textBox.type == "password") { if (!forceEditing && textBox && textBox.type == "password") {
commandline.input("Editing a password field externally will reveal the password. Would you like to continue? (yes/[no]): ", commandline.input("Editing a password field externally will reveal the password. Would you like to continue? (yes/[no]): ",
@@ -401,7 +401,7 @@ const Editor = Module("editor", {
// Errors are unlikely, and our error messages won't // Errors are unlikely, and our error messages won't
// likely be any more helpful than that given in the // likely be any more helpful than that given in the
// exception. // exception.
liberator.echoerr(e); dactyl.echoerr(e);
tmpBg = "red"; tmpBg = "red";
} }
@@ -571,11 +571,11 @@ const Editor = Module("editor", {
let list = this.getAbbreviations(filter, lhs); let list = this.getAbbreviations(filter, lhs);
if (!list.length) if (!list.length)
liberator.echomsg("No this._abbreviations found"); dactyl.echomsg("No this._abbreviations found");
else if (list.length == 1) { else if (list.length == 1) {
let [mode, lhs, rhs] = list[0]; let [mode, lhs, rhs] = list[0];
liberator.echo(mode + " " + lhs + " " + rhs, commandline.FORCE_SINGLELINE); // 2 spaces, 3 spaces dactyl.echo(mode + " " + lhs + " " + rhs, commandline.FORCE_SINGLELINE); // 2 spaces, 3 spaces
} }
else { else {
list = template.tabular(["", "LHS", "RHS"], [], list); list = template.tabular(["", "LHS", "RHS"], [], list);
@@ -592,7 +592,7 @@ const Editor = Module("editor", {
*/ */
removeAbbreviation: function (filter, lhs) { removeAbbreviation: function (filter, lhs) {
if (!lhs) { if (!lhs) {
liberator.echoerr("E474: Invalid argument"); dactyl.echoerr("E474: Invalid argument");
return false; return false;
} }
@@ -623,7 +623,7 @@ const Editor = Module("editor", {
} }
} }
liberator.echoerr("E24: No such abbreviation"); dactyl.echoerr("E24: No such abbreviation");
return false; return false;
}, },
@@ -640,7 +640,7 @@ const Editor = Module("editor", {
this.removeAbbreviation(filter, lhs); this.removeAbbreviation(filter, lhs);
} }
}, { }, {
getEditor: function () liberator.focus, getEditor: function () dactyl.focus,
getController: function () { getController: function () {
let ed = Editor.getEditor(); let ed = Editor.getEditor();
@@ -660,7 +660,7 @@ const Editor = Module("editor", {
"Abbreviate a key sequence" + modeDescription, "Abbreviate a key sequence" + modeDescription,
function (args) { function (args) {
let matches = args.string.match(RegExp("^\\s*($|" + editor._abbrevmatch + ")(?:\\s*$|\\s+(.*))")); let matches = args.string.match(RegExp("^\\s*($|" + editor._abbrevmatch + ")(?:\\s*$|\\s+(.*))"));
liberator.assert(matches, "E474: Invalid argument"); dactyl.assert(matches, "E474: Invalid argument");
let [, lhs, rhs] = matches; let [, lhs, rhs] = matches;
if (rhs) if (rhs)
@@ -866,7 +866,7 @@ const Editor = Module("editor", {
mappings.add([modes.INSERT], mappings.add([modes.INSERT],
["<C-t>"], "Edit text field in Vi mode", ["<C-t>"], "Edit text field in Vi mode",
function () { liberator.mode = modes.TEXTAREA; }); function () { dactyl.mode = modes.TEXTAREA; });
mappings.add([modes.INSERT], mappings.add([modes.INSERT],
["<Space>", "<Return>"], "Expand insert mode abbreviation", ["<Space>", "<Return>"], "Expand insert mode abbreviation",
@@ -886,7 +886,7 @@ const Editor = Module("editor", {
["u"], "Undo", ["u"], "Undo",
function (count) { function (count) {
editor.executeCommand("cmd_undo", count); editor.executeCommand("cmd_undo", count);
liberator.mode = modes.TEXTAREA; dactyl.mode = modes.TEXTAREA;
}, },
{ count: true }); { count: true });
@@ -894,7 +894,7 @@ const Editor = Module("editor", {
["<C-r>"], "Redo", ["<C-r>"], "Redo",
function (count) { function (count) {
editor.executeCommand("cmd_redo", count); editor.executeCommand("cmd_redo", count);
liberator.mode = modes.TEXTAREA; dactyl.mode = modes.TEXTAREA;
}, },
{ count: true }); { count: true });
@@ -932,7 +932,7 @@ const Editor = Module("editor", {
// visual mode // visual mode
mappings.add([modes.CARET, modes.TEXTAREA], mappings.add([modes.CARET, modes.TEXTAREA],
["v"], "Start visual mode", ["v"], "Start visual mode",
function (count) { modes.set(modes.VISUAL, liberator.mode); }); function (count) { modes.set(modes.VISUAL, dactyl.mode); });
mappings.add([modes.VISUAL], mappings.add([modes.VISUAL],
["v"], "End visual mode", ["v"], "End visual mode",
@@ -949,7 +949,7 @@ const Editor = Module("editor", {
mappings.add([modes.VISUAL], mappings.add([modes.VISUAL],
["c", "s"], "Change selected text", ["c", "s"], "Change selected text",
function (count) { function (count) {
liberator.assert(modes.extended & modes.TEXTAREA); dactyl.assert(modes.extended & modes.TEXTAREA);
editor.executeCommand("cmd_cut"); editor.executeCommand("cmd_cut");
modes.set(modes.INSERT, modes.TEXTAREA); modes.set(modes.INSERT, modes.TEXTAREA);
}); });
@@ -962,7 +962,7 @@ const Editor = Module("editor", {
modes.set(modes.TEXTAREA); modes.set(modes.TEXTAREA);
} }
else else
liberator.beep(); dactyl.beep();
}); });
mappings.add([modes.VISUAL], mappings.add([modes.VISUAL],
@@ -974,7 +974,7 @@ const Editor = Module("editor", {
} }
else { else {
let sel = window.content.document.getSelection(); let sel = window.content.document.getSelection();
liberator.assert(sel); dactyl.assert(sel);
util.copyToClipboard(sel, true); util.copyToClipboard(sel, true);
} }
}); });
@@ -982,12 +982,12 @@ const Editor = Module("editor", {
mappings.add([modes.VISUAL, modes.TEXTAREA], mappings.add([modes.VISUAL, modes.TEXTAREA],
["p"], "Paste clipboard contents", ["p"], "Paste clipboard contents",
function (count) { function (count) {
liberator.assert(!(modes.extended & modes.CARET)); dactyl.assert(!(modes.extended & modes.CARET));
if (!count) if (!count)
count = 1; count = 1;
while (count--) while (count--)
editor.executeCommand("cmd_paste"); editor.executeCommand("cmd_paste");
liberator.mode = modes.TEXTAREA; dactyl.mode = modes.TEXTAREA;
}); });
// finding characters // finding characters
@@ -996,7 +996,7 @@ const Editor = Module("editor", {
function (count, arg) { function (count, arg) {
let pos = editor.findCharForward(arg, count); let pos = editor.findCharForward(arg, count);
if (pos >= 0) if (pos >= 0)
editor.moveToPosition(pos, true, liberator.mode == modes.VISUAL); editor.moveToPosition(pos, true, dactyl.mode == modes.VISUAL);
}, },
{ arg: true, count: true }); { arg: true, count: true });
@@ -1005,7 +1005,7 @@ const Editor = Module("editor", {
function (count, arg) { function (count, arg) {
let pos = editor.findCharBackward(arg, count); let pos = editor.findCharBackward(arg, count);
if (pos >= 0) if (pos >= 0)
editor.moveToPosition(pos, false, liberator.mode == modes.VISUAL); editor.moveToPosition(pos, false, dactyl.mode == modes.VISUAL);
}, },
{ arg: true, count: true }); { arg: true, count: true });
@@ -1014,7 +1014,7 @@ const Editor = Module("editor", {
function (count, arg) { function (count, arg) {
let pos = editor.findCharForward(arg, count); let pos = editor.findCharForward(arg, count);
if (pos >= 0) if (pos >= 0)
editor.moveToPosition(pos - 1, true, liberator.mode == modes.VISUAL); editor.moveToPosition(pos - 1, true, dactyl.mode == modes.VISUAL);
}, },
{ arg: true, count: true }); { arg: true, count: true });
@@ -1023,7 +1023,7 @@ const Editor = Module("editor", {
function (count, arg) { function (count, arg) {
let pos = editor.findCharBackward(arg, count); let pos = editor.findCharBackward(arg, count);
if (pos >= 0) if (pos >= 0)
editor.moveToPosition(pos + 1, false, liberator.mode == modes.VISUAL); editor.moveToPosition(pos + 1, false, dactyl.mode == modes.VISUAL);
}, },
{ arg: true, count: true }); { arg: true, count: true });
@@ -1039,7 +1039,7 @@ const Editor = Module("editor", {
while (count-- > 0) { while (count-- > 0) {
let text = Editor.getEditor().value; let text = Editor.getEditor().value;
let pos = Editor.getEditor().selectionStart; let pos = Editor.getEditor().selectionStart;
liberator.assert(pos < text.length); dactyl.assert(pos < text.length);
let chr = text[pos]; let chr = text[pos];
Editor.getEditor().value = text.substring(0, pos) + Editor.getEditor().value = text.substring(0, pos) +

View File

@@ -1,7 +1,7 @@
try { __liberator_eval_result = eval(__liberator_eval_string); try { __dactyl_eval_result = eval(__dactyl_eval_string);
} }
catch (e) { catch (e) {
__liberator_eval_error = e; __dactyl_eval_error = e;
} }
// IMPORTANT: The eval statement *must* remain on the first line // IMPORTANT: The eval statement *must* remain on the first line
// in order for line numbering in any errors to remain correct. // in order for line numbering in any errors to remain correct.

View File

@@ -28,7 +28,7 @@ const Events = Module("events", {
// NOTE: the order of ["Esc", "Escape"] or ["Escape", "Esc"] // NOTE: the order of ["Esc", "Escape"] or ["Escape", "Esc"]
// matters, so use that string as the first item, that you // matters, so use that string as the first item, that you
// want to refer to within liberator's source code for // want to refer to within dactyl's source code for
// comparisons like if (key == "<Esc>") { ... } // comparisons like if (key == "<Esc>") { ... }
this._keyTable = { this._keyTable = {
add: ["Plus", "Add"], add: ["Plus", "Add"],
@@ -80,8 +80,8 @@ const Events = Module("events", {
if (dirs.length > 0) { if (dirs.length > 0) {
for (let [, dir] in Iterator(dirs)) { for (let [, dir] in Iterator(dirs)) {
liberator.echomsg('Searching for "macros/*" in ' + dir.path.quote(), 2); dactyl.echomsg('Searching for "macros/*" in ' + dir.path.quote(), 2);
liberator.log("Sourcing macros directory: " + dir.path + "...", 3); dactyl.log("Sourcing macros directory: " + dir.path + "...", 3);
for (let file in dir.iterDirectory()) { for (let file in dir.iterDirectory()) {
if (file.exists() && !file.isDirectory() && file.isReadable() && if (file.exists() && !file.isDirectory() && file.isReadable() &&
@@ -89,17 +89,17 @@ const Events = Module("events", {
let name = file.leafName.replace(/\.vimp$/i, ""); let name = file.leafName.replace(/\.vimp$/i, "");
this._macros.set(name, file.read().split("\n")[0]); this._macros.set(name, file.read().split("\n")[0]);
liberator.log("Macro " + name + " added: " + this._macros.get(name), 5); dactyl.log("Macro " + name + " added: " + this._macros.get(name), 5);
} }
} }
} }
} }
else else
liberator.log("No user macros directory found", 3); dactyl.log("No user macros directory found", 3);
} }
catch (e) { catch (e) {
// thrown if directory does not exist // thrown if directory does not exist
liberator.log("Error sourcing macros directory: " + e, 9); dactyl.log("Error sourcing macros directory: " + e, 9);
} }
}, 100); }, 100);
@@ -118,14 +118,14 @@ const Events = Module("events", {
}, },
destroy: function () { destroy: function () {
liberator.dump("Removing all event listeners"); dactyl.dump("Removing all event listeners");
for (let args in values(this.sessionListeners)) for (let args in values(this.sessionListeners))
args[0].removeEventListener.apply(args[0], args.slice(1)); args[0].removeEventListener.apply(args[0], args.slice(1));
}, },
/** /**
* Adds an event listener for this session and removes it on * Adds an event listener for this session and removes it on
* liberator shutdown. * dactyl shutdown.
* *
* @param {Element} target The element on which to listen. * @param {Element} target The element on which to listen.
* @param {string} event The event to listen for. * @param {string} event The event to listen for.
@@ -149,10 +149,10 @@ const Events = Module("events", {
} }
catch (e) { catch (e) {
if (e.message == "Interrupted") if (e.message == "Interrupted")
liberator.echoerr("Interrupted"); dactyl.echoerr("Interrupted");
else else
liberator.echoerr("Processing " + event.type + " event: " + (e.echoerr || e)); dactyl.echoerr("Processing " + event.type + " event: " + (e.echoerr || e));
liberator.reportError(e); dactyl.reportError(e);
} }
}; };
}, },
@@ -170,7 +170,7 @@ const Events = Module("events", {
*/ */
startRecording: function (macro) { startRecording: function (macro) {
// TODO: ignore this like Vim? // TODO: ignore this like Vim?
liberator.assert(/[a-zA-Z0-9]/.test(macro), dactyl.assert(/[a-zA-Z0-9]/.test(macro),
"E354: Invalid register name: '" + macro + "'"); "E354: Invalid register name: '" + macro + "'");
modes.isRecording = true; modes.isRecording = true;
@@ -195,13 +195,13 @@ const Events = Module("events", {
playMacro: function (macro) { playMacro: function (macro) {
let res = false; let res = false;
if (!/[a-zA-Z0-9@]/.test(macro) && macro.length == 1) { if (!/[a-zA-Z0-9@]/.test(macro) && macro.length == 1) {
liberator.echoerr("E354: Invalid register name: '" + macro + "'"); dactyl.echoerr("E354: Invalid register name: '" + macro + "'");
return false; return false;
} }
if (macro == "@") { // use lastMacro if it's set if (macro == "@") { // use lastMacro if it's set
if (!this._lastMacro) { if (!this._lastMacro) {
liberator.echoerr("E748: No previously used register"); dactyl.echoerr("E748: No previously used register");
return false; return false;
} }
} }
@@ -227,9 +227,9 @@ const Events = Module("events", {
else { else {
if (this._lastMacro.length == 1) if (this._lastMacro.length == 1)
// TODO: ignore this like Vim? // TODO: ignore this like Vim?
liberator.echoerr("Exxx: Register '" + this._lastMacro + "' not set"); dactyl.echoerr("Exxx: Register '" + this._lastMacro + "' not set");
else else
liberator.echoerr("Exxx: Named macro '" + this._lastMacro + "' not set"); dactyl.echoerr("Exxx: Named macro '" + this._lastMacro + "' not set");
} }
return res; return res;
}, },
@@ -264,7 +264,7 @@ const Events = Module("events", {
}, },
/** /**
* Pushes keys onto the event queue from liberator. It is similar to * Pushes keys onto the event queue from dactyl. It is similar to
* Vim's feedkeys() method, but cannot cope with 2 partially-fed * Vim's feedkeys() method, but cannot cope with 2 partially-fed
* strings, you have to feed one parsable string. * strings, you have to feed one parsable string.
* *
@@ -288,10 +288,10 @@ const Events = Module("events", {
commandline.quiet = quiet; commandline.quiet = quiet;
try { try {
liberator.threadYield(1, true); dactyl.threadYield(1, true);
for (let [, evt_obj] in Iterator(events.fromString(keys))) { for (let [, evt_obj] in Iterator(events.fromString(keys))) {
let elem = liberator.focus || window.content; let elem = dactyl.focus || window.content;
let evt = events.create(doc, "keypress", evt_obj); let evt = events.create(doc, "keypress", evt_obj);
if (typeof noremap == "object") if (typeof noremap == "object")
@@ -300,10 +300,10 @@ const Events = Module("events", {
else else
evt.noremap = !!noremap; evt.noremap = !!noremap;
evt.isMacro = true; evt.isMacro = true;
// A special hack for liberator-specific key names. // A special hack for dactyl-specific key names.
if (evt_obj.liberatorString || evt_obj.liberatorShift) { if (evt_obj.dactylString || evt_obj.dactylShift) {
evt.liberatorString = evt_obj.liberatorString; // for key-less keypress events e.g. <Nop> evt.dactylString = evt_obj.dactylString; // for key-less keypress events e.g. <Nop>
evt.liberatorShift = evt_obj.liberatorShift; // for untypable shift keys e.g. <S-1> evt.dactylShift = evt_obj.dactylShift; // for untypable shift keys e.g. <S-1>
events.onKeyPress(evt); events.onKeyPress(evt);
} }
@@ -404,10 +404,10 @@ const Events = Module("events", {
* purposes. They have many of the properties you'd expect to find on a * purposes. They have many of the properties you'd expect to find on a
* real event, but none of the methods. * real event, but none of the methods.
* *
* Also may contain two "special" parameters, .liberatorString and * Also may contain two "special" parameters, .dactylString and
* .liberatorShift these are set for characters that can never by * .dactylShift these are set for characters that can never by
* typed, but may appear in mappings, for example <Nop> is passed as * typed, but may appear in mappings, for example <Nop> is passed as
* liberatorString, and liberatorShift is set when a user specifies * dactylString, and dactylShift is set when a user specifies
* <S-@> where @ is a non-case-changable, non-space character. * <S-@> where @ is a non-case-changable, non-space character.
* *
* @param {string} keys The string to parse. * @param {string} keys The string to parse.
@@ -439,13 +439,13 @@ const Events = Module("events", {
if (evt_obj.shiftKey) { if (evt_obj.shiftKey) {
keyname = keyname.toUpperCase(); keyname = keyname.toUpperCase();
if (keyname == keyname.toLowerCase()) if (keyname == keyname.toLowerCase())
evt_obj.liberatorShift = true; evt_obj.dactylShift = true;
} }
evt_obj.charCode = keyname.charCodeAt(0); evt_obj.charCode = keyname.charCodeAt(0);
} }
else if (keyname == "nop") { else if (keyname == "nop") {
evt_obj.liberatorString = "<Nop>"; evt_obj.dactylString = "<Nop>";
} }
else if (/mouse$/.test(keyname)) { // mouse events else if (/mouse$/.test(keyname)) { // mouse events
evt_obj.type = (/2-/.test(modifier) ? "dblclick" : "click"); evt_obj.type = (/2-/.test(modifier) ? "dblclick" : "click");
@@ -478,7 +478,7 @@ const Events = Module("events", {
}, },
/** /**
* Converts the specified event to a string in liberator key-code * Converts the specified event to a string in dactyl key-code
* notation. Returns null for an unknown event. * notation. Returns null for an unknown event.
* *
* E.g. pressing ctrl+n would result in the string "<C-n>". * E.g. pressing ctrl+n would result in the string "<C-n>".
@@ -490,8 +490,8 @@ const Events = Module("events", {
if (!event) if (!event)
return "[instance events]"; return "[instance events]";
if (event.liberatorString) if (event.dactylString)
return event.liberatorString; return event.dactylString;
let key = null; let key = null;
let modifier = ""; let modifier = "";
@@ -516,22 +516,22 @@ const Events = Module("events", {
// (i.e., cntrl codes 27--31) // (i.e., cntrl codes 27--31)
// --- // ---
// For more information, see: // For more information, see:
// [*] Vimp FAQ: http://vimperator.org/trac/wiki/Vimperator/FAQ#WhydoesntC-workforEscMacOSX // [*] Vimp FAQ: http://vimperator.org/trac/wiki/Pentadactyl/FAQ#WhydoesntC-workforEscMacOSX
// [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/vimperator/2008-May/001548.html // [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/pentadactyl/2008-May/001548.html
// [*] Mozilla bug 416227: event.charCode in keypress handler has unexpected values on Mac for Ctrl with chars in "[ ] _ \" // [*] Mozilla bug 416227: event.charCode in keypress handler has unexpected values on Mac for Ctrl with chars in "[ ] _ \"
// https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=416227 // https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=416227
// [*] Mozilla bug 432951: Ctrl+'foo' doesn't seem same charCode as Meta+'foo' on Cocoa // [*] Mozilla bug 432951: Ctrl+'foo' doesn't seem same charCode as Meta+'foo' on Cocoa
// https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=432951 // https://bugzilla.mozilla.org/show_bug.cgi?query_format=specific&order=relevance+desc&bug_status=__open__&id=432951
// --- // ---
// //
// The following fixes are only activated if liberator.has("MacUnix"). // The following fixes are only activated if dactyl.has("MacUnix").
// Technically, they prevent mappings from <C-Esc> (and // Technically, they prevent mappings from <C-Esc> (and
// <C-C-]> if your fancy keyboard permits such things<?>), but // <C-C-]> if your fancy keyboard permits such things<?>), but
// these <C-control> mappings are probably pathological (<C-Esc> // these <C-control> mappings are probably pathological (<C-Esc>
// certainly is on Windows), and so it is probably // certainly is on Windows), and so it is probably
// harmless to remove the has("MacUnix") if desired. // harmless to remove the has("MacUnix") if desired.
// //
else if (liberator.has("MacUnix") && event.ctrlKey && charCode >= 27 && charCode <= 31) { else if (dactyl.has("MacUnix") && event.ctrlKey && charCode >= 27 && charCode <= 31) {
if (charCode == 27) { // [Ctrl-Bug 1/5] the <C-[> bug if (charCode == 27) { // [Ctrl-Bug 1/5] the <C-[> bug
key = "Esc"; key = "Esc";
modifier = modifier.replace("C-", ""); modifier = modifier.replace("C-", "");
@@ -545,7 +545,7 @@ const Events = Module("events", {
if (key in this._key_code) { if (key in this._key_code) {
// a named charcode key (<Space> and <lt>) space can be shifted, <lt> must be forced // a named charcode key (<Space> and <lt>) space can be shifted, <lt> must be forced
if ((key.match(/^\s$/) && event.shiftKey) || event.liberatorShift) if ((key.match(/^\s$/) && event.shiftKey) || event.dactylShift)
modifier += "S-"; modifier += "S-";
key = this._code_key[this._key_code[key]]; key = this._code_key[this._key_code[key]];
@@ -553,7 +553,7 @@ const Events = Module("events", {
else { else {
// a shift modifier is only allowed if the key is alphabetical and used in a C-A-M- mapping in the uppercase, // a shift modifier is only allowed if the key is alphabetical and used in a C-A-M- mapping in the uppercase,
// or if the shift has been forced for a non-alphabetical character by the user while :map-ping // or if the shift has been forced for a non-alphabetical character by the user while :map-ping
if ((key != key.toLowerCase() && (event.ctrlKey || event.altKey || event.metaKey)) || event.liberatorShift) if ((key != key.toLowerCase() && (event.ctrlKey || event.altKey || event.metaKey)) || event.dactylShift)
modifier += "S-"; modifier += "S-";
else if (modifier.length == 0) else if (modifier.length == 0)
return key; return key;
@@ -613,8 +613,8 @@ const Events = Module("events", {
* @returns {boolean} * @returns {boolean}
*/ */
waitForPageLoad: function () { waitForPageLoad: function () {
//liberator.dump("start waiting in loaded state: " + buffer.loaded); //dactyl.dump("start waiting in loaded state: " + buffer.loaded);
liberator.threadYield(true); // clear queue dactyl.threadYield(true); // clear queue
if (buffer.loaded == 1) if (buffer.loaded == 1)
return true; return true;
@@ -624,31 +624,31 @@ const Events = Module("events", {
let end = start + (maxWaitTime * 1000); // maximum time to wait - TODO: add option let end = start + (maxWaitTime * 1000); // maximum time to wait - TODO: add option
let now; let now;
while (now = Date.now(), now < end) { while (now = Date.now(), now < end) {
liberator.threadYield(); dactyl.threadYield();
//if ((now - start) % 1000 < 10) //if ((now - start) % 1000 < 10)
// liberator.dump("waited: " + (now - start) + " ms"); // dactyl.dump("waited: " + (now - start) + " ms");
if (!events.feedingKeys) if (!events.feedingKeys)
return false; return false;
if (buffer.loaded > 0) { if (buffer.loaded > 0) {
liberator.sleep(250); dactyl.sleep(250);
break; break;
} }
else else
liberator.echo("Waiting for page to load...", commandline.DISALLOW_MULTILINE); dactyl.echo("Waiting for page to load...", commandline.DISALLOW_MULTILINE);
} }
modes.show(); modes.show();
// TODO: allow macros to be continued when page does not fully load with an option // TODO: allow macros to be continued when page does not fully load with an option
let ret = (buffer.loaded == 1); let ret = (buffer.loaded == 1);
if (!ret) if (!ret)
liberator.echoerr("Page did not load completely in " + maxWaitTime + " seconds. Macro stopped."); dactyl.echoerr("Page did not load completely in " + maxWaitTime + " seconds. Macro stopped.");
//liberator.dump("done waiting: " + ret); //dactyl.dump("done waiting: " + ret);
// sometimes the input widget had focus when replaying a macro // sometimes the input widget had focus when replaying a macro
// maybe this call should be moved somewhere else? // maybe this call should be moved somewhere else?
// liberator.focusContent(true); // dactyl.focusContent(true);
return ret; return ret;
}, },
@@ -675,7 +675,7 @@ const Events = Module("events", {
return; return;
} }
switch (liberator.mode) { switch (dactyl.mode) {
case modes.NORMAL: case modes.NORMAL:
// clear any selection made // clear any selection made
let selection = window.content.getSelection(); let selection = window.content.getSelection();
@@ -689,9 +689,9 @@ const Events = Module("events", {
case modes.VISUAL: case modes.VISUAL:
if (modes.extended & modes.TEXTAREA) if (modes.extended & modes.TEXTAREA)
liberator.mode = modes.TEXTAREA; dactyl.mode = modes.TEXTAREA;
else if (modes.extended & modes.CARET) else if (modes.extended & modes.CARET)
liberator.mode = modes.CARET; dactyl.mode = modes.CARET;
break; break;
case modes.CARET: case modes.CARET:
@@ -711,20 +711,20 @@ const Events = Module("events", {
// it's a Vi editing mode. Extended modes really need to be // it's a Vi editing mode. Extended modes really need to be
// displayed too. --djk // displayed too. --djk
function isInputField() { function isInputField() {
let elem = liberator.focus; let elem = dactyl.focus;
return ((elem instanceof HTMLInputElement && !/image/.test(elem.type)) return ((elem instanceof HTMLInputElement && !/image/.test(elem.type))
|| elem instanceof HTMLIsIndexElement); || elem instanceof HTMLIsIndexElement);
} }
if (options["insertmode"] || isInputField()) if (options["insertmode"] || isInputField())
liberator.mode = modes.INSERT; dactyl.mode = modes.INSERT;
else else
modes.reset(); modes.reset();
break; break;
case modes.INSERT: case modes.INSERT:
if ((modes.extended & modes.TEXTAREA)) if ((modes.extended & modes.TEXTAREA))
liberator.mode = modes.TEXTAREA; dactyl.mode = modes.TEXTAREA;
else else
modes.reset(); modes.reset();
break; break;
@@ -752,7 +752,7 @@ const Events = Module("events", {
// Huh? --djk // Huh? --djk
onFocusChange: function (event) { onFocusChange: function (event) {
// command line has it's own focus change handler // command line has it's own focus change handler
if (liberator.mode == modes.COMMAND_LINE) if (dactyl.mode == modes.COMMAND_LINE)
return; return;
function hasHTMLDocument(win) win && win.document && win.document instanceof HTMLDocument function hasHTMLDocument(win) win && win.document && win.document instanceof HTMLDocument
@@ -760,7 +760,7 @@ const Events = Module("events", {
let win = window.document.commandDispatcher.focusedWindow; let win = window.document.commandDispatcher.focusedWindow;
let elem = window.document.commandDispatcher.focusedElement; let elem = window.document.commandDispatcher.focusedElement;
if (win && win.top == content && liberator.has("tabs")) if (win && win.top == content && dactyl.has("tabs"))
tabs.localStore.focusedFrame = win; tabs.localStore.focusedFrame = win;
try { try {
@@ -769,14 +769,14 @@ const Events = Module("events", {
if ((elem instanceof HTMLInputElement && /^(search|text|password)$/.test(elem.type)) || if ((elem instanceof HTMLInputElement && /^(search|text|password)$/.test(elem.type)) ||
(elem instanceof HTMLSelectElement)) { (elem instanceof HTMLSelectElement)) {
liberator.mode = modes.INSERT; dactyl.mode = modes.INSERT;
if (hasHTMLDocument(win)) if (hasHTMLDocument(win))
buffer.lastInputField = elem; buffer.lastInputField = elem;
return; return;
} }
if(isinstance(elem, [HTMLEmbedElement, HTMLEmbedElement])) { if(isinstance(elem, [HTMLEmbedElement, HTMLEmbedElement])) {
liberator.mode = modes.EMBED; dactyl.mode = modes.EMBED;
return; return;
} }
@@ -799,9 +799,9 @@ const Events = Module("events", {
let urlbar = document.getElementById("urlbar"); let urlbar = document.getElementById("urlbar");
if (elem == null && urlbar && urlbar.inputField == this._lastFocus) if (elem == null && urlbar && urlbar.inputField == this._lastFocus)
liberator.threadYield(true); dactyl.threadYield(true);
if (liberator.mode & (modes.EMBED | modes.INSERT | modes.TEXTAREA | modes.VISUAL)) if (dactyl.mode & (modes.EMBED | modes.INSERT | modes.TEXTAREA | modes.VISUAL))
modes.reset(); modes.reset();
} }
finally { finally {
@@ -827,17 +827,17 @@ const Events = Module("events", {
if (modes.isRecording) { if (modes.isRecording) {
if (key == "q") { // TODO: should not be hardcoded if (key == "q") { // TODO: should not be hardcoded
modes.isRecording = false; modes.isRecording = false;
liberator.log("Recorded " + this._currentMacro + ": " + this._macros.get(this._currentMacro), 9); dactyl.log("Recorded " + this._currentMacro + ": " + this._macros.get(this._currentMacro), 9);
liberator.echomsg("Recorded macro '" + this._currentMacro + "'"); dactyl.echomsg("Recorded macro '" + this._currentMacro + "'");
killEvent(); killEvent();
return; return;
} }
else if (!mappings.hasMap(liberator.mode, this._input.buffer + key)) else if (!mappings.hasMap(dactyl.mode, this._input.buffer + key))
this._macros.set(this._currentMacro, this._macros.get(this._currentMacro) + key); this._macros.set(this._currentMacro, this._macros.get(this._currentMacro) + key);
} }
if (key == "<C-c>") if (key == "<C-c>")
liberator.interrupted = true; dactyl.interrupted = true;
// feedingKeys needs to be separate from interrupted so // feedingKeys needs to be separate from interrupted so
// we can differentiate between a recorded <C-c> // we can differentiate between a recorded <C-c>
@@ -848,7 +848,7 @@ const Events = Module("events", {
events.feedingKeys = false; events.feedingKeys = false;
if (modes.isReplaying) { if (modes.isReplaying) {
modes.isReplaying = false; modes.isReplaying = false;
this.setTimeout(function () { liberator.echomsg("Canceled playback of macro '" + this._lastMacro + "'"); }, 100); this.setTimeout(function () { dactyl.echomsg("Canceled playback of macro '" + this._lastMacro + "'"); }, 100);
} }
} }
else else
@@ -890,7 +890,7 @@ const Events = Module("events", {
stop = true; // set to false if we should NOT consume this event but let the host app handle it stop = true; // set to false if we should NOT consume this event but let the host app handle it
// just forward event without checking any mappings when the MOW is open // just forward event without checking any mappings when the MOW is open
if (liberator.mode == modes.COMMAND_LINE && (modes.extended & modes.OUTPUT_MULTILINE)) { if (dactyl.mode == modes.COMMAND_LINE && (modes.extended & modes.OUTPUT_MULTILINE)) {
commandline.onMultilineOutputEvent(event); commandline.onMultilineOutputEvent(event);
throw killEvent(); throw killEvent();
} }
@@ -899,7 +899,7 @@ const Events = Module("events", {
// they are without beeping also fixes key navigation in combo // they are without beeping also fixes key navigation in combo
// boxes, submitting forms, etc. // boxes, submitting forms, etc.
// FIXME: breaks iabbr for now --mst // FIXME: breaks iabbr for now --mst
if (key in config.ignoreKeys && (config.ignoreKeys[key] & liberator.mode)) { if (key in config.ignoreKeys && (config.ignoreKeys[key] & dactyl.mode)) {
this._input.buffer = ""; this._input.buffer = "";
return; return;
} }
@@ -908,7 +908,7 @@ const Events = Module("events", {
if (!isEscapeKey(key)) { if (!isEscapeKey(key)) {
// custom mode... // custom mode...
if (liberator.mode == modes.CUSTOM) { if (dactyl.mode == modes.CUSTOM) {
plugins.onEvent(event); plugins.onEvent(event);
throw killEvent(); throw killEvent();
} }
@@ -938,15 +938,15 @@ const Events = Module("events", {
// whatever reason). if that happens to be correct, well.. // whatever reason). if that happens to be correct, well..
// XXX: why not just do that as well for HINTS mode actually? // XXX: why not just do that as well for HINTS mode actually?
if (liberator.mode == modes.CUSTOM) if (dactyl.mode == modes.CUSTOM)
return; return;
let inputStr = this._input.buffer + key; let inputStr = this._input.buffer + key;
let countStr = inputStr.match(/^[1-9][0-9]*|/)[0]; let countStr = inputStr.match(/^[1-9][0-9]*|/)[0];
let candidateCommand = inputStr.substr(countStr.length); let candidateCommand = inputStr.substr(countStr.length);
let map = mappings[event.noremap ? "getDefault" : "get"](liberator.mode, candidateCommand); let map = mappings[event.noremap ? "getDefault" : "get"](dactyl.mode, candidateCommand);
let candidates = mappings.getCandidates(liberator.mode, candidateCommand); let candidates = mappings.getCandidates(dactyl.mode, candidateCommand);
if (candidates.length == 0 && !map) { if (candidates.length == 0 && !map) {
map = this._input.pendingMap; map = this._input.pendingMap;
this._input.pendingMap = null; this._input.pendingMap = null;
@@ -1002,14 +1002,14 @@ const Events = Module("events", {
stop = false; stop = false;
} }
} }
else if (mappings.getCandidates(liberator.mode, candidateCommand).length > 0 && !event.skipmap) { else if (mappings.getCandidates(dactyl.mode, candidateCommand).length > 0 && !event.skipmap) {
this._input.pendingMap = map; this._input.pendingMap = map;
this._input.buffer += key; this._input.buffer += key;
} }
else { // if the key is neither a mapping nor the start of one else { // if the key is neither a mapping nor the start of one
// the mode checking is necessary so that things like g<esc> do not beep // the mode checking is necessary so that things like g<esc> do not beep
if (this._input.buffer != "" && !event.skipmap && if (this._input.buffer != "" && !event.skipmap &&
(liberator.mode & (modes.INSERT | modes.COMMAND_LINE | modes.TEXTAREA))) (dactyl.mode & (modes.INSERT | modes.COMMAND_LINE | modes.TEXTAREA)))
events.feedkeys(this._input.buffer, { noremap: true, skipmap: true }); events.feedkeys(this._input.buffer, { noremap: true, skipmap: true });
this._input.buffer = ""; this._input.buffer = "";
@@ -1021,14 +1021,14 @@ const Events = Module("events", {
// allow key to be passed to the host app if we can't handle it // allow key to be passed to the host app if we can't handle it
stop = false; stop = false;
if (liberator.mode == modes.COMMAND_LINE) { if (dactyl.mode == modes.COMMAND_LINE) {
if (!(modes.extended & modes.INPUT_MULTILINE)) if (!(modes.extended & modes.INPUT_MULTILINE))
liberator.trapErrors(function () { dactyl.trapErrors(function () {
commandline.onEvent(event); // reroute event in command line mode commandline.onEvent(event); // reroute event in command line mode
}); });
} }
else if (!modes.mainMode.input) else if (!modes.mainMode.input)
liberator.beep(); dactyl.beep();
} }
} }
@@ -1037,7 +1037,7 @@ const Events = Module("events", {
} }
catch (e) { catch (e) {
if (e !== undefined) if (e !== undefined)
liberator.reportError(e); dactyl.reportError(e);
} }
finally { finally {
let motionMap = (this._input.pendingMotionMap && this._input.pendingMotionMap.names[0]) || ""; let motionMap = (this._input.pendingMotionMap && this._input.pendingMotionMap.names[0]) || "";
@@ -1057,11 +1057,11 @@ const Events = Module("events", {
let elem = event.target; let elem = event.target;
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem; let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
for(; win; win = win != win.parent && win.parent) for(; win; win = win != win.parent && win.parent)
win.liberatorFocusAllowed = true; win.dactylFocusAllowed = true;
}, },
onPopupShown: function (event) { onPopupShown: function (event) {
if (event.originalTarget.localName == "tooltip" || event.originalTarget.id == "liberator-visualbell") if (event.originalTarget.localName == "tooltip" || event.originalTarget.id == "dactyl-visualbell")
return; return;
modes.add(modes.MENU); modes.add(modes.MENU);
}, },
@@ -1075,7 +1075,7 @@ const Events = Module("events", {
onResize: function (event) { onResize: function (event) {
if (window.fullScreen != this._fullscreen) { if (window.fullScreen != this._fullscreen) {
this._fullscreen = window.fullScreen; this._fullscreen = window.fullScreen;
liberator.triggerObserver("fullscreen", this._fullscreen); dactyl.triggerObserver("fullscreen", this._fullscreen);
autocommands.trigger("Fullscreen", { state: this._fullscreen }); autocommands.trigger("Fullscreen", { state: this._fullscreen });
} }
}, },
@@ -1086,13 +1086,13 @@ const Events = Module("events", {
if (controller && controller.isCommandEnabled("cmd_copy")) if (controller && controller.isCommandEnabled("cmd_copy"))
couldCopy = true; couldCopy = true;
if (liberator.mode != modes.VISUAL) { if (dactyl.mode != modes.VISUAL) {
if (couldCopy) { if (couldCopy) {
if ((liberator.mode == modes.TEXTAREA || if ((dactyl.mode == modes.TEXTAREA ||
(modes.extended & modes.TEXTAREA)) (modes.extended & modes.TEXTAREA))
&& !options["insertmode"]) && !options["insertmode"])
modes.set(modes.VISUAL, modes.TEXTAREA); modes.set(modes.VISUAL, modes.TEXTAREA);
else if (liberator.mode == modes.CARET) else if (dactyl.mode == modes.CARET)
modes.set(modes.VISUAL, modes.CARET); modes.set(modes.VISUAL, modes.CARET);
} }
} }
@@ -1100,12 +1100,12 @@ const Events = Module("events", {
// else // else
// { // {
// if (!couldCopy && modes.extended & modes.CARET) // if (!couldCopy && modes.extended & modes.CARET)
// liberator.mode = modes.CARET; // dactyl.mode = modes.CARET;
// } // }
} }
}, { }, {
isInputElemFocused: function () { isInputElemFocused: function () {
let elem = liberator.focus; let elem = dactyl.focus;
return ((elem instanceof HTMLInputElement && !/image/.test(elem.type)) || return ((elem instanceof HTMLInputElement && !/image/.test(elem.type)) ||
elem instanceof HTMLTextAreaElement || elem instanceof HTMLTextAreaElement ||
elem instanceof HTMLIsIndexElement || elem instanceof HTMLIsIndexElement ||
@@ -1117,14 +1117,14 @@ const Events = Module("events", {
commands.add(["delmac[ros]"], commands.add(["delmac[ros]"],
"Delete macros", "Delete macros",
function (args) { function (args) {
liberator.assert(!args.bang || !args.string, "E474: Invalid argument"); dactyl.assert(!args.bang || !args.string, "E474: Invalid argument");
if (args.bang) if (args.bang)
events.deleteMacros(); events.deleteMacros();
else if (args.string) else if (args.string)
events.deleteMacros(args.string); events.deleteMacros(args.string);
else else
liberator.echoerr("E471: Argument required"); dactyl.echoerr("E471: Argument required");
}, { }, {
bang: true, bang: true,
completer: function (context) completion.macro(context) completer: function (context) completion.macro(context)

View File

@@ -61,7 +61,7 @@ const RangeFinder = Module("rangefinder", {
find: function (pattern, backwards) { find: function (pattern, backwards) {
let str = this.bootstrap(pattern); let str = this.bootstrap(pattern);
if (!this.rangeFind.search(str)) if (!this.rangeFind.search(str))
setTimeout(function () { liberator.echoerr("E486: Pattern not found: " + pattern); }, 0); setTimeout(function () { dactyl.echoerr("E486: Pattern not found: " + pattern); }, 0);
return this.rangeFind.found; return this.rangeFind.found;
}, },
@@ -70,7 +70,7 @@ const RangeFinder = Module("rangefinder", {
if (!this.rangeFind) if (!this.rangeFind)
this.find(this.lastSearchPattern); this.find(this.lastSearchPattern);
else if (!this.rangeFind.search(null, reverse)) else if (!this.rangeFind.search(null, reverse))
liberator.echoerr("E486: Pattern not found: " + this.lastSearchPattern); dactyl.echoerr("E486: Pattern not found: " + this.lastSearchPattern);
else if (this.rangeFind.wrapped) { else if (this.rangeFind.wrapped) {
// hack needed, because wrapping causes a "scroll" event which clears // hack needed, because wrapping causes a "scroll" event which clears
// our command line // our command line

View File

@@ -1,9 +1,9 @@
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<xsl:stylesheet version="1.0" <xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:liberator="http://vimperator.org/namespaces/liberator" xmlns:dactyl="http://vimperator.org/namespaces/liberator"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="http://exslt.org/strings" xmlns:str="http://exslt.org/strings"
xmlns:exsl="http://exslt.org/common" xmlns:exsl="http://exslt.org/common"
@@ -11,19 +11,19 @@
<xsl:output method="xml" indent="no"/> <xsl:output method="xml" indent="no"/>
<xsl:variable name="root" select="/liberator:document"/> <xsl:variable name="root" select="/dactyl:document"/>
<xsl:variable name="tags"> <xsl:variable name="tags">
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:for-each select="$root//@tag|$root//liberator:tags/text()|$root//liberator:tag/text()"> <xsl:for-each select="$root//@tag|$root//dactyl:tags/text()|$root//dactyl:tag/text()">
<xsl:value-of select="concat(., ' ')"/> <xsl:value-of select="concat(., ' ')"/>
</xsl:for-each> </xsl:for-each>
</xsl:variable> </xsl:variable>
<xsl:template name="parse-tags"> <xsl:template name="parse-tags">
<xsl:param name="text"/> <xsl:param name="text"/>
<div liberator:highlight="HelpTags"> <div dactyl:highlight="HelpTags">
<xsl:for-each select="str:tokenize($text)"> <xsl:for-each select="str:tokenize($text)">
<a id="{.}" liberator:highlight="HelpTag"><xsl:value-of select="."/></a> <a id="{.}" dactyl:highlight="HelpTag"><xsl:value-of select="."/></a>
</xsl:for-each> </xsl:for-each>
</div> </div>
</xsl:template> </xsl:template>

View File

@@ -15,13 +15,13 @@ p.tagline {
font-weight: bold; font-weight: bold;
} }
table.vimperator { table.pentadactyl {
border-width: 1px; border-width: 1px;
border-style: dotted; border-style: dotted;
border-color: gray; border-color: gray;
/*margin-bottom: 2em; /* FIXME: just a quick hack until we have proper pages */ /*margin-bottom: 2em; /* FIXME: just a quick hack until we have proper pages */
} }
table.vimperator td { table.pentadactyl td {
border: none; border: none;
padding: 3px; padding: 3px;
} }

View File

@@ -1,10 +1,10 @@
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<!-- Header {{{1 --> <!-- Header {{{1 -->
<xsl:stylesheet version="1.0" <xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:liberator="http://vimperator.org/namespaces/liberator" xmlns:dactyl="http://vimperator.org/namespaces/liberator"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:str="http://exslt.org/strings" xmlns:str="http://exslt.org/strings"
xmlns:exsl="http://exslt.org/common" xmlns:exsl="http://exslt.org/common"
@@ -15,21 +15,21 @@
<!-- Variable Definitions {{{1 --> <!-- Variable Definitions {{{1 -->
<xsl:variable name="doc"> <xsl:variable name="doc">
<xsl:apply-templates select="/liberator:document" mode="overlay"/> <xsl:apply-templates select="/dactyl:document" mode="overlay"/>
</xsl:variable> </xsl:variable>
<xsl:variable name="root" select="exsl:node-set($doc)"/> <xsl:variable name="root" select="exsl:node-set($doc)"/>
<xsl:variable name="tags"> <xsl:variable name="tags">
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:for-each select="$root//@tag|$root//liberator:tags/text()|$root//liberator:tag/text()"> <xsl:for-each select="$root//@tag|$root//dactyl:tags/text()|$root//dactyl:tag/text()">
<xsl:value-of select="concat(., ' ')"/> <xsl:value-of select="concat(., ' ')"/>
</xsl:for-each> </xsl:for-each>
</xsl:variable> </xsl:variable>
<!-- Process Overlays {{{1 --> <!-- Process Overlays {{{1 -->
<xsl:variable name="overlay" select="concat('liberator://help-overlay/', /liberator:document/@name)"/> <xsl:variable name="overlay" select="concat('dactyl://help-overlay/', /dactyl:document/@name)"/>
<xsl:variable name="overlaydoc" select="document($overlay)/liberator:overlay"/> <xsl:variable name="overlaydoc" select="document($overlay)/dactyl:overlay"/>
<xsl:template name="splice-overlays"> <xsl:template name="splice-overlays">
<xsl:param name="elem"/> <xsl:param name="elem"/>
@@ -54,19 +54,19 @@
</xsl:for-each> </xsl:for-each>
</xsl:template> </xsl:template>
<xsl:template match="liberator:tags[parent::liberator:document]|liberator:tag" mode="overlay"> <xsl:template match="dactyl:tags[parent::dactyl:document]|dactyl:tag" mode="overlay">
<xsl:call-template name="splice-overlays"> <xsl:call-template name="splice-overlays">
<xsl:with-param name="tag" select="substring-before(concat(., ' '), ' ')"/> <xsl:with-param name="tag" select="substring-before(concat(., ' '), ' ')"/>
<xsl:with-param name="elem" select="self::node()"/> <xsl:with-param name="elem" select="self::node()"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="*[liberator:tags]" mode="overlay"> <xsl:template match="*[dactyl:tags]" mode="overlay">
<xsl:call-template name="splice-overlays"> <xsl:call-template name="splice-overlays">
<xsl:with-param name="tag" select="substring-before(concat(liberator:tags, ' '), ' ')"/> <xsl:with-param name="tag" select="substring-before(concat(dactyl:tags, ' '), ' ')"/>
<xsl:with-param name="elem" select="self::node()"/> <xsl:with-param name="elem" select="self::node()"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="liberator:*[@tag and not(@replace)]" mode="overlay"> <xsl:template match="dactyl:*[@tag and not(@replace)]" mode="overlay">
<xsl:call-template name="splice-overlays"> <xsl:call-template name="splice-overlays">
<xsl:with-param name="tag" select="substring-before(concat(@tag, ' '), ' ')"/> <xsl:with-param name="tag" select="substring-before(concat(@tag, ' '), ' ')"/>
<xsl:with-param name="elem" select="self::node()"/> <xsl:with-param name="elem" select="self::node()"/>
@@ -75,9 +75,9 @@
<!-- Process Inclusions {{{1 --> <!-- Process Inclusions {{{1 -->
<xsl:template match="liberator:include" mode="overlay-2"> <xsl:template match="dactyl:include" mode="overlay-2">
<div liberator:highlight="HelpInclude"> <div dactyl:highlight="HelpInclude">
<xsl:apply-templates select="document(@href)/liberator:document/node()" mode="overlay"/> <xsl:apply-templates select="document(@href)/dactyl:document/node()" mode="overlay"/>
</div> </div>
</xsl:template> </xsl:template>
@@ -93,15 +93,15 @@
<!-- Root {{{1 --> <!-- Root {{{1 -->
<xsl:template match="/"> <xsl:template match="/">
<xsl:for-each select="$root/liberator:document"> <xsl:for-each select="$root/dactyl:document">
<html liberator:highlight="Help"> <html dactyl:highlight="Help">
<head> <head>
<title><xsl:value-of select="@title"/></title> <title><xsl:value-of select="@title"/></title>
<script type="text/javascript" <script type="text/javascript"
src="chrome://liberator/content/help.js"/> src="chrome://dactyl/content/help.js"/>
</head> </head>
<body liberator:highlight="HelpBody"> <body dactyl:highlight="HelpBody">
<div liberator:highlight="Logo"/> <div dactyl:highlight="Logo"/>
<xsl:call-template name="parse-tags"> <xsl:call-template name="parse-tags">
<xsl:with-param name="text" select="concat(@name, '.html')"/> <xsl:with-param name="text" select="concat(@name, '.html')"/>
</xsl:call-template> </xsl:call-template>
@@ -125,7 +125,7 @@
local-name() = $tag and not(preceding::*[local-name() = $lasttag][position() = 1 and not(.=$context)])]"/> local-name() = $tag and not(preceding::*[local-name() = $lasttag][position() = 1 and not(.=$context)])]"/>
<xsl:if test="$nodes"> <xsl:if test="$nodes">
<ol liberator:highlight="HelpOrderedList"> <ol dactyl:highlight="HelpOrderedList">
<xsl:for-each select="$nodes"> <xsl:for-each select="$nodes">
<li> <li>
<a> <a>
@@ -144,18 +144,18 @@
</ol> </ol>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="liberator:toc" mode="pass-2"> <xsl:template match="dactyl:toc" mode="pass-2">
<xsl:variable name="TOC"> <xsl:variable name="TOC">
<context/> <context/>
<xsl:for-each <xsl:for-each
select="following::liberator:h1|following::liberator:h2|following::liberator:h3|following::liberator:h4|following::liberator:h5"> select="following::dactyl:h1|following::dactyl:h2|following::dactyl:h3|following::dactyl:h4|following::dactyl:h5">
<xsl:copy-of select="."/> <xsl:copy-of select="."/>
</xsl:for-each> </xsl:for-each>
</xsl:variable> </xsl:variable>
<xsl:variable name="toc" select="exsl:node-set($TOC)"/> <xsl:variable name="toc" select="exsl:node-set($TOC)"/>
<xsl:if test="//liberator:toc[1 and self::*]"> <xsl:if test="//dactyl:toc[1 and self::*]">
<div liberator:highlight="HelpTOC"> <div dactyl:highlight="HelpTOC">
<h2>Contents</h2> <h2>Contents</h2>
<xsl:if test="@start"> <xsl:if test="@start">
<xsl:call-template name="toc"> <xsl:call-template name="toc">
@@ -174,40 +174,40 @@
<!-- Items {{{1 --> <!-- Items {{{1 -->
<xsl:template match="liberator:strut" mode="pass-2"> <xsl:template match="dactyl:strut" mode="pass-2">
<div style="clear: both"/> <div style="clear: both"/>
</xsl:template> </xsl:template>
<xsl:template match="liberator:item" mode="pass-2"> <xsl:template match="dactyl:item" mode="pass-2">
<div liberator:highlight="HelpItem"> <div dactyl:highlight="HelpItem">
<xsl:apply-templates select="liberator:tags|liberator:spec|liberator:strut"/> <xsl:apply-templates select="dactyl:tags|dactyl:spec|dactyl:strut"/>
<xsl:if test="not(liberator:description/@short)"> <xsl:if test="not(dactyl:description/@short)">
<hr style="border: 0; height: 0; margin: 0; width: 100%; float: right;"/> <hr style="border: 0; height: 0; margin: 0; width: 100%; float: right;"/>
<div liberator:highlight="HelpOptInfo"> <div dactyl:highlight="HelpOptInfo">
<xsl:apply-templates select="liberator:type|liberator:default"/> <xsl:apply-templates select="dactyl:type|dactyl:default"/>
<div style="clear: both;"/> <div style="clear: both;"/>
</div> </div>
</xsl:if> </xsl:if>
<xsl:apply-templates select="liberator:description"/> <xsl:apply-templates select="dactyl:description"/>
<div style="clear: both;"/> <div style="clear: both;"/>
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="liberator:spec[preceding-sibling::liberator:spec]" mode="pass-2"> <xsl:template match="dactyl:spec[preceding-sibling::dactyl:spec]" mode="pass-2">
<div style="clear: both;"/> <div style="clear: both;"/>
<div liberator:highlight="HelpSpec"> <div dactyl:highlight="HelpSpec">
<xsl:apply-templates/> <xsl:apply-templates/>
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="liberator:default[not(@type='plain')]" mode="pass-2"> <xsl:template match="dactyl:default[not(@type='plain')]" mode="pass-2">
<xsl:variable name="type" select="preceding-sibling::liberator:type[1] | following-sibling::liberator:type[1]"/> <xsl:variable name="type" select="preceding-sibling::dactyl:type[1] | following-sibling::dactyl:type[1]"/>
<span liberator:highlight="HelpDefault">(default:<xsl:text> </xsl:text> <span dactyl:highlight="HelpDefault">(default:<xsl:text> </xsl:text>
<xsl:choose> <xsl:choose>
<xsl:when test="starts-with($type, 'string') or starts-with($type, 'regex')"> <xsl:when test="starts-with($type, 'string') or starts-with($type, 'regex')">
<span liberator:highlight="HelpString"><xsl:apply-templates/></span> <span dactyl:highlight="HelpString"><xsl:apply-templates/></span>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<span> <span>
<xsl:attribute name="liberator:highlight"> <xsl:attribute name="dactyl:highlight">
<xsl:choose> <xsl:choose>
<xsl:when test="$type = 'boolean'">Boolean</xsl:when> <xsl:when test="$type = 'boolean'">Boolean</xsl:when>
<xsl:when test="$type = 'number'">Number</xsl:when> <xsl:when test="$type = 'number'">Number</xsl:when>
@@ -223,22 +223,22 @@
<!-- Tag Definitions {{{1 --> <!-- Tag Definitions {{{1 -->
<xsl:template match="liberator:tags" mode="pass-2"> <xsl:template match="dactyl:tags" mode="pass-2">
<div style="clear: right"/> <div style="clear: right"/>
<xsl:call-template name="parse-tags"> <xsl:call-template name="parse-tags">
<xsl:with-param name="text" select="."/> <xsl:with-param name="text" select="."/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="liberator:tag|@tag" mode="pass-2"> <xsl:template match="dactyl:tag|@tag" mode="pass-2">
<xsl:call-template name="parse-tags"> <xsl:call-template name="parse-tags">
<xsl:with-param name="text" select="."/> <xsl:with-param name="text" select="."/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template name="parse-tags"> <xsl:template name="parse-tags">
<xsl:param name="text"/> <xsl:param name="text"/>
<div liberator:highlight="HelpTags"> <div dactyl:highlight="HelpTags">
<xsl:for-each select="str:tokenize($text)"> <xsl:for-each select="str:tokenize($text)">
<a id="{.}" liberator:highlight="HelpTag"><xsl:value-of select="."/></a> <a id="{.}" dactyl:highlight="HelpTag"><xsl:value-of select="."/></a>
</xsl:for-each> </xsl:for-each>
</div> </div>
</xsl:template> </xsl:template>
@@ -248,7 +248,7 @@
<xsl:template name="linkify-tag"> <xsl:template name="linkify-tag">
<xsl:param name="contents" select="text()"/> <xsl:param name="contents" select="text()"/>
<xsl:variable name="tag" select="str:tokenize($contents, ' [!')[1]"/> <xsl:variable name="tag" select="str:tokenize($contents, ' [!')[1]"/>
<a href="liberator://help-tag/{$tag}" style="color: inherit;"> <a href="dactyl://help-tag/{$tag}" style="color: inherit;">
<xsl:if test="contains($tags, concat(' ', $tag, ' '))"> <xsl:if test="contains($tags, concat(' ', $tag, ' '))">
<xsl:attribute name="href">#<xsl:value-of select="$tag"/></xsl:attribute> <xsl:attribute name="href">#<xsl:value-of select="$tag"/></xsl:attribute>
</xsl:if> </xsl:if>
@@ -256,25 +256,25 @@
</a> </a>
</xsl:template> </xsl:template>
<xsl:template match="liberator:o" mode="pass-2"> <xsl:template match="dactyl:o" mode="pass-2">
<span liberator:highlight="HelpOption"> <span dactyl:highlight="HelpOption">
<xsl:call-template name="linkify-tag"> <xsl:call-template name="linkify-tag">
<xsl:with-param name="contents" select='concat("&#39;", text(), "&#39;")'/> <xsl:with-param name="contents" select='concat("&#39;", text(), "&#39;")'/>
</xsl:call-template> </xsl:call-template>
</span> </span>
</xsl:template> </xsl:template>
<xsl:template match="liberator:t" mode="pass-2"> <xsl:template match="dactyl:t" mode="pass-2">
<span liberator:highlight="HelpTopic"> <span dactyl:highlight="HelpTopic">
<xsl:call-template name="linkify-tag"/> <xsl:call-template name="linkify-tag"/>
</span> </span>
</xsl:template> </xsl:template>
<xsl:template match="liberator:k" mode="pass-2"> <xsl:template match="dactyl:k" mode="pass-2">
<span liberator:highlight="HelpKey"> <span dactyl:highlight="HelpKey">
<xsl:call-template name="linkify-tag"/> <xsl:call-template name="linkify-tag"/>
</span> </span>
</xsl:template> </xsl:template>
<xsl:template match="liberator:k[@name]" mode="pass-2"> <xsl:template match="dactyl:k[@name]" mode="pass-2">
<span liberator:highlight="HelpKey"> <span dactyl:highlight="HelpKey">
<xsl:call-template name="linkify-tag"> <xsl:call-template name="linkify-tag">
<xsl:with-param name="contents" select="concat('&lt;', @name, '>', .)"/> <xsl:with-param name="contents" select="concat('&lt;', @name, '>', .)"/>
</xsl:call-template> </xsl:call-template>
@@ -283,76 +283,76 @@
<!-- HTML-ish elements {{{1 --> <!-- HTML-ish elements {{{1 -->
<xsl:template match="liberator:dl" mode="pass-2"> <xsl:template match="dactyl:dl" mode="pass-2">
<dl> <dl>
<column/> <column/>
<column/> <column/>
<xsl:for-each select="liberator:dt"> <xsl:for-each select="dactyl:dt">
<tr> <tr>
<xsl:apply-templates select="."/> <xsl:apply-templates select="."/>
<xsl:apply-templates select="following-sibling::liberator:dd[1]"/> <xsl:apply-templates select="following-sibling::dactyl:dd[1]"/>
</tr> </tr>
</xsl:for-each> </xsl:for-each>
</dl> </dl>
</xsl:template> </xsl:template>
<xsl:template match="liberator:link" mode="pass-2"> <xsl:template match="dactyl:link" mode="pass-2">
<a href="{@topic}"><xsl:apply-templates select="@*|node()"/></a> <a href="{@topic}"><xsl:apply-templates select="@*|node()"/></a>
</xsl:template> </xsl:template>
<xsl:template match="liberator:em | liberator:tt | liberator:p | <xsl:template match="dactyl:em | dactyl:tt | dactyl:p |
liberator:dt | liberator:dd | dactyl:dt | dactyl:dd |
liberator:ol | liberator:ul | liberator:li | dactyl:ol | dactyl:ul | dactyl:li |
liberator:h1 | liberator:h2 | liberator:h3" dactyl:h1 | dactyl:h2 | dactyl:h3"
mode="pass-2"> mode="pass-2">
<xsl:element name="html:{local-name()}"> <xsl:element name="html:{local-name()}">
<xsl:apply-templates select="@*|node()"/> <xsl:apply-templates select="@*|node()"/>
</xsl:element> </xsl:element>
</xsl:template> </xsl:template>
<xsl:template match="liberator:code" mode="pass-2"> <xsl:template match="dactyl:code" mode="pass-2">
<pre liberator:highlight="HelpCode"><xsl:apply-templates select="@*|node()"/></pre> <pre dactyl:highlight="HelpCode"><xsl:apply-templates select="@*|node()"/></pre>
</xsl:template> </xsl:template>
<!-- Help elements {{{1 --> <!-- Help elements {{{1 -->
<xsl:template match="liberator:a" mode="pass-2"> <xsl:template match="dactyl:a" mode="pass-2">
<span liberator:highlight="HelpArg">{<xsl:apply-templates select="@*|node()"/>}</span> <span dactyl:highlight="HelpArg">{<xsl:apply-templates select="@*|node()"/>}</span>
</xsl:template> </xsl:template>
<xsl:template match="liberator:oa" mode="pass-2"> <xsl:template match="dactyl:oa" mode="pass-2">
<span liberator:highlight="HelpOptionalArg">[<xsl:apply-templates select="@*|node()"/>]</span> <span dactyl:highlight="HelpOptionalArg">[<xsl:apply-templates select="@*|node()"/>]</span>
</xsl:template> </xsl:template>
<xsl:template match="liberator:note" mode="pass-2"> <xsl:template match="dactyl:note" mode="pass-2">
<p style="clear: both;"> <p style="clear: both;">
<xsl:apply-templates select="@*"/> <xsl:apply-templates select="@*"/>
<div style="clear: both;"/> <div style="clear: both;"/>
<span liberator:highlight="HelpNote">Note:</span> <span dactyl:highlight="HelpNote">Note:</span>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:apply-templates select="node()"/> <xsl:apply-templates select="node()"/>
</p> </p>
</xsl:template> </xsl:template>
<xsl:template match="liberator:warning" mode="pass-2"> <xsl:template match="dactyl:warning" mode="pass-2">
<p style="clear: both;"> <p style="clear: both;">
<xsl:apply-templates select="@*"/> <xsl:apply-templates select="@*"/>
<div style="clear: both;"/> <div style="clear: both;"/>
<span liberator:highlight="HelpWarning">Warning:</span> <span dactyl:highlight="HelpWarning">Warning:</span>
<xsl:text> </xsl:text> <xsl:text> </xsl:text>
<xsl:apply-templates select="node()"/> <xsl:apply-templates select="node()"/>
</p> </p>
</xsl:template> </xsl:template>
<xsl:template match="liberator:default" mode="pass-2"> <xsl:template match="dactyl:default" mode="pass-2">
<span liberator:highlight="HelpDefault"> <span dactyl:highlight="HelpDefault">
(default:<xsl:text> </xsl:text><xsl:apply-templates select="@*|node()"/>) (default:<xsl:text> </xsl:text><xsl:apply-templates select="@*|node()"/>)
</span> </span>
</xsl:template> </xsl:template>
<!-- HTML-ify other elements {{{1 --> <!-- HTML-ify other elements {{{1 -->
<xsl:template match="liberator:ex" mode="pass-2"> <xsl:template match="dactyl:ex" mode="pass-2">
<span liberator:highlight="HelpEx"> <span dactyl:highlight="HelpEx">
<xsl:variable name="tag" select="str:tokenize(text(), ' [!')[1]"/> <xsl:variable name="tag" select="str:tokenize(text(), ' [!')[1]"/>
<a href="liberator://help-tag/{$tag}" style="color: inherit;"> <a href="dactyl://help-tag/{$tag}" style="color: inherit;">
<xsl:if test="contains($tags, concat(' ', $tag, ' '))"> <xsl:if test="contains($tags, concat(' ', $tag, ' '))">
<xsl:attribute name="href">#<xsl:value-of select="$tag"/></xsl:attribute> <xsl:attribute name="href">#<xsl:value-of select="$tag"/></xsl:attribute>
</xsl:if> </xsl:if>
@@ -361,19 +361,19 @@
</span> </span>
</xsl:template> </xsl:template>
<xsl:template match="liberator:description | liberator:example | liberator:spec" mode="pass-2"> <xsl:template match="dactyl:description | dactyl:example | dactyl:spec" mode="pass-2">
<div> <div>
<xsl:if test="self::liberator:description"><xsl:attribute name="liberator:highlight">HelpDescription</xsl:attribute></xsl:if> <xsl:if test="self::dactyl:description"><xsl:attribute name="dactyl:highlight">HelpDescription</xsl:attribute></xsl:if>
<xsl:if test="self::liberator:example"><xsl:attribute name="liberator:highlight">HelpExample</xsl:attribute></xsl:if> <xsl:if test="self::dactyl:example"><xsl:attribute name="dactyl:highlight">HelpExample</xsl:attribute></xsl:if>
<xsl:if test="self::liberator:spec"><xsl:attribute name="liberator:highlight">HelpSpec</xsl:attribute></xsl:if> <xsl:if test="self::dactyl:spec"><xsl:attribute name="dactyl:highlight">HelpSpec</xsl:attribute></xsl:if>
<xsl:apply-templates select="@*|node()"/> <xsl:apply-templates select="@*|node()"/>
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="liberator:str | liberator:t | liberator:type" mode="pass-2"> <xsl:template match="dactyl:str | dactyl:t | dactyl:type" mode="pass-2">
<span> <span>
<xsl:if test="self::liberator:str"><xsl:attribute name="liberator:highlight">HelpString</xsl:attribute></xsl:if> <xsl:if test="self::dactyl:str"><xsl:attribute name="dactyl:highlight">HelpString</xsl:attribute></xsl:if>
<xsl:if test="self::liberator:t"><xsl:attribute name="liberator:highlight">HelpTopic</xsl:attribute></xsl:if> <xsl:if test="self::dactyl:t"><xsl:attribute name="dactyl:highlight">HelpTopic</xsl:attribute></xsl:if>
<xsl:if test="self::liberator:type"><xsl:attribute name="liberator:highlight">HelpType</xsl:attribute></xsl:if> <xsl:if test="self::dactyl:type"><xsl:attribute name="dactyl:highlight">HelpType</xsl:attribute></xsl:if>
<xsl:apply-templates select="@*|node()"/> <xsl:apply-templates select="@*|node()"/>
</span> </span>
</xsl:template> </xsl:template>
@@ -385,11 +385,11 @@
<xsl:param name="link" select="@href"/> <xsl:param name="link" select="@href"/>
<xsl:param name="nodes" select="node()"/> <xsl:param name="nodes" select="node()"/>
<xsl:param name="extra"/> <xsl:param name="extra"/>
<div liberator:highlight="HelpInfo"> <div dactyl:highlight="HelpInfo">
<div liberator:highlight="HelpInfoLabel"> <div dactyl:highlight="HelpInfoLabel">
<xsl:value-of select="$label"/>: <xsl:value-of select="$label"/>:
</div> </div>
<span liberator:highlight="HelpInfoValue"> <span dactyl:highlight="HelpInfoValue">
<a> <a>
<xsl:if test="$link"> <xsl:if test="$link">
<xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute> <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
@@ -400,7 +400,7 @@
</span> </span>
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="liberator:author[@email]" mode="pass-2"> <xsl:template match="dactyl:author[@email]" mode="pass-2">
<xsl:call-template name="info"> <xsl:call-template name="info">
<xsl:with-param name="label" select="'Author'"/> <xsl:with-param name="label" select="'Author'"/>
<xsl:with-param name="extra"> <xsl:with-param name="extra">
@@ -408,17 +408,17 @@
</xsl:with-param> </xsl:with-param>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="liberator:author" mode="pass-2"> <xsl:template match="dactyl:author" mode="pass-2">
<xsl:call-template name="info"> <xsl:call-template name="info">
<xsl:with-param name="label" select="'Author'"/> <xsl:with-param name="label" select="'Author'"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="liberator:license" mode="pass-2"> <xsl:template match="dactyl:license" mode="pass-2">
<xsl:call-template name="info"> <xsl:call-template name="info">
<xsl:with-param name="label" select="'License'"/> <xsl:with-param name="label" select="'License'"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="liberator:plugin" mode="pass-2"> <xsl:template match="dactyl:plugin" mode="pass-2">
<xsl:call-template name="info"> <xsl:call-template name="info">
<xsl:with-param name="label" select="'Plugin'"/> <xsl:with-param name="label" select="'Plugin'"/>
<xsl:with-param name="nodes"> <xsl:with-param name="nodes">
@@ -430,15 +430,15 @@
<!-- Special Element Templates {{{1 --> <!-- Special Element Templates {{{1 -->
<xsl:template match="liberator:logo"> <xsl:template match="dactyl:logo">
<span liberator:highlight="Logo"/> <span dactyl:highlight="Logo"/>
</xsl:template> </xsl:template>
<xsl:template match="liberator:pan[liberator:handle]"> <xsl:template match="dactyl:pan[dactyl:handle]">
<form style="text-align:center" xmlns="http://www.w3.org/1999/xhtml" <form style="text-align:center" xmlns="http://www.w3.org/1999/xhtml"
action="https://www.paypal.com/cgi-bin/webscr" method="post"> action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick"/> <input type="hidden" name="cmd" value="_s-xclick"/>
<input type="image" src="chrome://liberator/content/x-click-but21.png" border="0" name="submit" alt="Donate with PayPal"/> <input type="image" src="chrome://dactyl/content/x-click-but21.png" border="0" name="submit" alt="Donate with PayPal"/>
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYAUOJADCwiik68MpIUKcMAtNfs4Cx6RY7604ZujgKj7WVaiELWyhUUDSaq8+iLYaNkRUq+dDld96KwhfodqP3MEmIzpQ/qKvh5+4JzTWSBU5G1lHzc4NJQw6TpXKloPxxXhuGKzZ84/asKZIZpLfkP5i8VtqVFecu7qYc0q1U2KoDELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIWR7nX4WwgcqAgZgO41g/NtgfBwI14LlJx3p5Hc4nHsQD2wyu5l4BMndkc3mc0uRTXvzutcfPBxYC4aGV5UDn6c+XPzsne+OAdSs4/0a2DJe85SBDOlVyOekz3rRhy5+6XKpKQ7qfiMpKROladi4opfMac/aDUPhGeVsY0jtQCtelIE199iaVKhlbiDvfE7nzV5dLU4d3VZwSDuWBIrIIi9GMtKCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA4MDYwNTE0NDk1OFowIwYJKoZIhvcNAQkEMRYEFBpY8FafLq7i3V0czWS9TbR/RjyQMA0GCSqGSIb3DQEBAQUABIGAPvYR9EC2ynooWAvX0iw9aZYTrpX2XrTl6lYkZaLrhM1zKn4RuaiL33sPtq0o0uSKm98gQHzh4P6wmzES0jzHucZjCU4VlpW0fC+/pJxswbW7Qux+ObsNx3f45OcvprqMMZyJiEOULcNhxkm9pCeXQMUGwlHoRRtAxYK2T8L/rQQ=-----END PKCS7----- <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYAUOJADCwiik68MpIUKcMAtNfs4Cx6RY7604ZujgKj7WVaiELWyhUUDSaq8+iLYaNkRUq+dDld96KwhfodqP3MEmIzpQ/qKvh5+4JzTWSBU5G1lHzc4NJQw6TpXKloPxxXhuGKzZ84/asKZIZpLfkP5i8VtqVFecu7qYc0q1U2KoDELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIWR7nX4WwgcqAgZgO41g/NtgfBwI14LlJx3p5Hc4nHsQD2wyu5l4BMndkc3mc0uRTXvzutcfPBxYC4aGV5UDn6c+XPzsne+OAdSs4/0a2DJe85SBDOlVyOekz3rRhy5+6XKpKQ7qfiMpKROladi4opfMac/aDUPhGeVsY0jtQCtelIE199iaVKhlbiDvfE7nzV5dLU4d3VZwSDuWBIrIIi9GMtKCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA4MDYwNTE0NDk1OFowIwYJKoZIhvcNAQkEMRYEFBpY8FafLq7i3V0czWS9TbR/RjyQMA0GCSqGSIb3DQEBAQUABIGAPvYR9EC2ynooWAvX0iw9aZYTrpX2XrTl6lYkZaLrhM1zKn4RuaiL33sPtq0o0uSKm98gQHzh4P6wmzES0jzHucZjCU4VlpW0fC+/pJxswbW7Qux+ObsNx3f45OcvprqMMZyJiEOULcNhxkm9pCeXQMUGwlHoRRtAxYK2T8L/rQQ=-----END PKCS7-----
"/> "/>
</form> </form>

View File

@@ -43,11 +43,11 @@ const Hints = Module("hints", {
s: Mode("Save hint", function (elem) buffer.saveLink(elem, true)), s: Mode("Save hint", function (elem) buffer.saveLink(elem, true)),
a: Mode("Save hint with prompt", function (elem) buffer.saveLink(elem, false)), a: Mode("Save hint with prompt", function (elem) buffer.saveLink(elem, false)),
f: Mode("Focus frame", function (elem) elem.ownerDocument.defaultView.focus(), function () ["body"]), f: Mode("Focus frame", function (elem) elem.ownerDocument.defaultView.focus(), function () ["body"]),
o: Mode("Follow hint", function (elem) buffer.followLink(elem, liberator.CURRENT_TAB)), o: Mode("Follow hint", function (elem) buffer.followLink(elem, dactyl.CURRENT_TAB)),
t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, liberator.NEW_TAB)), t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, dactyl.NEW_TAB)),
b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB)), b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB)),
w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, liberator.NEW_WINDOW), extended), w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, dactyl.NEW_WINDOW), extended),
F: Mode("Open multiple hints in tabs", function (elem) { buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB); hints.show("F") }), F: Mode("Open multiple hints in tabs", function (elem) { buffer.followLink(elem, dactyl.NEW_BACKGROUND_TAB); hints.show("F") }),
O: Mode("Generate an ':open URL' using hint", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)), O: Mode("Generate an ':open URL' using hint", function (elem, loc) commandline.open(":", "open " + loc, modes.EX)),
T: Mode("Generate a ':tabopen URL' using hint", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)), T: Mode("Generate a ':tabopen URL' using hint", function (elem, loc) commandline.open(":", "tabopen " + loc, modes.EX)),
W: Mode("Generate a ':winopen URL' using hint", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)), W: Mode("Generate a ':winopen URL' using hint", function (elem, loc) commandline.open(":", "winopen " + loc, modes.EX)),
@@ -56,8 +56,8 @@ const Hints = Module("hints", {
y: Mode("Yank hint location", function (elem, loc) util.copyToClipboard(loc, true)), y: Mode("Yank hint location", function (elem, loc) util.copyToClipboard(loc, true)),
Y: Mode("Yank hint description", function (elem) util.copyToClipboard(elem.textContent || "", true), extended), Y: Mode("Yank hint description", function (elem) util.copyToClipboard(elem.textContent || "", true), extended),
c: Mode("Open context menu", function (elem) buffer.openContextMenu(elem), extended), c: Mode("Open context menu", function (elem) buffer.openContextMenu(elem), extended),
i: Mode("Show image", function (elem) liberator.open(elem.src), images), i: Mode("Show image", function (elem) dactyl.open(elem.src), images),
I: Mode("Show image in a new tab", function (elem) liberator.open(elem.src, liberator.NEW_TAB), images) I: Mode("Show image in a new tab", function (elem) dactyl.open(elem.src, dactyl.NEW_TAB), images)
}; };
}, },
@@ -162,7 +162,7 @@ const Hints = Module("hints", {
_getAreaOffset: function (elem, leftPos, topPos) { _getAreaOffset: function (elem, leftPos, topPos) {
try { try {
// Need to add the offset to the area element. // Need to add the offset to the area element.
// Always try to find the top-left point, as per liberator default. // Always try to find the top-left point, as per dactyl default.
let shape = elem.getAttribute("shape").toLowerCase(); let shape = elem.getAttribute("shape").toLowerCase();
let coordStr = elem.getAttribute("coords"); let coordStr = elem.getAttribute("coords");
// Technically it should be only commas, but hey // Technically it should be only commas, but hey
@@ -357,7 +357,7 @@ const Hints = Module("hints", {
if (!rect) if (!rect)
continue; continue;
hint.imgSpan = util.xmlToDom(<span highlight="Hint" liberator:class="HintImage" xmlns:liberator={NS}/>, doc); hint.imgSpan = util.xmlToDom(<span highlight="Hint" dactyl:class="HintImage" xmlns:dactyl={NS}/>, doc);
hint.imgSpan.style.left = (rect.left + offsetX) + "px"; hint.imgSpan.style.left = (rect.left + offsetX) + "px";
hint.imgSpan.style.top = (rect.top + offsetY) + "px"; hint.imgSpan.style.top = (rect.top + offsetY) + "px";
hint.imgSpan.style.width = (rect.right - rect.left) + "px"; hint.imgSpan.style.width = (rect.right - rect.left) + "px";
@@ -381,7 +381,7 @@ const Hints = Module("hints", {
let css = []; let css = [];
// FIXME: Broken for imgspans. // FIXME: Broken for imgspans.
for (let [, { doc: doc }] in Iterator(this._docs)) { for (let [, { doc: doc }] in Iterator(this._docs)) {
for (let elem in util.evaluateXPath("//*[@liberator:highlight and @number]", doc)) { for (let elem in util.evaluateXPath("//*[@dactyl:highlight and @number]", doc)) {
let group = elem.getAttributeNS(NS.uri, "highlight"); let group = elem.getAttributeNS(NS.uri, "highlight");
css.push(highlight.selector(group) + "[number=" + elem.getAttribute("number").quote() + "] { " + elem.style.cssText + " }"); css.push(highlight.selector(group) + "[number=" + elem.getAttribute("number").quote() + "] { " + elem.style.cssText + " }");
} }
@@ -404,7 +404,7 @@ const Hints = Module("hints", {
let firstElem = this._validHints[0] || null; let firstElem = this._validHints[0] || null;
for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) { for (let [,{ doc: doc, start: start, end: end }] in Iterator(this._docs)) {
for (let elem in util.evaluateXPath("//*[@liberator:highlight='hints']", doc)) for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc))
elem.parentNode.removeChild(elem); elem.parentNode.removeChild(elem);
for (let i in util.range(start, end + 1)) { for (let i in util.range(start, end + 1)) {
let hint = this._pageHints[i]; let hint = this._pageHints[i];
@@ -433,7 +433,7 @@ const Hints = Module("hints", {
*/ */
_processHints: function (followFirst) { _processHints: function (followFirst) {
if (this._validHints.length == 0) { if (this._validHints.length == 0) {
liberator.beep(); dactyl.beep();
return false; return false;
} }
@@ -445,7 +445,7 @@ const Hints = Module("hints", {
// OK. return hit. But there's more than one hint, and // OK. return hit. But there's more than one hint, and
// there's no tab-selected current link. Do not follow in mode 2 // there's no tab-selected current link. Do not follow in mode 2
liberator.assert(options["followhints"] != 2 || this._validHints.length == 1 || this._hintNumber) dactyl.assert(options["followhints"] != 2 || this._validHints.length == 1 || this._hintNumber)
} }
if (!followFirst) { if (!followFirst) {
@@ -478,7 +478,7 @@ const Hints = Module("hints", {
_checkUnique: function () { _checkUnique: function () {
if (this._hintNumber == 0) if (this._hintNumber == 0)
return; return;
liberator.assert(this._hintNumber <= this._validHints.length); dactyl.assert(this._hintNumber <= this._validHints.length);
// if we write a numeric part like 3, but we have 45 hints, only follow // if we write a numeric part like 3, but we have 45 hints, only follow
// the hint after a timeout, as the user might have wanted to follow link 34 // the hint after a timeout, as the user might have wanted to follow link 34
@@ -681,8 +681,8 @@ const Hints = Module("hints", {
case "contains" : return containsMatcher(hintString); case "contains" : return containsMatcher(hintString);
case "wordstartswith": return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ true); case "wordstartswith": return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ true);
case "firstletters" : return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ false); case "firstletters" : return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ false);
case "custom" : return liberator.plugins.customHintMatcher(hintString); case "custom" : return dactyl.plugins.customHintMatcher(hintString);
default : liberator.echoerr("Invalid hintmatching type: " + hintMatching); default : dactyl.echoerr("Invalid hintmatching type: " + hintMatching);
} }
return null; return null;
}, //}}} }, //}}}
@@ -713,7 +713,7 @@ const Hints = Module("hints", {
*/ */
show: function (minor, filter, win) { show: function (minor, filter, win) {
this._hintMode = this._hintModes[minor]; this._hintMode = this._hintModes[minor];
liberator.assert(this._hintMode); dactyl.assert(this._hintMode);
commandline.input(this._hintMode.prompt + ": ", null, { onChange: this.closure._onInput }); commandline.input(this._hintMode.prompt + ": ", null, { onChange: this.closure._onInput });
modes.extended = modes.HINTS; modes.extended = modes.HINTS;
@@ -728,13 +728,13 @@ const Hints = Module("hints", {
this._generate(win); this._generate(win);
// get all keys from the input queue // get all keys from the input queue
liberator.threadYield(true); dactyl.threadYield(true);
this._canUpdate = true; this._canUpdate = true;
this._showHints(); this._showHints();
if (this._validHints.length == 0) { if (this._validHints.length == 0) {
liberator.beep(); dactyl.beep();
modes.reset(); modes.reset();
} }
else if (this._validHints.length == 1) else if (this._validHints.length == 1)
@@ -798,7 +798,7 @@ const Hints = Module("hints", {
else { else {
this._usedTabKey = false; this._usedTabKey = false;
this._hintNumber = 0; this._hintNumber = 0;
liberator.beep(); dactyl.beep();
return; return;
} }
break; break;
@@ -834,7 +834,7 @@ const Hints = Module("hints", {
} }
this._showActiveHint(this._hintNumber, oldHintNumber || 1); this._showActiveHint(this._hintNumber, oldHintNumber || 1);
liberator.assert(this._hintNumber != 0); dactyl.assert(this._hintNumber != 0);
this._checkUnique(); this._checkUnique();
} }
@@ -1016,8 +1016,8 @@ const Hints = Module("hints", {
// In fact, it might be nice if there was a "dual" to F (like H and // In fact, it might be nice if there was a "dual" to F (like H and
// gH, except that gF is already taken). --tpp // gH, except that gF is already taken). --tpp
// //
// Likewise, it might be nice to have a liberator.NEW_FOREGROUND_TAB // Likewise, it might be nice to have a dactyl.NEW_FOREGROUND_TAB
// and then make liberator.NEW_TAB always do what a Cntrl+Click // and then make dactyl.NEW_TAB always do what a Cntrl+Click
// does. --tpp // does. --tpp
mappings.add(myModes, ["F"], mappings.add(myModes, ["F"],
"Start QuickHint mode, but open link in a new tab", "Start QuickHint mode, but open link in a new tab",
@@ -1090,7 +1090,7 @@ const Hints = Module("hints", {
["contains", "The typed characters are split on whitespace. The resulting groups must all appear in the hint."], ["contains", "The typed characters are split on whitespace. The resulting groups must all appear in the hint."],
["wordstartswith", "The typed characters are split on whitespace. The resulting groups must all match the beginings of words, in order."], ["wordstartswith", "The typed characters are split on whitespace. The resulting groups must all match the beginings of words, in order."],
["firstletters", "Behaves like wordstartswith, but all groups much match a sequence of words."], ["firstletters", "Behaves like wordstartswith, but all groups much match a sequence of words."],
["custom", "Delegate to a custom function: liberator.plugins.customHintMatcher(hintString)"], ["custom", "Delegate to a custom function: dactyl.plugins.customHintMatcher(hintString)"],
["transliterated", "When true, special latin characters are translated to their ascii equivalent (e.g., \u00e9 -> e)"] ["transliterated", "When true, special latin characters are translated to their ascii equivalent (e.g., \u00e9 -> e)"]
] ]
}); });

View File

@@ -63,7 +63,7 @@ const History = Module("history", {
let current = window.getWebNavigation().sessionHistory.index; let current = window.getWebNavigation().sessionHistory.index;
if (current == start && steps < 0 || current == end && steps > 0) if (current == start && steps < 0 || current == end && steps > 0)
liberator.beep(); dactyl.beep();
else { else {
let index = util.Math.constrain(current + steps, start, end); let index = util.Math.constrain(current + steps, start, end);
window.getWebNavigation().gotoIndex(index); window.getWebNavigation().gotoIndex(index);
@@ -76,7 +76,7 @@ const History = Module("history", {
if (index > 0) if (index > 0)
window.getWebNavigation().gotoIndex(0); window.getWebNavigation().gotoIndex(0);
else else
liberator.beep(); dactyl.beep();
}, },
@@ -87,7 +87,7 @@ const History = Module("history", {
if (sh.index < max) if (sh.index < max)
window.getWebNavigation().gotoIndex(max); window.getWebNavigation().gotoIndex(max);
else else
liberator.beep(); dactyl.beep();
}, },
@@ -101,12 +101,12 @@ const History = Module("history", {
let items = completion.runCompleter("history", filter, maxItems); let items = completion.runCompleter("history", filter, maxItems);
if (items.length) 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) if (filter.length > 0)
liberator.echoerr("E283: No history matching \"" + filter + "\""); dactyl.echoerr("E283: No history matching \"" + filter + "\"");
else else
liberator.echoerr("No history set"); dactyl.echoerr("No history set");
return null; return null;
} }
}, { }, {
@@ -128,7 +128,7 @@ const History = Module("history", {
for (let [i, ent] in Iterator(sh.slice(0, sh.index).reverse())) for (let [i, ent] in Iterator(sh.slice(0, sh.index).reverse()))
if (ent.URI.spec == url) if (ent.URI.spec == url)
return void window.getWebNavigation().gotoIndex(i); return void window.getWebNavigation().gotoIndex(i);
liberator.echoerr("Exxx: URL not found in history"); dactyl.echoerr("Exxx: URL not found in history");
} }
else else
history.stepTo(-Math.max(args.count, 1)); history.stepTo(-Math.max(args.count, 1));
@@ -167,7 +167,7 @@ const History = Module("history", {
for (let [i, ent] in Iterator(sh.slice(sh.index + 1))) for (let [i, ent] in Iterator(sh.slice(sh.index + 1)))
if (ent.URI.spec == url) if (ent.URI.spec == url)
return void window.getWebNavigation().gotoIndex(i); return void window.getWebNavigation().gotoIndex(i);
liberator.echoerr("Exxx: URL not found in history"); dactyl.echoerr("Exxx: URL not found in history");
} }
else else
history.stepTo(Math.max(args.count, 1)); history.stepTo(Math.max(args.count, 1));

View File

@@ -170,7 +170,7 @@ const File = Class("File", {
ocstream.writeString(buf); ocstream.writeString(buf);
} }
catch (e) { catch (e) {
liberator.dump(e); dactyl.dump(e);
if (e.result == Cr.NS_ERROR_LOSS_OF_SIGNIFICANT_DATA) { if (e.result == Cr.NS_ERROR_LOSS_OF_SIGNIFICANT_DATA) {
ocstream = getStream("?".charCodeAt(0)); ocstream = getStream("?".charCodeAt(0));
ocstream.writeString(buf); ocstream.writeString(buf);
@@ -251,7 +251,7 @@ const File = Class("File", {
// Kris reckons we shouldn't replicate this 'bug'. --djk // Kris reckons we shouldn't replicate this 'bug'. --djk
// TODO: should we be doing this for all paths? // TODO: should we be doing this for all paths?
function expand(path) path.replace( function expand(path) path.replace(
!liberator.has("Win32") ? /\$(\w+)\b|\${(\w+)}/g !dactyl.has("Win32") ? /\$(\w+)\b|\${(\w+)}/g
: /\$(\w+)\b|\${(\w+)}|%(\w+)%/g, : /\$(\w+)\b|\${(\w+)}|%(\w+)%/g,
function (m, n1, n2, n3) services.get("environment").get(n1 || n2 || n3) || m function (m, n1, n2, n3) services.get("environment").get(n1 || n2 || n3) || m
); );
@@ -264,7 +264,7 @@ const File = Class("File", {
let home = services.get("environment").get("HOME"); let home = services.get("environment").get("HOME");
// Windows has its own idiosyncratic $HOME variables. // Windows has its own idiosyncratic $HOME variables.
if (!home && liberator.has("Win32")) if (!home && dactyl.has("Win32"))
home = services.get("environment").get("USERPROFILE") || home = services.get("environment").get("USERPROFILE") ||
services.get("environment").get("HOMEDRIVE") + services.get("environment").get("HOMEPATH"); services.get("environment").get("HOMEDRIVE") + services.get("environment").get("HOMEPATH");
@@ -340,7 +340,7 @@ const IO = Module("io", {
let file = download.targetFile.path; let file = download.targetFile.path;
let size = download.size; let size = download.size;
liberator.echomsg("Download of " + title + " to " + file + " finished", 1, commandline.ACTIVE_WINDOW); dactyl.echomsg("Download of " + title + " to " + file + " finished", 1, commandline.ACTIVE_WINDOW);
autocommands.trigger("DownloadPost", { url: url, title: title, file: file, size: size }); autocommands.trigger("DownloadPost", { url: url, title: title, file: file, size: size });
} }
}, },
@@ -426,7 +426,7 @@ const IO = Module("io", {
let dir = File(newDir); let dir = File(newDir);
if (!dir.exists() || !dir.isDirectory()) { if (!dir.exists() || !dir.isDirectory()) {
liberator.echoerr("E344: Can't find directory \"" + dir.path + "\" in path"); dactyl.echoerr("E344: Can't find directory \"" + dir.path + "\" in path");
return null; return null;
} }
@@ -465,7 +465,7 @@ const IO = Module("io", {
let rcFile1 = File.joinPaths(dir, "." + config.name.toLowerCase() + "rc"); let rcFile1 = File.joinPaths(dir, "." + config.name.toLowerCase() + "rc");
let rcFile2 = File.joinPaths(dir, "_" + config.name.toLowerCase() + "rc"); let rcFile2 = File.joinPaths(dir, "_" + config.name.toLowerCase() + "rc");
if (liberator.has("Win32")) if (dactyl.has("Win32"))
[rcFile1, rcFile2] = [rcFile2, rcFile1]; [rcFile1, rcFile2] = [rcFile2, rcFile1];
if (rcFile1.exists() && rcFile1.isFile()) if (rcFile1.exists() && rcFile1.isFile())
@@ -509,9 +509,9 @@ const IO = Module("io", {
if (File.isAbsolutePath(program)) if (File.isAbsolutePath(program))
file = File(program, true); file = File(program, true);
else { else {
let dirs = services.get("environment").get("PATH").split(liberator.has("Win32") ? ";" : ":"); let dirs = services.get("environment").get("PATH").split(dactyl.has("Win32") ? ";" : ":");
// Windows tries the CWD first TODO: desirable? // Windows tries the CWD first TODO: desirable?
if (liberator.has("Win32")) if (dactyl.has("Win32"))
dirs = [io.getCurrentDirectory().path].concat(dirs); dirs = [io.getCurrentDirectory().path].concat(dirs);
lookup: lookup:
@@ -523,7 +523,7 @@ lookup:
// TODO: couldn't we just palm this off to the start command? // TODO: couldn't we just palm this off to the start command?
// automatically try to add the executable path extensions on windows // automatically try to add the executable path extensions on windows
if (liberator.has("Win32")) { if (dactyl.has("Win32")) {
let extensions = services.get("environment").get("PATHEXT").split(";"); let extensions = services.get("environment").get("PATHEXT").split(";");
for (let [, extension] in Iterator(extensions)) { for (let [, extension] in Iterator(extensions)) {
file = File.joinPaths(dir, program + extension); file = File.joinPaths(dir, program + extension);
@@ -537,7 +537,7 @@ lookup:
} }
if (!file || !file.exists()) { if (!file || !file.exists()) {
liberator.echoerr("Command not found: " + program); dactyl.echoerr("Command not found: " + program);
return -1; return -1;
} }
@@ -564,14 +564,14 @@ lookup:
let dirs = File.getPathsFromPathList(options["runtimepath"]); let dirs = File.getPathsFromPathList(options["runtimepath"]);
let found = false; let found = false;
liberator.echomsg("Searching for \"" + paths.join(" ") + "\" in \"" + options["runtimepath"] + "\"", 2); dactyl.echomsg("Searching for \"" + paths.join(" ") + "\" in \"" + options["runtimepath"] + "\"", 2);
outer: outer:
for (let [, dir] in Iterator(dirs)) { for (let [, dir] in Iterator(dirs)) {
for (let [, path] in Iterator(paths)) { for (let [, path] in Iterator(paths)) {
let file = File.joinPaths(dir, path); let file = File.joinPaths(dir, path);
liberator.echomsg("Searching for \"" + file.path + "\"", 3); dactyl.echomsg("Searching for \"" + file.path + "\"", 3);
if (file.exists() && file.isFile() && file.isReadable()) { if (file.exists() && file.isFile() && file.isReadable()) {
io.source(file.path, false); io.source(file.path, false);
@@ -584,7 +584,7 @@ lookup:
} }
if (!found) if (!found)
liberator.echomsg("not found in 'runtimepath': \"" + paths.join(" ") + "\"", 1); dactyl.echomsg("not found in 'runtimepath': \"" + paths.join(" ") + "\"", 1);
return found; return found;
}, },
@@ -597,7 +597,7 @@ lookup:
*/ */
source: function (filename, silent) { source: function (filename, silent) {
let wasSourcing = this.sourcing; let wasSourcing = this.sourcing;
liberator.dump("sourcing " + filename); dactyl.dump("sourcing " + filename);
let time = Date.now(); let time = Date.now();
try { try {
var file = File(filename); var file = File(filename);
@@ -609,17 +609,17 @@ lookup:
if (!file.exists() || !file.isReadable() || file.isDirectory()) { if (!file.exists() || !file.isReadable() || file.isDirectory()) {
if (!silent) { if (!silent) {
if (file.exists() && file.isDirectory()) if (file.exists() && file.isDirectory())
liberator.echomsg("Cannot source a directory: \"" + filename + "\"", 0); dactyl.echomsg("Cannot source a directory: \"" + filename + "\"", 0);
else else
liberator.echomsg("could not source: \"" + filename + "\"", 1); dactyl.echomsg("could not source: \"" + filename + "\"", 1);
liberator.echoerr("E484: Can't open file " + filename); dactyl.echoerr("E484: Can't open file " + filename);
} }
return; return;
} }
liberator.echomsg("sourcing \"" + filename + "\"", 2); dactyl.echomsg("sourcing \"" + filename + "\"", 2);
let str = file.read(); let str = file.read();
let uri = services.get("io").newFileURI(file); let uri = services.get("io").newFileURI(file);
@@ -627,8 +627,8 @@ lookup:
// handle pure JavaScript files specially // handle pure JavaScript files specially
if (/\.js$/.test(filename)) { if (/\.js$/.test(filename)) {
try { try {
liberator.loadScript(uri.spec, Script(file)); dactyl.loadScript(uri.spec, Script(file));
liberator.helpInitialized = false; dactyl.helpInitialized = false;
} }
catch (e) { catch (e) {
let err = new Error(); let err = new Error();
@@ -671,9 +671,9 @@ lookup:
if (!command) { if (!command) {
let lineNumber = i + 1; let lineNumber = i + 1;
liberator.echoerr("Error detected while processing " + file.path, commandline.FORCE_MULTILINE); dactyl.echoerr("Error detected while processing " + file.path, commandline.FORCE_MULTILINE);
commandline.echo("line " + lineNumber + ":", commandline.HL_LINENR, commandline.APPEND_TO_MESSAGES); commandline.echo("line " + lineNumber + ":", commandline.HL_LINENR, commandline.APPEND_TO_MESSAGES);
liberator.echoerr("E492: Not an editor command: " + line); dactyl.echoerr("E492: Not an editor command: " + line);
} }
else { else {
if (command.name == "finish") if (command.name == "finish")
@@ -705,18 +705,18 @@ lookup:
if (this._scriptNames.indexOf(file.path) == -1) if (this._scriptNames.indexOf(file.path) == -1)
this._scriptNames.push(file.path); this._scriptNames.push(file.path);
liberator.echomsg("finished sourcing \"" + filename + "\"", 2); dactyl.echomsg("finished sourcing \"" + filename + "\"", 2);
liberator.log("Sourced: " + filename, 3); dactyl.log("Sourced: " + filename, 3);
} }
catch (e) { catch (e) {
liberator.reportError(e); dactyl.reportError(e);
let message = "Sourcing file: " + (e.echoerr || file.path + ": " + e); let message = "Sourcing file: " + (e.echoerr || file.path + ": " + e);
if (!silent) if (!silent)
liberator.echoerr(message); dactyl.echoerr(message);
} }
finally { finally {
liberator.dump("done sourcing " + filename + ": " + (Date.now() - time) + "ms"); dactyl.dump("done sourcing " + filename + ": " + (Date.now() - time) + "ms");
this.sourcing = wasSourcing; this.sourcing = wasSourcing;
} }
}, },
@@ -732,7 +732,7 @@ lookup:
* @returns {string} * @returns {string}
*/ */
system: function (command, input) { system: function (command, input) {
liberator.echomsg("Calling shell to execute: " + command, 4); dactyl.echomsg("Calling shell to execute: " + command, 4);
function escape(str) '"' + str.replace(/[\\"$]/g, "\\$&") + '"'; function escape(str) '"' + str.replace(/[\\"$]/g, "\\$&") + '"';
@@ -741,7 +741,7 @@ lookup:
stdin.write(input); stdin.write(input);
// TODO: implement 'shellredir' // TODO: implement 'shellredir'
if (liberator.has("Win32")) { if (dactyl.has("Win32")) {
command = "cd /D " + this._cwd.path + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path; command = "cd /D " + this._cwd.path + " && " + command + " > " + stdout.path + " 2>&1" + " < " + stdin.path;
var res = this.run(options["shell"], options["shellcmdflag"].split(/\s+/).concat(command), true); var res = this.run(options["shell"], options["shellcmdflag"].split(/\s+/).concat(command), true);
} }
@@ -788,14 +788,14 @@ lookup:
} }
}, { }, {
/** /**
* @property {string} The value of the $VIMPERATOR_RUNTIME environment * @property {string} The value of the $PENTADACTYL_RUNTIME environment
* variable. * variable.
*/ */
get runtimePath() { get runtimePath() {
const rtpvar = config.name.toUpperCase() + "_RUNTIME"; const rtpvar = config.name.toUpperCase() + "_RUNTIME";
let rtp = services.get("environment").get(rtpvar); let rtp = services.get("environment").get(rtpvar);
if (!rtp) { if (!rtp) {
rtp = "~/" + (liberator.has("Win32") ? "" : ".") + config.name.toLowerCase(); rtp = "~/" + (dactyl.has("Win32") ? "" : ".") + config.name.toLowerCase();
services.get("environment").set(rtpvar, rtp); services.get("environment").set(rtpvar, rtp);
} }
return rtp; return rtp;
@@ -820,7 +820,7 @@ lookup:
if (!arg) if (!arg)
arg = "~"; arg = "~";
else if (arg == "-") { else if (arg == "-") {
liberator.assert(io._oldcwd, "E186: No previous directory"); dactyl.assert(io._oldcwd, "E186: No previous directory");
arg = io._oldcwd.path; arg = io._oldcwd.path;
} }
@@ -831,7 +831,7 @@ lookup:
// TODO: handle ../ and ./ paths // TODO: handle ../ and ./ paths
if (File.isAbsolutePath(arg)) { if (File.isAbsolutePath(arg)) {
if (io.setCurrentDirectory(arg)) if (io.setCurrentDirectory(arg))
liberator.echomsg(io.getCurrentDirectory().path); dactyl.echomsg(io.getCurrentDirectory().path);
} }
else { else {
let dirs = File.getPathsFromPathList(options["cdpath"]); let dirs = File.getPathsFromPathList(options["cdpath"]);
@@ -842,14 +842,14 @@ lookup:
if (dir.exists() && dir.isDirectory() && dir.isReadable()) { if (dir.exists() && dir.isDirectory() && dir.isReadable()) {
io.setCurrentDirectory(dir.path); io.setCurrentDirectory(dir.path);
liberator.echomsg(io.getCurrentDirectory().path); dactyl.echomsg(io.getCurrentDirectory().path);
found = true; found = true;
break; break;
} }
} }
if (!found) { if (!found) {
liberator.echoerr("E344: Can't find directory " + arg.quote() + " in cdpath\n" dactyl.echoerr("E344: Can't find directory " + arg.quote() + " in cdpath\n"
+ "E472: Command failed"); + "E472: Command failed");
} }
} }
@@ -862,32 +862,32 @@ lookup:
// NOTE: this command is only used in :source // NOTE: this command is only used in :source
commands.add(["fini[sh]"], commands.add(["fini[sh]"],
"Stop sourcing a script file", "Stop sourcing a script file",
function () { liberator.echoerr("E168: :finish used outside of a sourced file"); }, function () { dactyl.echoerr("E168: :finish used outside of a sourced file"); },
{ argCount: "0" }); { argCount: "0" });
commands.add(["pw[d]"], commands.add(["pw[d]"],
"Print the current directory name", "Print the current directory name",
function () { liberator.echomsg(io.getCurrentDirectory().path); }, function () { dactyl.echomsg(io.getCurrentDirectory().path); },
{ argCount: "0" }); { argCount: "0" });
// "mkv[imperatorrc]" or "mkm[uttatorrc]" // "mkv[imperatorrc]" or "mkm[uttatorrc]"
commands.add([config.name.toLowerCase().replace(/(.)(.*)/, "mk$1[$2rc]")], commands.add([config.name.toLowerCase().replace(/(.)(.*)/, "mk$1[$2rc]")],
"Write current key mappings and changed options to the config file", "Write current key mappings and changed options to the config file",
function (args) { function (args) {
liberator.assert(args.length <= 1, "E172: Only one file name allowed"); dactyl.assert(args.length <= 1, "E172: Only one file name allowed");
let filename = args[0] || io.getRCFile(null, true).path; let filename = args[0] || io.getRCFile(null, true).path;
let file = File(filename); let file = File(filename);
liberator.assert(!file.exists() || args.bang, dactyl.assert(!file.exists() || args.bang,
"E189: \"" + filename + "\" exists (add ! to override)"); "E189: \"" + filename + "\" exists (add ! to override)");
// TODO: Use a set/specifiable list here: // TODO: Use a set/specifiable list here:
let lines = [cmd.serial().map(commands.commandToString) for (cmd in commands) if (cmd.serial)]; let lines = [cmd.serial().map(commands.commandToString) for (cmd in commands) if (cmd.serial)];
lines = util.Array.flatten(lines); lines = util.Array.flatten(lines);
// source a user .vimperatorrc file // source a user .pentadactylrc file
lines.unshift('"' + liberator.version + "\n"); lines.unshift('"' + dactyl.version + "\n");
// For the record, I think that adding this line is absurd. --Kris // For the record, I think that adding this line is absurd. --Kris
// I can't disagree. --djk // I can't disagree. --djk
@@ -903,8 +903,8 @@ lookup:
file.write(lines.join("\n")); file.write(lines.join("\n"));
} }
catch (e) { catch (e) {
liberator.echoerr("E190: Cannot open \"" + filename + "\" for writing"); dactyl.echoerr("E190: Cannot open \"" + filename + "\" for writing");
liberator.log("Could not write to " + file.path + ": " + e.message); // XXX dactyl.log("Could not write to " + file.path + ": " + e.message); // XXX
} }
}, { }, {
argCount: "*", // FIXME: should be "?" but kludged for proper error message argCount: "*", // FIXME: should be "?" but kludged for proper error message
@@ -934,7 +934,7 @@ lookup:
"Read Ex commands from a file", "Read Ex commands from a file",
function (args) { function (args) {
if (args.length > 1) if (args.length > 1)
liberator.echoerr("E172: Only one file name allowed"); dactyl.echoerr("E172: Only one file name allowed");
else else
io.source(args[0], args.bang); io.source(args[0], args.bang);
}, { }, {
@@ -954,7 +954,7 @@ lookup:
arg = "!" + arg; arg = "!" + arg;
// replaceable bang and no previous command? // replaceable bang and no previous command?
liberator.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand, dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand,
"E34: No previous command"); "E34: No previous command");
// NOTE: Vim doesn't replace ! preceded by 2 or more backslashes and documents it - desirable? // NOTE: Vim doesn't replace ! preceded by 2 or more backslashes and documents it - desirable?
@@ -992,7 +992,7 @@ lookup:
"more1 more2 more3 more4 more5 unicode".split(" ").map(function (key) "more1 more2 more3 more4 more5 unicode".split(" ").map(function (key)
options.getPref("intl.charsetmenu.browser." + key).split(', ')) options.getPref("intl.charsetmenu.browser." + key).split(', '))
).flatten().uniq(); ).flatten().uniq();
let bundle = document.getElementById("liberator-charset-bundle"); let bundle = document.getElementById("dactyl-charset-bundle");
return names.map(function (name) [name, bundle.getString(name.toLowerCase() + ".title")]); return names.map(function (name) [name, bundle.getString(name.toLowerCase() + ".title")]);
}; };
}; };
@@ -1003,7 +1003,7 @@ lookup:
}; };
completion.environment = function environment(context) { completion.environment = function environment(context) {
let command = liberator.has("Win32") ? "set" : "env"; let command = dactyl.has("Win32") ? "set" : "env";
let lines = io.system(command).split("\n"); let lines = io.system(command).split("\n");
lines.pop(); lines.pop();
@@ -1050,7 +1050,7 @@ lookup:
completion.shellCommand = function shellCommand(context) { completion.shellCommand = function shellCommand(context) {
context.title = ["Shell Command", "Path"]; context.title = ["Shell Command", "Path"];
context.generate = function () { context.generate = function () {
let dirNames = services.get("environment").get("PATH").split(RegExp(liberator.has("Win32") ? ";" : ":")); let dirNames = services.get("environment").get("PATH").split(RegExp(dactyl.has("Win32") ? ";" : ":"));
let commands = []; let commands = [];
for (let [, dirName] in Iterator(dirNames)) { for (let [, dirName] in Iterator(dirNames)) {
@@ -1072,7 +1072,7 @@ lookup:
}, },
options: function () { options: function () {
var shell, shellcmdflag; var shell, shellcmdflag;
if (liberator.has("Win32")) { if (dactyl.has("Win32")) {
shell = "cmd.exe"; shell = "cmd.exe";
// TODO: setting 'shell' to "something containing sh" updates // TODO: setting 'shell' to "something containing sh" updates
// 'shellcmdflag' appropriately at startup on Windows in Vim // 'shellcmdflag' appropriately at startup on Windows in Vim

View File

@@ -123,7 +123,7 @@ const JavaScript = Module("javascript", {
context[JavaScript.EVAL_TMP] = tmp; context[JavaScript.EVAL_TMP] = tmp;
try { try {
return cache[key] = liberator.eval(arg, context); return cache[key] = dactyl.eval(arg, context);
} }
catch (e) { catch (e) {
return null; return null;
@@ -429,7 +429,7 @@ const JavaScript = Module("javascript", {
} }
catch (e) { catch (e) {
if (e.message != "Invalid JS") if (e.message != "Invalid JS")
liberator.reportError(e); dactyl.reportError(e);
this._lastIdx = 0; this._lastIdx = 0;
return null; return null;
} }
@@ -499,7 +499,7 @@ const JavaScript = Module("javascript", {
obj = obj.slice(0, 1); obj = obj.slice(0, 1);
try { try {
var completer = obj[0][0][func].liberatorCompleter; var completer = obj[0][0][func].dactylCompleter;
} }
catch (e) {} catch (e) {}
if (!completer) if (!completer)
@@ -566,7 +566,7 @@ const JavaScript = Module("javascript", {
return null; return null;
} }
}, { }, {
EVAL_TMP: "__liberator_eval_tmp", EVAL_TMP: "__dactyl_eval_tmp",
/** /**
* A map of argument completion functions for named methods. The * A map of argument completion functions for named methods. The
@@ -598,7 +598,7 @@ const JavaScript = Module("javascript", {
setCompleter: function (funcs, completers) { setCompleter: function (funcs, completers) {
funcs = Array.concat(funcs); funcs = Array.concat(funcs);
for (let [, func] in Iterator(funcs)) { for (let [, func] in Iterator(funcs)) {
func.liberatorCompleter = function (context, func, obj, args) { func.dactylCompleter = function (context, func, obj, args) {
let completer = completers[args.length - 1]; let completer = completers[args.length - 1];
if (!completer) if (!completer)
return []; return [];

View File

@@ -1,104 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ***** BEGIN LICENSE BLOCK ***** {{{
Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
This work is licensed for reuse under an MIT license. Details are
given in the LICENSE.txt file included with this file.
}}} ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://liberator/skin/liberator.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "liberator.dtd" [
<!ENTITY liberator.content "chrome://liberator/content/">
<!ENTITY and "&amp;&amp;">
]>
<overlay id="liberator"
xmlns:liberator="http://vimperator.org/namespaces/liberator"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript;version=1.8" src="&liberator.content;liberator-overlay.js"/>
<window id="&liberator.mainWindow;">
<stringbundleset id="liberator-stringbundles">
<stringbundle id="liberator-charset-bundle"
src="chrome://global/locale/charsetTitles.properties"/>
</stringbundleset>
<keyset id="mainKeyset">
<key id="key_open_vimbar" key=":" oncommand="window.liberator &and; liberator.modules.commandline.open(':', '', liberator.modules.modes.EX);" modifiers=""/>
<key id="key_stop" keycode="VK_ESCAPE" oncommand="window.liberator &and; liberator.modules.events.onEscape();"/>
<!-- other keys are handled inside the event loop in events.js -->
</keyset>
<popupset>
<panel id="liberator-visualbell" liberator:highlight="Bell"/>
</popupset>
<!--this notifies us also of focus events in the XUL
from: http://developer.mozilla.org/en/docs/XUL_Tutorial:Updating_Commands !-->
<commandset id="onVimperatorFocus"
commandupdater="true"
events="focus"
oncommandupdate="if (window.liberator &and; liberator.modules.events != undefined) liberator.modules.events.onFocusChange(event);"/>
<commandset id="onVimperatorSelect"
commandupdater="true"
events="select"
oncommandupdate="if (window.liberator &and; liberator.modules.events != undefined) liberator.modules.events.onSelectionChange(event);"/>
<!-- As of Firefox 3.1pre, <iframe>.height changes do not seem to have immediate effect,
therefore we need to put them into a <vbox> for which that works just fine -->
<vbox class="liberator-container" hidden="false" collapsed="true">
<iframe id="liberator-multiline-output" src="chrome://liberator/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="window.liberator &and; liberator.modules.commandline.onMultilineOutputEvent(event)"/>
</vbox>
<vbox class="liberator-container" hidden="false" collapsed="true">
<iframe id="liberator-completions" src="chrome://liberator/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="window.liberator &and; liberator.modules.commandline.onMultilineOutputEvent(event)"/>
</vbox>
<stack orient="horizontal" align="stretch" class="liberator-container" liberator:highlight="CmdLine">
<textbox class="plain" id="liberator-message" flex="1" readonly="true" liberator:highlight="Normal"/>
<hbox id="liberator-commandline" hidden="false" collapsed="true" class="liberator-container" liberator:highlight="Normal">
<label class="plain" id="liberator-commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
<textbox class="plain" id="liberator-commandline-command" flex="1" type="search" timeout="100"
oninput="window.liberator &and; liberator.modules.commandline.onEvent(event);"
onkeyup="window.liberator &and; liberator.modules.commandline.onEvent(event);"
onfocus="window.liberator &and; liberator.modules.commandline.onEvent(event);"
onblur="window.liberator &and; liberator.modules.commandline.onEvent(event);"/>
</hbox>
</stack>
<vbox class="liberator-container" hidden="false" collapsed="false" liberator:highlight="CmdLine">
<textbox id="liberator-multiline-input" class="plain" flex="1" rows="1" hidden="false" collapsed="true" multiline="true" liberator:highlight="Normal"
onkeypress="window.liberator &and; liberator.modules.commandline.onMultilineInputEvent(event);"
oninput="window.liberator &and; liberator.modules.commandline.onMultilineInputEvent(event);"
onblur="window.liberator &and; liberator.modules.commandline.onMultilineInputEvent(event);"/>
</vbox>
</window>
<statusbar id="status-bar" liberator:highlight="StatusLine">
<hbox insertbefore="&liberator.statusBefore;" insertafter="&liberator.statusAfter;"
id="liberator-statusline-field-status" flex="1" hidden="false" align="center">
<textbox class="plain" id="liberator-statusline-field-url" readonly="false" flex="1" crop="end"/>
<label class="plain" id="liberator-statusline-field-inputbuffer" flex="0"/>
<label class="plain" id="liberator-statusline-field-progress" flex="0"/>
<label class="plain" id="liberator-statusline-field-tabcount" flex="0"/>
<label class="plain" id="liberator-statusline-field-bufferposition" flex="0"/>
<label class="plain" id="liberator-statusline-field-zoomlevel" flex="0"/>
</hbox>
<!-- just hide them since other elements expect them -->
<statusbarpanel id="statusbar-display" hidden="true"/>
<statusbarpanel id="statusbar-progresspanel" hidden="true"/>
</statusbar>
</overlay>
<!-- vim: set fdm=marker sw=4 ts=4 et: -->

View File

@@ -113,7 +113,7 @@ const Map = Class("Map", {
if (this.names[0] != ".") // FIXME: Kludge. if (this.names[0] != ".") // FIXME: Kludge.
mappings.repeat = repeat; mappings.repeat = repeat;
return liberator.trapErrors(repeat); return dactyl.trapErrors(repeat);
} }
}); });
@@ -179,7 +179,7 @@ const Mappings = Module("mappings", {
/** @property {Iterator(Map)} @private */ /** @property {Iterator(Map)} @private */
__iterator__: function () this._mappingsIterator([modes.NORMAL], this._main), __iterator__: function () this._mappingsIterator([modes.NORMAL], this._main),
// used by :mkvimperatorrc to save mappings // used by :mkpentadactylrc to save mappings
/** /**
* Returns a user-defined mappings iterator for the specified * Returns a user-defined mappings iterator for the specified
* <b>mode</b>. * <b>mode</b>.
@@ -295,7 +295,7 @@ const Mappings = Module("mappings", {
*/ */
// FIXME: property // FIXME: property
getMapLeader: function () { getMapLeader: function () {
let leaderRef = liberator.variableReference("mapleader"); let leaderRef = dactyl.variableReference("mapleader");
return leaderRef[0] ? leaderRef[0][leaderRef[1]] : "\\"; return leaderRef[0] ? leaderRef[0][leaderRef[1]] : "\\";
}, },
@@ -364,7 +364,7 @@ const Mappings = Module("mappings", {
// TODO: Move this to an ItemList to show this automatically // TODO: Move this to an ItemList to show this automatically
if (list.*.length() == list.text().length()) { if (list.*.length() == list.text().length()) {
liberator.echomsg("No mapping found"); dactyl.echomsg("No mapping found");
return; return;
} }
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE); commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
@@ -460,7 +460,7 @@ const Mappings = Module("mappings", {
} }
} }
if (!found) if (!found)
liberator.echoerr("E31: No such mapping"); dactyl.echoerr("E31: No such mapping");
}, },
{ {
argCount: "1", argCount: "1",

View File

@@ -58,7 +58,7 @@ const Marks = Module("marks", {
return; return;
if (doc.body instanceof HTMLFrameSetElement) { if (doc.body instanceof HTMLFrameSetElement) {
if (!silent) if (!silent)
liberator.echoerr("Marks support for frameset pages not implemented yet"); dactyl.echoerr("Marks support for frameset pages not implemented yet");
return; return;
} }
@@ -69,7 +69,7 @@ const Marks = Module("marks", {
if (Marks.isURLMark(mark)) { if (Marks.isURLMark(mark)) {
this._urlMarks.set(mark, { location: win.location.href, position: position, tab: tabs.getTab() }); this._urlMarks.set(mark, { location: win.location.href, position: position, tab: tabs.getTab() });
if (!silent) if (!silent)
liberator.log("Adding URL mark: " + Marks.markToString(mark, this._urlMarks.get(mark)), 5); dactyl.log("Adding URL mark: " + Marks.markToString(mark, this._urlMarks.get(mark)), 5);
} }
else if (Marks.isLocalMark(mark)) { else if (Marks.isLocalMark(mark)) {
// remove any previous mark of the same name for this location // remove any previous mark of the same name for this location
@@ -79,7 +79,7 @@ const Marks = Module("marks", {
let vals = { location: win.location.href, position: position }; let vals = { location: win.location.href, position: position };
this._localMarks.get(mark).push(vals); this._localMarks.get(mark).push(vals);
if (!silent) if (!silent)
liberator.log("Adding local mark: " + Marks.markToString(mark, vals), 5); dactyl.log("Adding local mark: " + Marks.markToString(mark, vals), 5);
} }
}, },
@@ -125,7 +125,7 @@ const Marks = Module("marks", {
this._pendingJumps.push(slice); this._pendingJumps.push(slice);
// NOTE: this obviously won't work on generated pages using // NOTE: this obviously won't work on generated pages using
// non-unique URLs :( // non-unique URLs :(
liberator.open(slice.location, liberator.NEW_TAB); dactyl.open(slice.location, dactyl.NEW_TAB);
return; return;
} }
let index = tabs.index(slice.tab); let index = tabs.index(slice.tab);
@@ -137,7 +137,7 @@ const Marks = Module("marks", {
win.location.href = slice.location; win.location.href = slice.location;
return; return;
} }
liberator.log("Jumping to URL mark: " + Marks.markToString(mark, slice), 5); dactyl.log("Jumping to URL mark: " + Marks.markToString(mark, slice), 5);
buffer.scrollToPercent(slice.position.x * 100, slice.position.y * 100); buffer.scrollToPercent(slice.position.x * 100, slice.position.y * 100);
ok = true; ok = true;
} }
@@ -149,7 +149,7 @@ const Marks = Module("marks", {
for (let [, lmark] in Iterator(slice)) { for (let [, lmark] in Iterator(slice)) {
if (win.location.href == lmark.location) { if (win.location.href == lmark.location) {
liberator.log("Jumping to local mark: " + Marks.markToString(mark, lmark), 5); dactyl.log("Jumping to local mark: " + Marks.markToString(mark, lmark), 5);
buffer.scrollToPercent(lmark.position.x * 100, lmark.position.y * 100); buffer.scrollToPercent(lmark.position.x * 100, lmark.position.y * 100);
ok = true; ok = true;
break; break;
@@ -158,7 +158,7 @@ const Marks = Module("marks", {
} }
if (!ok) if (!ok)
liberator.echoerr("E20: Mark not set"); dactyl.echoerr("E20: Mark not set");
}, },
/** /**
@@ -169,11 +169,11 @@ const Marks = Module("marks", {
list: function (filter) { list: function (filter) {
let marks = this.all; let marks = this.all;
liberator.assert(marks.length > 0, "No marks set"); dactyl.assert(marks.length > 0, "No marks set");
if (filter.length > 0) { if (filter.length > 0) {
marks = marks.filter(function (mark) filter.indexOf(mark[0]) >= 0); marks = marks.filter(function (mark) filter.indexOf(mark[0]) >= 0);
liberator.assert(marks.length > 0, "E283: No marks matching " + filter.quote()); dactyl.assert(marks.length > 0, "E283: No marks matching " + filter.quote());
} }
let list = template.tabular( let list = template.tabular(
@@ -204,7 +204,7 @@ const Marks = Module("marks", {
let win = window.content; let win = window.content;
for (let [i, ] in Iterator(localmark)) { for (let [i, ] in Iterator(localmark)) {
if (localmark[i].location == win.location.href) { if (localmark[i].location == win.location.href) {
liberator.log("Deleting local mark: " + Marks.markToString(mark, localmark[i]), 5); dactyl.log("Deleting local mark: " + Marks.markToString(mark, localmark[i]), 5);
localmark.splice(i, 1); localmark.splice(i, 1);
if (localmark.length == 0) if (localmark.length == 0)
this._localMarks.remove(mark); this._localMarks.remove(mark);
@@ -217,7 +217,7 @@ const Marks = Module("marks", {
_removeURLMark: function _removeURLMark(mark) { _removeURLMark: function _removeURLMark(mark) {
let urlmark = this._urlMarks.get(mark); let urlmark = this._urlMarks.get(mark);
if (urlmark) { if (urlmark) {
liberator.log("Deleting URL mark: " + Marks.markToString(mark, urlmark), 5); dactyl.log("Deleting URL mark: " + Marks.markToString(mark, urlmark), 5);
this._urlMarks.remove(mark); this._urlMarks.remove(mark);
} }
}, },
@@ -251,7 +251,7 @@ const Marks = Module("marks", {
mappings.add(myModes, mappings.add(myModes,
["m"], "Set mark at the cursor position", ["m"], "Set mark at the cursor position",
function (arg) { function (arg) {
liberator.assert(/^[a-zA-Z]$/.test(arg)); dactyl.assert(/^[a-zA-Z]$/.test(arg));
marks.add(arg); marks.add(arg);
}, },
{ arg: true }); { arg: true });
@@ -270,19 +270,19 @@ const Marks = Module("marks", {
args = args.string; args = args.string;
// assert(special ^ args) // assert(special ^ args)
liberator.assert( special || args, "E471: Argument required"); dactyl.assert( special || args, "E471: Argument required");
liberator.assert(!special || !args, "E474: Invalid argument"); dactyl.assert(!special || !args, "E474: Invalid argument");
let matches = args.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/); let matches = args.match(/(?:(?:^|[^a-zA-Z0-9])-|-(?:$|[^a-zA-Z0-9])|[^a-zA-Z0-9 -]).*/);
// NOTE: this currently differs from Vim's behavior which // NOTE: this currently differs from Vim's behavior which
// deletes any valid marks in the arg list, up to the first // deletes any valid marks in the arg list, up to the first
// invalid arg, as well as giving the error message. // invalid arg, as well as giving the error message.
liberator.assert(!matches, "E475: Invalid argument: " + matches[0]); dactyl.assert(!matches, "E475: Invalid argument: " + matches[0]);
// check for illegal ranges - only allow a-z A-Z 0-9 // check for illegal ranges - only allow a-z A-Z 0-9
if ((matches = args.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g))) { if ((matches = args.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g))) {
for (let match in values(matches)) for (let match in values(matches))
liberator.assert(/[a-z]-[a-z]|[A-Z]-[A-Z]|[0-9]-[0-9]/.test(match) && dactyl.assert(/[a-z]-[a-z]|[A-Z]-[A-Z]|[0-9]-[0-9]/.test(match) &&
match[0] <= match[2], match[0] <= match[2],
"E475: Invalid argument: " + args.match(match + ".*")[0]); "E475: Invalid argument: " + args.match(match + ".*")[0]);
} }
@@ -298,8 +298,8 @@ const Marks = Module("marks", {
"Mark current location within the web page", "Mark current location within the web page",
function (args) { function (args) {
let mark = args[0]; let mark = args[0];
liberator.assert(mark.length <= 1, "E488: Trailing characters"); dactyl.assert(mark.length <= 1, "E488: Trailing characters");
liberator.assert(/[a-zA-Z]/.test(mark), dactyl.assert(/[a-zA-Z]/.test(mark),
"E191: Argument must be a letter or forward/backward quote"); "E191: Argument must be a letter or forward/backward quote");
marks.add(mark); marks.add(mark);
@@ -312,7 +312,7 @@ const Marks = Module("marks", {
args = args.string; args = args.string;
// ignore invalid mark characters unless there are no valid mark chars // ignore invalid mark characters unless there are no valid mark chars
liberator.assert(!args || /[a-zA-Z]/.test(args), dactyl.assert(!args || /[a-zA-Z]/.test(args),
"E283: No marks matching " + args.quote()); "E283: No marks matching " + args.quote());
let filter = args.replace(/[^a-zA-Z]/g, ""); let filter = args.replace(/[^a-zA-Z]/g, "");

View File

@@ -118,7 +118,7 @@ const Modes = Module("modes", {
options.setPref("accessibility.browsewithcaret", false); options.setPref("accessibility.browsewithcaret", false);
statusline.updateUrl(); statusline.updateUrl();
liberator.focusContent(true); dactyl.focusContent(true);
} }
}, },
@@ -191,7 +191,7 @@ const Modes = Module("modes", {
if (this._main != oldMain) if (this._main != oldMain)
this._handleModeChange(oldMain, mainMode, oldExtended); this._handleModeChange(oldMain, mainMode, oldExtended);
} }
liberator.triggerObserver("modeChange", [oldMain, oldExtended], [this._main, this._extended], stack); dactyl.triggerObserver("modeChange", [oldMain, oldExtended], [this._main, this._extended], stack);
if (!silent) if (!silent)
this.show(); this.show();

View File

@@ -100,8 +100,8 @@ window.addEventListener("load", function () {
delete module.INIT[mod]; delete module.INIT[mod];
} }
catch (e) { catch (e) {
if (modules.liberator) if (modules.dactyl)
liberator.reportError(e); dactyl.reportError(e);
} }
} }
for (let mod in keys(module.INIT)) { for (let mod in keys(module.INIT)) {

View File

@@ -104,13 +104,13 @@ const Option = Class("Option", {
let values; let values;
if (liberator.has("tabs") && (scope & Option.SCOPE_LOCAL)) if (dactyl.has("tabs") && (scope & Option.SCOPE_LOCAL))
values = tabs.options[this.name]; values = tabs.options[this.name];
if ((scope & Option.SCOPE_GLOBAL) && (values == undefined)) if ((scope & Option.SCOPE_GLOBAL) && (values == undefined))
values = this.globalValue; values = this.globalValue;
if (this.getter) if (this.getter)
return liberator.trapErrors(this.getter, this, values); return dactyl.trapErrors(this.getter, this, values);
return values; return values;
}, },
@@ -128,11 +128,11 @@ const Option = Class("Option", {
return; return;
if (this.setter) if (this.setter)
newValues = liberator.trapErrors(this.setter, this, newValues); newValues = dactyl.trapErrors(this.setter, this, newValues);
if (newValues === undefined) if (newValues === undefined)
return; return;
if (liberator.has("tabs") && (scope & Option.SCOPE_LOCAL)) if (dactyl.has("tabs") && (scope & Option.SCOPE_LOCAL))
tabs.options[this.name] = newValues; tabs.options[this.name] = newValues;
if ((scope & Option.SCOPE_GLOBAL) && !skipGlobal) if ((scope & Option.SCOPE_GLOBAL) && !skipGlobal)
this.globalValue = newValues; this.globalValue = newValues;
@@ -235,7 +235,7 @@ const Option = Class("Option", {
* @property {string} The option's data type. One of: * @property {string} The option's data type. One of:
* "boolean" - Boolean, e.g., true * "boolean" - Boolean, e.g., true
* "number" - Integer, e.g., 1 * "number" - Integer, e.g., 1
* "string" - String, e.g., "Vimperator" * "string" - String, e.g., "Pentadactyl"
* "charlist" - Character list, e.g., "rb" * "charlist" - Character list, e.g., "rb"
* "regexlist" - Regex list, e.g., "^foo,bar$" * "regexlist" - Regex list, e.g., "^foo,bar$"
* "stringmap" - String map, e.g., "key=v,foo=bar" * "stringmap" - String map, e.g., "key=v,foo=bar"
@@ -499,7 +499,7 @@ const Options = Module("options", {
var popupAllowedEvents = this._loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit"); var popupAllowedEvents = this._loadPreference("dom.popup_allowed_events", "change click dblclick mouseup reset submit");
if (!/keypress/.test(popupAllowedEvents)) { if (!/keypress/.test(popupAllowedEvents)) {
this._storePreference("dom.popup_allowed_events", popupAllowedEvents + " keypress"); this._storePreference("dom.popup_allowed_events", popupAllowedEvents + " keypress");
liberator.registerObserver("shutdown", function () { dactyl.registerObserver("shutdown", function () {
if (this._loadPreference("dom.popup_allowed_events", "") == popupAllowedEvents + " keypress") if (this._loadPreference("dom.popup_allowed_events", "") == popupAllowedEvents + " keypress")
this._storePreference("dom.popup_allowed_events", popupAllowedEvents); this._storePreference("dom.popup_allowed_events", popupAllowedEvents);
}); });
@@ -550,7 +550,7 @@ const Options = Module("options", {
switch (data) { switch (data) {
case "accessibility.browsewithcaret": case "accessibility.browsewithcaret":
let value = options.getPref("accessibility.browsewithcaret", false); let value = options.getPref("accessibility.browsewithcaret", false);
liberator.mode = value ? modes.CARET : modes.NORMAL; dactyl.mode = value ? modes.CARET : modes.NORMAL;
break; break;
} }
} }
@@ -579,7 +579,7 @@ const Options = Module("options", {
if (option.name in this._optionHash) { if (option.name in this._optionHash) {
// never replace for now // never replace for now
liberator.log("Warning: " + names[0].quote() + " already exists, NOT replacing existing option.", 1); dactyl.log("Warning: " + names[0].quote() + " already exists, NOT replacing existing option.", 1);
return false; return false;
} }
@@ -777,7 +777,7 @@ const Options = Module("options", {
* *
* @param {string} name The preference name. * @param {string} name The preference name.
* @param {value} forcedDefault The the default value for this * @param {value} forcedDefault The the default value for this
* preference. Used for internal liberator preferences. * preference. Used for internal dactyl preferences.
*/ */
getPref: function (name, forcedDefault) { getPref: function (name, forcedDefault) {
return this._loadPreference(name, forcedDefault); return this._loadPreference(name, forcedDefault);
@@ -799,7 +799,7 @@ const Options = Module("options", {
let msg = "Warning: setting preference " + name + ", but it's changed from its default value."; let msg = "Warning: setting preference " + name + ", but it's changed from its default value.";
if (message) if (message)
msg += " " + message; msg += " " + message;
liberator.echomsg(msg); dactyl.echomsg(msg);
} }
this._storePreference(name, value); this._storePreference(name, value);
this._storePreference(Options.SAVED + name, value); this._storePreference(Options.SAVED + name, value);
@@ -838,7 +838,7 @@ const Options = Module("options", {
if (services.get("pref").getPrefType(name) == Ci.nsIPrefBranch.PREF_BOOL) if (services.get("pref").getPrefType(name) == Ci.nsIPrefBranch.PREF_BOOL)
this.setPref(name, !this.getPref(name)); this.setPref(name, !this.getPref(name));
else else
liberator.echoerr("E488: Trailing characters: " + name + "!"); dactyl.echoerr("E488: Trailing characters: " + name + "!");
}, },
/** /**
@@ -897,26 +897,26 @@ const Options = Module("options", {
services.get("pref").setComplexValue(name, Ci.nsISupportsString, supportString); services.get("pref").setComplexValue(name, Ci.nsISupportsString, supportString);
} }
else if (type == Ci.nsIPrefBranch.PREF_INT) else if (type == Ci.nsIPrefBranch.PREF_INT)
liberator.echoerr("E521: Number required after =: " + name + "=" + value); dactyl.echoerr("E521: Number required after =: " + name + "=" + value);
else else
liberator.echoerr("E474: Invalid argument: " + name + "=" + value); dactyl.echoerr("E474: Invalid argument: " + name + "=" + value);
break; break;
case "number": case "number":
if (type == Ci.nsIPrefBranch.PREF_INVALID || type == Ci.nsIPrefBranch.PREF_INT) if (type == Ci.nsIPrefBranch.PREF_INVALID || type == Ci.nsIPrefBranch.PREF_INT)
services.get("pref").setIntPref(name, value); services.get("pref").setIntPref(name, value);
else else
liberator.echoerr("E474: Invalid argument: " + name + "=" + value); dactyl.echoerr("E474: Invalid argument: " + name + "=" + value);
break; break;
case "boolean": case "boolean":
if (type == Ci.nsIPrefBranch.PREF_INVALID || type == Ci.nsIPrefBranch.PREF_BOOL) if (type == Ci.nsIPrefBranch.PREF_INVALID || type == Ci.nsIPrefBranch.PREF_BOOL)
services.get("pref").setBoolPref(name, value); services.get("pref").setBoolPref(name, value);
else if (type == Ci.nsIPrefBranch.PREF_INT) else if (type == Ci.nsIPrefBranch.PREF_INT)
liberator.echoerr("E521: Number required after =: " + name + "=" + value); dactyl.echoerr("E521: Number required after =: " + name + "=" + value);
else else
liberator.echoerr("E474: Invalid argument: " + name + "=" + value); dactyl.echoerr("E474: Invalid argument: " + name + "=" + value);
break; break;
default: default:
liberator.echoerr("Unknown preference type: " + typeof value + " (" + name + "=" + value + ")"); dactyl.echoerr("Unknown preference type: " + typeof value + " (" + name + "=" + value + ")");
} }
}, },
@@ -949,8 +949,8 @@ const Options = Module("options", {
} }
} }
}, { }, {
SAVED: "extensions.liberator.saved.", SAVED: "extensions.dactyl.saved.",
OLD_SAVED: "liberator.saved." OLD_SAVED: "dactyl.saved."
}, { }, {
commandline: function () { commandline: function () {
// TODO: maybe reset in .destroy()? // TODO: maybe reset in .destroy()?
@@ -1020,10 +1020,10 @@ const Options = Module("options", {
} }
let opt = options.parseOpt(arg, modifiers); let opt = options.parseOpt(arg, modifiers);
liberator.assert(opt, "Error parsing :set command: " + arg); dactyl.assert(opt, "Error parsing :set command: " + arg);
let option = opt.option; let option = opt.option;
liberator.assert(option != null || opt.all, dactyl.assert(option != null || opt.all,
"E518: Unknown option: " + opt.name); "E518: Unknown option: " + opt.name);
// reset a variable to its default value // reset a variable to its default value
@@ -1051,7 +1051,7 @@ const Options = Module("options", {
msg += "\n Last set from " + option.setFrom.path; msg += "\n Last set from " + option.setFrom.path;
// FIXME: Message highlight group wrapping messes up the indent up for multi-arg verbose :set queries // FIXME: Message highlight group wrapping messes up the indent up for multi-arg verbose :set queries
liberator.echo(<span highlight="CmdOutput">{msg}</span>); dactyl.echo(<span highlight="CmdOutput">{msg}</span>);
} }
} }
// write access // write access
@@ -1059,7 +1059,7 @@ const Options = Module("options", {
option.setFrom = modifiers.setFrom || null; option.setFrom = modifiers.setFrom || null;
if (opt.option.type == "boolean") { if (opt.option.type == "boolean") {
liberator.assert(!opt.valueGiven, "E474: Invalid argument: " + arg); dactyl.assert(!opt.valueGiven, "E474: Invalid argument: " + arg);
opt.values = !opt.unsetBoolean; opt.values = !opt.unsetBoolean;
} }
try { try {
@@ -1069,7 +1069,7 @@ const Options = Module("options", {
res = e; res = e;
} }
if (res) if (res)
liberator.echoerr(res); dactyl.echoerr(res);
} }
} }
} }
@@ -1138,7 +1138,7 @@ const Options = Module("options", {
let str = let str =
<table> <table>
{ {
template.map(liberator.globalVariables, function ([i, value]) { template.map(dactyl.globalVariables, function ([i, value]) {
let prefix = typeof value == "number" ? "#" : let prefix = typeof value == "number" ? "#" :
typeof value == "function" ? "*" : typeof value == "function" ? "*" :
" "; " ";
@@ -1150,9 +1150,9 @@ const Options = Module("options", {
} }
</table>; </table>;
if (str.*.length()) if (str.*.length())
liberator.echo(str, commandline.FORCE_MULTILINE); dactyl.echo(str, commandline.FORCE_MULTILINE);
else else
liberator.echomsg("No variables found"); dactyl.echomsg("No variables found");
return; return;
} }
@@ -1161,16 +1161,16 @@ const Options = Module("options", {
if (matches) { if (matches) {
let [, type, name, stuff, expr] = matches; let [, type, name, stuff, expr] = matches;
if (!type) { if (!type) {
let reference = liberator.variableReference(name); let reference = dactyl.variableReference(name);
liberator.assert(reference[0] || !stuff, dactyl.assert(reference[0] || !stuff,
"E121: Undefined variable: " + name); "E121: Undefined variable: " + name);
expr = liberator.evalExpression(expr); expr = dactyl.evalExpression(expr);
liberator.assert(expr !== undefined, "E15: Invalid expression: " + expr); dactyl.assert(expr !== undefined, "E15: Invalid expression: " + expr);
if (!reference[0]) { if (!reference[0]) {
if (reference[2] == "g") if (reference[2] == "g")
reference[0] = liberator.globalVariables; reference[0] = dactyl.globalVariables;
else else
return; // for now return; // for now
} }
@@ -1190,14 +1190,14 @@ const Options = Module("options", {
} }
// 1 - name // 1 - name
else if ((matches = args.match(/^\s*([\w:]+)\s*$/))) { else if ((matches = args.match(/^\s*([\w:]+)\s*$/))) {
let reference = liberator.variableReference(matches[1]); let reference = dactyl.variableReference(matches[1]);
liberator.assert(reference[0], "E121: Undefined variable: " + matches[1]); dactyl.assert(reference[0], "E121: Undefined variable: " + matches[1]);
let value = reference[0][reference[1]]; let value = reference[0][reference[1]];
let prefix = typeof value == "number" ? "#" : let prefix = typeof value == "number" ? "#" :
typeof value == "function" ? "*" : typeof value == "function" ? "*" :
" "; " ";
liberator.echo(reference[1] + "\t\t" + prefix + value); dactyl.echo(reference[1] + "\t\t" + prefix + value);
} }
}, },
{ {
@@ -1260,10 +1260,10 @@ const Options = Module("options", {
"Delete a variable", "Delete a variable",
function (args) { function (args) {
for (let [, name] in args) { for (let [, name] in args) {
let reference = liberator.variableReference(name); let reference = dactyl.variableReference(name);
if (!reference[0]) { if (!reference[0]) {
if (!args.bang) if (!args.bang)
liberator.echoerr("E108: No such variable: " + name); dactyl.echoerr("E108: No such variable: " + name);
return; return;
} }

View File

@@ -4,7 +4,7 @@
<script type="application/javascript;version=1.8"> <script type="application/javascript;version=1.8">
let uri = Components.classes["@mozilla.org/network/io-service;1"] let uri = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService) .getService(Components.interfaces.nsIIOService)
.newURI("liberator://help/options", null, null); .newURI("dactyl://help/options", null, null);
Application.activeWindow.open(uri).focus(); // TODO: generalise for Muttator et al. Application.activeWindow.open(uri).focus(); // TODO: generalise for Muttator et al.
window.close(); window.close();
</script> </script>

View File

@@ -28,7 +28,7 @@ const QuickMarks = Module("quickmarks", {
*/ */
add: function add(qmark, location) { add: function add(qmark, location) {
this._qmarks.set(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 {string} qmark The quickmark to open.
* @param {number} where A constant describing where to open the page. * @param {number} where A constant describing where to open the page.
* See {@link Liberator#open}. * See {@link Dactyl#open}.
*/ */
jumpTo: function jumpTo(qmark, where) { jumpTo: function jumpTo(qmark, where) {
let url = this._qmarks.get(qmark); let url = this._qmarks.get(qmark);
if (url) if (url)
liberator.open(url, where); dactyl.open(url, where);
else 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); 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) { if (filter.length > 0) {
marks = marks.filter(function (qmark) filter.indexOf(qmark) >= 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))]; let items = [[mark, this._qmarks.get(mark)] for ([k, mark] in Iterator(marks))];
@@ -103,8 +103,8 @@ const QuickMarks = Module("quickmarks", {
function (args) { function (args) {
// TODO: finish arg parsing - we really need a proper way to do this. :) // TODO: finish arg parsing - we really need a proper way to do this. :)
// assert(args.bang ^ args.string) // assert(args.bang ^ args.string)
liberator.assert( args.bang || args.string, "E471: Argument required"); dactyl.assert( args.bang || args.string, "E471: Argument required");
liberator.assert(!args.bang || !args.string, "E474: Invalid argument"); dactyl.assert(!args.bang || !args.string, "E474: Invalid argument");
if (args.bang) if (args.bang)
quickmarks.removeAll(); quickmarks.removeAll();
@@ -124,7 +124,7 @@ const QuickMarks = Module("quickmarks", {
function (args) { function (args) {
let matches = args.string.match(/^([a-zA-Z0-9])(?:\s+(.+))?$/); let matches = args.string.match(/^([a-zA-Z0-9])(?:\s+(.+))?$/);
if (!matches) if (!matches)
liberator.echoerr("E488: Trailing characters"); dactyl.echoerr("E488: Trailing characters");
else if (!matches[2]) else if (!matches[2])
quickmarks.add(matches[1], buffer.URL); quickmarks.add(matches[1], buffer.URL);
else else
@@ -138,7 +138,7 @@ const QuickMarks = Module("quickmarks", {
args = args.string; args = args.string;
// ignore invalid qmark characters unless there are no valid qmark chars // 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, ""); let filter = args.replace(/[^a-zA-Z0-9]/g, "");
quickmarks.list(filter); quickmarks.list(filter);
@@ -149,7 +149,7 @@ const QuickMarks = Module("quickmarks", {
mappings.add(myModes, mappings.add(myModes,
["go"], "Jump to a QuickMark", ["go"], "Jump to a QuickMark",
function (arg) { quickmarks.jumpTo(arg, liberator.CURRENT_TAB); }, function (arg) { quickmarks.jumpTo(arg, dactyl.CURRENT_TAB); },
{ arg: true }); { arg: true });
mappings.add(myModes, mappings.add(myModes,
@@ -157,14 +157,14 @@ const QuickMarks = Module("quickmarks", {
function (arg) { function (arg) {
quickmarks.jumpTo(arg, quickmarks.jumpTo(arg,
/\bquickmark\b/.test(options["activate"]) ? /\bquickmark\b/.test(options["activate"]) ?
liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB); dactyl.NEW_TAB : dactyl.NEW_BACKGROUND_TAB);
}, },
{ arg: true }); { arg: true });
mappings.add(myModes, mappings.add(myModes,
["M"], "Add new QuickMark for current URL", ["M"], "Add new QuickMark for current URL",
function (arg) { function (arg) {
liberator.assert(/^[a-zA-Z0-9]$/.test(arg)); dactyl.assert(/^[a-zA-Z0-9]$/.test(arg));
quickmarks.add(arg, buffer.URL); quickmarks.add(arg, buffer.URL);
}, },
{ arg: true }); { arg: true });

View File

@@ -7,7 +7,7 @@
// TODO: // TODO:
// - fix Sanitize autocommand // - fix Sanitize autocommand
// - add warning for TIMESPAN_EVERYTHING? // - 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'? // - add support for :set sanitizeitems=all like 'eventignore'?
// - integrate with the Clear Private Data dialog? // - 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 // - finish 1.9.0 support if we're going to support sanitizing in Xulmus
const Sanitizer = Module("sanitizer", { const Sanitizer = Module("sanitizer", {
requires: ["liberator"], requires: ["dactyl"],
init: function () { init: function () {
const self = this; const self = this;
liberator.loadScript("chrome://browser/content/sanitize.js", Sanitizer); dactyl.loadScript("chrome://browser/content/sanitize.js", Sanitizer);
Sanitizer.getClearRange = Sanitizer.Sanitizer.getClearRange; Sanitizer.getClearRange = Sanitizer.Sanitizer.getClearRange;
this.__proto__.__proto__ = new Sanitizer.Sanitizer; // Good enough. this.__proto__.__proto__ = new Sanitizer.Sanitizer; // Good enough.
@@ -29,7 +29,7 @@ const Sanitizer = Module("sanitizer", {
else else
self.prefDomain = "privacy.item."; 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 // Largely ripped from from browser/base/content/sanitize.js so we can override
@@ -60,7 +60,7 @@ const Sanitizer = Module("sanitizer", {
item.range = range; item.range = range;
if ("clear" in item && item.canClear && prefSet(itemName)) { 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) // Some of these clear() may raise exceptions (see bug #265028)
// to sanitize as much as possible, we catch and store them, // to sanitize as much as possible, we catch and store them,
// rather than fail fast. // rather than fail fast.
@@ -97,7 +97,7 @@ const Sanitizer = Module("sanitizer", {
commands.add(["sa[nitize]"], commands.add(["sa[nitize]"],
"Clear private data", "Clear private data",
function (args) { 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"]; let timespan = args["-timespan"] || options["sanitizetimespan"];
@@ -105,22 +105,22 @@ const Sanitizer = Module("sanitizer", {
sanitizer.ignoreTimespan = !sanitizer.range; sanitizer.ignoreTimespan = !sanitizer.range;
if (args.bang) { 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(); let errors = sanitizer.sanitize();
if (errors) { if (errors) {
for (let item in errors) for (let item in errors)
liberator.echoerr("Error sanitizing " + item + ": " + errors[item]); dactyl.echoerr("Error sanitizing " + item + ": " + errors[item]);
} }
} }
else { 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))) { for (let [, item] in Iterator(args.map(Sanitizer.argToPref))) {
liberator.log("Sanitizing " + item + " items..."); dactyl.log("Sanitizing " + item + " items...");
if (sanitizer.canClearItem(item)) { if (sanitizer.canClearItem(item)) {
try { try {
@@ -128,11 +128,11 @@ const Sanitizer = Module("sanitizer", {
sanitizer.clearItem(item); sanitizer.clearItem(item);
} }
catch (e) { catch (e) {
liberator.echoerr("Error sanitizing " + item + ": " + e); dactyl.echoerr("Error sanitizing " + item + ": " + e);
} }
} }
else else
liberator.echomsg("Cannot sanitize " + item); dactyl.echomsg("Cannot sanitize " + item);
} }
} }
}, },
@@ -154,7 +154,7 @@ const Sanitizer = Module("sanitizer", {
options: function () { options: function () {
const self = this; const self = this;
// add liberator-specific private items // add dactyl-specific private items
[ [
{ {
name: "commandLine", name: "commandLine",

View File

@@ -22,7 +22,7 @@ const Services = Module("services", {
this.add("browserSearch", "@mozilla.org/browser/search-service;1", Ci.nsIBrowserSearchService); this.add("browserSearch", "@mozilla.org/browser/search-service;1", Ci.nsIBrowserSearchService);
this.add("cache", "@mozilla.org/network/cache-service;1", Ci.nsICacheService); this.add("cache", "@mozilla.org/network/cache-service;1", Ci.nsICacheService);
this.add("console", "@mozilla.org/consoleservice;1", Ci.nsIConsoleService); 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("debugger", "@mozilla.org/js/jsd/debugger-service;1", Ci.jsdIDebuggerService);
this.add("directory", "@mozilla.org/file/directory_service;1", Ci.nsIProperties); this.add("directory", "@mozilla.org/file/directory_service;1", Ci.nsIProperties);
this.add("downloadManager", "@mozilla.org/download-manager;1", Ci.nsIDownloadManager); this.add("downloadManager", "@mozilla.org/download-manager;1", Ci.nsIDownloadManager);
@@ -64,7 +64,7 @@ const Services = Module("services", {
return res; return res;
} }
catch (e) { 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"); dump("Service creation failed for '" + classes + "': " + e + "\n");
return null; return null;
} }

View File

@@ -15,7 +15,7 @@ const StatusLine = Module("statusline", {
// our status bar fields // our status bar fields
this.widgets = dict(["status", "url", "inputbuffer", "progress", "tabcount", "bufferposition", "zoomlevel"].map( 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]"; url = "[No Name]";
} }
else { else {
url = url.replace(RegExp("^liberator://help/(\\S+)#(.*)"), function (m, n1, n2) n1 + " " + decodeURIComponent(n2) + " [Help]") url = url.replace(RegExp("^dactyl://help/(\\S+)#(.*)"), function (m, n1, n2) n1 + " " + decodeURIComponent(n2) + " [Help]")
.replace(RegExp("^liberator://help/(\\S+)"), "$1 [Help]"); .replace(RegExp("^dactyl://help/(\\S+)"), "$1 [Help]");
} }
// when session information is available, add [+] when we can go // when session information is available, add [+] when we can go
@@ -180,7 +180,7 @@ const StatusLine = Module("statusline", {
* the tab state is fully updated. * the tab state is fully updated.
*/ */
updateTabCount: function updateTabCount(delayed) { updateTabCount: function updateTabCount(delayed) {
if (liberator.has("tabs")) { if (dactyl.has("tabs")) {
if (delayed) { if (delayed) {
this.setTimeout(function () this.updateTabCount(false), 0); this.setTimeout(function () this.updateTabCount(false), 0);
return; return;
@@ -257,7 +257,7 @@ const StatusLine = Module("statusline", {
if (value == 0) if (value == 0)
document.getElementById("status-bar").collapsed = true; document.getElementById("status-bar").collapsed = true;
else if (value == 1) 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 else
document.getElementById("status-bar").collapsed = false; document.getElementById("status-bar").collapsed = false;

View File

@@ -128,13 +128,13 @@ Highlights.prototype.CSS = <![CDATA[
HelpOptionalArg color: #6A97D4; HelpOptionalArg color: #6A97D4;
HelpBody display: block; margin: 1em auto; max-width: 100ex; HelpBody display: block; margin: 1em auto; max-width: 100ex;
HelpBorder,*,liberator://help/* border-color: silver; border-width: 0px; border-style: solid; HelpBorder,*,dactyl://help/* border-color: silver; border-width: 0px; border-style: solid;
HelpCode display: block; white-space: pre; margin-left: 2em; font-family: Terminus, Fixed, monospace; HelpCode display: block; white-space: pre; margin-left: 2em; font-family: Terminus, Fixed, monospace;
HelpDefault margin-right: 1ex; white-space: pre; HelpDefault margin-right: 1ex; white-space: pre;
HelpDescription display: block; HelpDescription display: block;
HelpEm,html|em,liberator://help/* font-weight: bold; font-style: normal; HelpEm,html|em,dactyl://help/* font-weight: bold; font-style: normal;
HelpEx display: inline-block; color: #527BBD; font-weight: bold; HelpEx display: inline-block; color: #527BBD; font-weight: bold;
@@ -149,19 +149,19 @@ Highlights.prototype.CSS = <![CDATA[
HelpKey color: #102663; HelpKey color: #102663;
HelpLink,html|a,liberator://help/* text-decoration: none; HelpLink,html|a,dactyl://help/* text-decoration: none;
HelpLink[href]:hover text-decoration: underline; HelpLink[href]:hover text-decoration: underline;
HelpList,html|ul,liberator://help/* display: block; list-style: outside disc; HelpList,html|ul,dactyl://help/* display: block; list-style: outside disc;
HelpOrderedList,html|ol,liberator://help/* display: block; list-style: outside decimal; HelpOrderedList,html|ol,dactyl://help/* display: block; list-style: outside decimal;
HelpListItem,html|li,liberator://help/* display: list-item; HelpListItem,html|li,dactyl://help/* display: list-item;
HelpNote color: red; font-weight: bold; HelpNote color: red; font-weight: bold;
HelpOpt color: #106326; HelpOpt color: #106326;
HelpOptInfo display: inline-block; margin-bottom: 1ex; HelpOptInfo display: inline-block; margin-bottom: 1ex;
HelpParagraph,html|p,liberator://help/* display: block; margin: 1em 0em; HelpParagraph,html|p,dactyl://help/* display: block; margin: 1em 0em;
HelpParagraph:first-child margin-top: 0; HelpParagraph:first-child margin-top: 0;
HelpSpec display: block; margin-left: -10em; float: left; clear: left; color: #527BBD; HelpSpec display: block; margin-left: -10em; float: left; clear: left; color: #527BBD;
@@ -171,7 +171,7 @@ Highlights.prototype.CSS = <![CDATA[
HelpString[delim]::before content: attr(delim); HelpString[delim]::before content: attr(delim);
HelpString[delim]::after content: attr(delim); HelpString[delim]::after content: attr(delim);
HelpHead,html|h1,liberator://help/* { HelpHead,html|h1,dactyl://help/* {
display: block; display: block;
margin: 1em 0; margin: 1em 0;
padding-bottom: .2ex; padding-bottom: .2ex;
@@ -181,7 +181,7 @@ Highlights.prototype.CSS = <![CDATA[
color: #527BBD; color: #527BBD;
clear: both; clear: both;
} }
HelpSubhead,html|h2,liberator://help/* { HelpSubhead,html|h2,dactyl://help/* {
display: block; display: block;
margin: 1em 0; margin: 1em 0;
padding-bottom: .2ex; padding-bottom: .2ex;
@@ -191,7 +191,7 @@ Highlights.prototype.CSS = <![CDATA[
color: #527BBD; color: #527BBD;
clear: both; clear: both;
} }
HelpSubsubhead,html|h3,liberator://help/* { HelpSubsubhead,html|h3,dactyl://help/* {
display: block; display: block;
margin: 1em 0; margin: 1em 0;
padding-bottom: .2ex; padding-bottom: .2ex;
@@ -204,12 +204,12 @@ Highlights.prototype.CSS = <![CDATA[
HelpTOC HelpTOC
HelpTOC>ol ol margin-left: -1em; HelpTOC>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; 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,liberator://help/* display: table-column; HelpTabColumn,html|column,dactyl://help/* display: table-column;
HelpTabColumn:first-child width: 25%; HelpTabColumn:first-child width: 25%;
HelpTabTitle,html|dt,liberator://help/* display: table-cell; padding: .1ex 1ex; font-weight: bold; HelpTabTitle,html|dt,dactyl://help/* display: table-cell; padding: .1ex 1ex; font-weight: bold;
HelpTabDescription,html|dd,liberator://help/* display: table-cell; padding: .1ex 1ex; border-width: 0px; HelpTabDescription,html|dd,dactyl://help/* display: table-cell; padding: .1ex 1ex; border-width: 0px;
HelpTabRow,html|dl>html|tr,liberator://help/* display: table-row; 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; HelpTag display: inline-block; color: #527BBD; margin-left: 1ex; font-size: 8pt; font-weight: bold;
HelpTags display: block; float: right; clear: right; HelpTags display: block; float: right; clear: right;
@@ -242,8 +242,8 @@ function Highlights(name, store) {
const Highlight = Struct("class", "selector", "filter", "default", "value", "base"); const Highlight = Struct("class", "selector", "filter", "default", "value", "base");
Highlight.defaultValue("filter", function () Highlight.defaultValue("filter", function ()
this.base ? this.base.filter : this.base ? this.base.filter :
["chrome://liberator/*", ["chrome://dactyl/*",
"liberator:*", "dactyl:*",
"file://*"].concat(config.styleableChrome).join(",")); "file://*"].concat(config.styleableChrome).join(","));
Highlight.defaultValue("selector", function () self.selector(this.class)); Highlight.defaultValue("selector", function () self.selector(this.class));
Highlight.defaultValue("value", function () this.default); Highlight.defaultValue("value", function () this.default);
@@ -302,7 +302,7 @@ function Highlights(name, store) {
*/ */
this.selector = function (class_) { this.selector = function (class_) {
let [, hl, rest] = class_.match(/^(\w*)(.*)/); let [, hl, rest] = class_.match(/^(\w*)(.*)/);
let pattern = "[liberator|highlight~=" + hl + "]" let pattern = "[dactyl|highlight~=" + hl + "]"
if (highlight[hl] && highlight[hl].class != class_) if (highlight[hl] && highlight[hl].class != class_)
pattern = highlight[hl].selector; pattern = highlight[hl].selector;
return pattern + rest; return pattern + rest;
@@ -351,18 +351,18 @@ function Highlights(name, store) {
* @author Kris Maglione <maglione.k@gmail.com> * @author Kris Maglione <maglione.k@gmail.com>
*/ */
function Styles(name, store) { 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 // they're members of the window object, which disappear
// with this window. // with this window.
const self = this; const self = this;
const util = modules.util; const util = modules.util;
const sleep = liberator.sleep; const sleep = dactyl.sleep;
const storage = modules.storage; const storage = modules.storage;
const ios = services.get("io"); const ios = services.get("io");
const sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); const sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
const namespace = "@namespace html " + XHTML.uri.quote() + ";\n" + const namespace = "@namespace html " + XHTML.uri.quote() + ";\n" +
"@namespace xul " + XUL.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"); const Sheet = Struct("name", "id", "sites", "css", "system", "agent");
Sheet.prototype.__defineGetter__("fullCSS", function wrapCSS() { Sheet.prototype.__defineGetter__("fullCSS", function wrapCSS() {
@@ -375,7 +375,7 @@ function Styles(name, store) {
: "domain") : "domain")
+ '("' + part.replace(/"/g, "%22").replace(/[*]$/, "") + '")') + '("' + part.replace(/"/g, "%22").replace(/[*]$/, "") + '")')
.join(", "); .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.__defineGetter__("enabled", function () this._enabled);
Sheet.prototype.__defineSetter__("enabled", function (on) { Sheet.prototype.__defineSetter__("enabled", function (on) {
@@ -411,7 +411,7 @@ function Styles(name, store) {
* *
* @param {boolean} system Declares whether this is a system or * @param {boolean} system Declares whether this is a system or
* user sheet. System sheets are used internally by * user sheet. System sheets are used internally by
* @liberator. * @dactyl.
* @param {string} name The name given to the style sheet by * @param {string} name The name given to the style sheet by
* which it may be later referenced. * which it may be later referenced.
* @param {string} filter The sites to which this sheet will * @param {string} filter The sites to which this sheet will
@@ -561,7 +561,7 @@ function Styles(name, store) {
} }
Module("styles", { Module("styles", {
requires: ["config", "liberator", "storage", "util"], requires: ["config", "dactyl", "storage", "util"],
init: function () { init: function () {
let (array = util.Array) { let (array = util.Array) {
@@ -622,7 +622,7 @@ Module("styles", {
} }
let err = styles.addSheet(false, name, filter, css); let err = styles.addSheet(false, name, filter, css);
if (err) if (err)
liberator.echoerr(err); dactyl.echoerr(err);
} }
}, },
{ {
@@ -733,7 +733,7 @@ Module("highlight", {
if (scheme == "default") if (scheme == "default")
highlight.clear(); highlight.clear();
else else
liberator.assert(io.sourceFromRuntimePath(["colors/" + scheme + ".vimp"]), dactyl.assert(io.sourceFromRuntimePath(["colors/" + scheme + ".vimp"]),
"E185: Cannot find color scheme " + scheme); "E185: Cannot find color scheme " + scheme);
autocommands.trigger("ColorScheme", { name: scheme }); autocommands.trigger("ColorScheme", { name: scheme });
}, },
@@ -759,7 +759,7 @@ Module("highlight", {
args.shift(); args.shift();
let [key, css] = args; let [key, css] = args;
liberator.assert(!(clear && css), "E488: Trailing characters"); dactyl.assert(!(clear && css), "E488: Trailing characters");
if (!css && !clear) { if (!css && !clear) {
// List matching keys // List matching keys
@@ -779,7 +779,7 @@ Module("highlight", {
else { else {
let error = highlight.set(key, css, clear, "-append" in args); let error = highlight.set(key, css, clear, "-append" in args);
if (error) if (error)
liberator.echoerr(error); dactyl.echoerr(error);
} }
}, },
{ {

View File

@@ -40,7 +40,7 @@ const Tabs = Module("tabs", {
statusline.updateTabCount(true); statusline.updateTabCount(true);
this.updateSelectionHistory(); this.updateSelectionHistory();
if (options["focuscontent"]) 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")), get tabsBound() Boolean(styles.get(true, "tab-binding")),
set tabsBound(val) { set tabsBound(val) {
let fragment = liberator.has("MacUnix") ? "tab-mac" : "tab"; let fragment = dactyl.has("MacUnix") ? "tab-mac" : "tab";
if (!val) if (!val)
styles.removeSheet(true, "tab-binding"); styles.removeSheet(true, "tab-binding");
else if (!this.tabsBound) else if (!this.tabsBound)
styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul", 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? // 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; }"); ".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 // useful for autocommands, and they get index arguments. --Kris
getLocalStore: function (tabIndex) { getLocalStore: function (tabIndex) {
let tab = this.getTab(tabIndex); let tab = this.getTab(tabIndex);
if (!tab.liberatorStore) if (!tab.dactylStore)
tab.liberatorStore = {}; tab.dactylStore = {};
return tab.liberatorStore; return tab.dactylStore;
}, },
/** /**
@@ -230,29 +230,29 @@ const Tabs = Module("tabs", {
else { else {
if (buffer.URL != "about:blank" || if (buffer.URL != "about:blank" ||
window.getWebNavigation().sessionHistory.count > 0) { 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); config.tabbrowser.removeTab(tab);
} }
else else
liberator.beep(); dactyl.beep();
} }
}, },
Thunderbird: function (tab) { Thunderbird: function (tab) {
if (config.tabbrowser.mTabs.length > 1) if (config.tabbrowser.mTabs.length > 1)
config.tabbrowser.removeTab(tab); config.tabbrowser.removeTab(tab);
else else
liberator.beep(); dactyl.beep();
}, },
Songbird: function (tab) { Songbird: function (tab) {
if (config.tabbrowser.mTabs.length > 1) if (config.tabbrowser.mTabs.length > 1)
config.tabbrowser.removeTab(tab); config.tabbrowser.removeTab(tab);
else { else {
if (buffer.URL != "about:blank" || window.getWebNavigation().sessionHistory.count > 0) { 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); config.tabbrowser.removeTab(tab);
} }
else else
liberator.beep(); dactyl.beep();
} }
} }
}[config.hostApplication] || function () {}; }[config.hostApplication] || function () {};
@@ -261,10 +261,10 @@ const Tabs = Module("tabs", {
count = 1; count = 1;
if (quitOnLastTab >= 1 && config.tabbrowser.mTabs.length <= count) { if (quitOnLastTab >= 1 && config.tabbrowser.mTabs.length <= count) {
if (liberator.windows.length > 1) if (dactyl.windows.length > 1)
window.close(); window.close();
else else
liberator.quit(quitOnLastTab == 2); dactyl.quit(quitOnLastTab == 2);
return; return;
} }
@@ -310,7 +310,7 @@ const Tabs = Module("tabs", {
let index = Tabs.indexFromSpec(spec, wrap); let index = Tabs.indexFromSpec(spec, wrap);
// FIXME: // FIXME:
if (index == -1) if (index == -1)
liberator.beep(); dactyl.beep();
else else
config.tabbrowser.mTabContainer.selectedIndex = index; config.tabbrowser.mTabContainer.selectedIndex = index;
}, },
@@ -435,9 +435,9 @@ const Tabs = Module("tabs", {
matches.push(index); matches.push(index);
} }
if (matches.length == 0) 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) 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 { else {
if (reverse) { if (reverse) {
index = matches.length - count; index = matches.length - count;
@@ -485,7 +485,7 @@ const Tabs = Module("tabs", {
* Selects the alternate tab. * Selects the alternate tab.
*/ */
selectAlternateTab: function () { selectAlternateTab: function () {
liberator.assert(tabs.alternate != null && tabs.getTab() != tabs.alternate, dactyl.assert(tabs.alternate != null && tabs.getTab() != tabs.alternate,
"E23: No alternate page"); "E23: No alternate page");
// NOTE: this currently relies on v.tabs.index() returning the // 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 // TODO: since a tab close is more like a bdelete for us we
// should probably reopen the closed tab when a 'deleted' // should probably reopen the closed tab when a 'deleted'
// alternate is selected // 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); tabs.select(index);
}, },
@@ -599,9 +599,9 @@ const Tabs = Module("tabs", {
} }
if (removed > 0) if (removed > 0)
liberator.echomsg(removed + " fewer tab(s)", 9); dactyl.echomsg(removed + " fewer tab(s)", 9);
else else
liberator.echoerr("E94: No matching tab for " + arg); dactyl.echoerr("E94: No matching tab for " + arg);
} }
else // just remove the current tab else // just remove the current tab
tabs.remove(tabs.getTab(), Math.max(count, 1), special, 0); tabs.remove(tabs.getTab(), Math.max(count, 1), special, 0);
@@ -619,7 +619,7 @@ const Tabs = Module("tabs", {
let alternate = tabs.alternate; let alternate = tabs.alternate;
try { try {
liberator.execute(args[0], null, true); dactyl.execute(args[0], null, true);
} }
finally { finally {
tabs.updateSelectionHistory([tabs.getTab(), alternate]); tabs.updateSelectionHistory([tabs.getTab(), alternate]);
@@ -634,9 +634,9 @@ const Tabs = Module("tabs", {
commands.add(["tab"], commands.add(["tab"],
"Execute a command and tell it to output in a new tab", "Execute a command and tell it to output in a new tab",
function (args) { function (args) {
liberator.forceNewTab = true; dactyl.forceNewTab = true;
liberator.execute(args.string, null, true); dactyl.execute(args.string, null, true);
liberator.forceNewTab = false; dactyl.forceNewTab = false;
}, { }, {
argCount: "+", argCount: "+",
completer: function (context) completion.ex(context), completer: function (context) completion.ex(context),
@@ -648,7 +648,7 @@ const Tabs = Module("tabs", {
function (args) { function (args) {
for (let i = 0; i < tabs.count; i++) { for (let i = 0; i < tabs.count; i++) {
tabs.select(i); tabs.select(i);
liberator.execute(args.string, null, true); dactyl.execute(args.string, null, true);
} }
}, { }, {
argCount: "1", argCount: "1",
@@ -673,7 +673,7 @@ const Tabs = Module("tabs", {
if (/^\d+$/.test(arg)) if (/^\d+$/.test(arg))
tabs.select("-" + arg, true); tabs.select("-" + arg, true);
else else
liberator.echoerr("E488: Trailing characters"); dactyl.echoerr("E488: Trailing characters");
} }
else if (count > 0) else if (count > 0)
tabs.select("-" + count, true); tabs.select("-" + count, true);
@@ -696,7 +696,7 @@ const Tabs = Module("tabs", {
// count is ignored if an arg is specified, as per Vim // count is ignored if an arg is specified, as per Vim
if (arg) { if (arg) {
liberator.assert(/^\d+$/.test(arg), "E488: Trailing characters"); dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters");
index = arg - 1; index = arg - 1;
} }
else else
@@ -705,7 +705,7 @@ const Tabs = Module("tabs", {
if (index < tabs.count) if (index < tabs.count)
tabs.select(index, true); tabs.select(index, true);
else else
liberator.beep(); dactyl.beep();
} }
else else
tabs.select("+1", true); tabs.select("+1", true);
@@ -731,7 +731,7 @@ const Tabs = Module("tabs", {
// if a numeric arg is specified any count is ignored; if a // if a numeric arg is specified any count is ignored; if a
// count and non-numeric arg are both specified then E488 // count and non-numeric arg are both specified then E488
if (arg && count > 0) { if (arg && count > 0) {
liberator.assert(/^\d+$/.test(arg), "E488: Trailing characters"); dactyl.assert(/^\d+$/.test(arg), "E488: Trailing characters");
tabs.switchTo(arg, special); tabs.switchTo(arg, special);
} }
else if (count > 0) else if (count > 0)
@@ -755,7 +755,7 @@ const Tabs = Module("tabs", {
commands.add(["quita[ll]", "qa[ll]"], commands.add(["quita[ll]", "qa[ll]"],
"Quit " + config.name, "Quit " + config.name,
function (args) { liberator.quit(false, args.bang); }, { function (args) { dactyl.quit(false, args.bang); }, {
argCount: "0", argCount: "0",
bang: true bang: true
}); });
@@ -779,7 +779,7 @@ const Tabs = Module("tabs", {
let arg = args[0]; let arg = args[0];
// FIXME: tabmove! N should probably produce an error // FIXME: tabmove! N should probably produce an error
liberator.assert(!arg || /^([+-]?\d+)$/.test(arg), dactyl.assert(!arg || /^([+-]?\d+)$/.test(arg),
"E488: Trailing characters"); "E488: Trailing characters");
// if not specified, move to after the last tab // if not specified, move to after the last tab
@@ -797,7 +797,7 @@ const Tabs = Module("tabs", {
commands.add(["tabopen", "t[open]", "tabnew"], commands.add(["tabopen", "t[open]", "tabnew"],
"Open one or more URLs in a new tab", "Open one or more URLs in a new tab",
function (args) { 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, bang: true,
completer: function (context) completion.url(context), completer: function (context) completion.url(context),
@@ -808,7 +808,7 @@ const Tabs = Module("tabs", {
commands.add(["tabde[tach]"], commands.add(["tabde[tach]"],
"Detach current tab to its own window", "Detach current tab to its own window",
function () { 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); tabs.detachTab(null);
}, },
@@ -837,14 +837,14 @@ const Tabs = Module("tabs", {
commands.add(["taba[ttach]"], commands.add(["taba[ttach]"],
"Attach the current tab to another window", "Attach the current tab to another window",
function (args) { 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"); "E488: Trailing characters");
let [winIndex, tabIndex] = args.map(parseInt); 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"); dactyl.assert(win, "Window " + winIndex + " does not exist");
liberator.assert(win != window, "Can't reattach to the same window"); dactyl.assert(win != window, "Can't reattach to the same window");
let browser = win.getBrowser(); let browser = win.getBrowser();
let dummy = browser.addTab("about:blank"); 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]"], commands.add(["u[ndo]"],
"Undo closing of a tab", "Undo closing of a tab",
function (args) { function (args) {
@@ -889,7 +889,7 @@ const Tabs = Module("tabs", {
return; return;
} }
liberator.echoerr("Exxx: No matching closed tab"); dactyl.echoerr("Exxx: No matching closed tab");
} }
}, { }, {
argCount: "?", argCount: "?",
@@ -915,10 +915,10 @@ const Tabs = Module("tabs", {
} }
if (liberator.has("session")) { if (dactyl.has("session")) {
commands.add(["wqa[ll]", "wq", "xa[ll]"], commands.add(["wqa[ll]", "wq", "xa[ll]"],
"Save the session and quit", "Save the session and quit",
function () { liberator.quit(true); }, function () { dactyl.quit(true); },
{ argCount: "0" }); { argCount: "0" });
} }
}, },
@@ -999,7 +999,7 @@ const Tabs = Module("tabs", {
{ count: true }); { count: true });
// TODO: feature dependencies - implies "session"? // TODO: feature dependencies - implies "session"?
if (liberator.has("tabs_undo")) { if (dactyl.has("tabs_undo")) {
mappings.add([modes.NORMAL], ["u"], mappings.add([modes.NORMAL], ["u"],
"Undo closing of a tab", "Undo closing of a tab",
function (count) { commands.get("undo").execute("", false, count); }, function (count) { commands.get("undo").execute("", false, count); },

View File

@@ -22,7 +22,7 @@ const Template = Module("template", {
if (sep && n++) if (sep && n++)
ret += sep; ret += sep;
if (interruptable && n % interruptable == 0) if (interruptable && n % interruptable == 0)
liberator.threadYield(true, true); dactyl.threadYield(true, true);
ret += val; ret += val;
} }
return ret; return ret;

View File

@@ -10,7 +10,7 @@
const XHTML = Namespace("html", "http://www.w3.org/1999/xhtml"); 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 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; default xml namespace = XHTML;
const Util = Module("util", { const Util = Module("util", {
@@ -79,7 +79,7 @@ const Util = Module("util", {
clipboardHelper.copyString(str); clipboardHelper.copyString(str);
if (verbose) 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 PATH = FILE.leafName.replace(/\..*/, "") + "/";
const TIME = Date.now(); const TIME = Date.now();
liberator.initHelp(); dactyl.initHelp();
let zip = services.create("zipWriter"); let zip = services.create("zipWriter");
zip.open(FILE, File.MODE_CREATE | File.MODE_WRONLY | File.MODE_TRUNCATE); zip.open(FILE, File.MODE_CREATE | File.MODE_WRONLY | File.MODE_TRUNCATE);
function addURIEntry(file, uri) function addURIEntry(file, uri)
@@ -324,8 +324,8 @@ const Util = Module("util", {
.split(" ").map(Array.concat)); .split(" ").map(Array.concat));
let chrome = {}; let chrome = {};
for (let [file,] in Iterator(services.get("liberator:").FILE_MAP)) { for (let [file,] in Iterator(services.get("dactyl:").FILE_MAP)) {
liberator.open("liberator://help/" + file); dactyl.open("dactyl://help/" + file);
events.waitForPageLoad(); events.waitForPageLoad();
let data = [ let data = [
'<?xml version="1.0" encoding="UTF-8"?>\n', '<?xml version="1.0" encoding="UTF-8"?>\n',
@@ -343,12 +343,12 @@ const Util = Module("util", {
data.push(" xmlns=" + XHTML.uri.quote()); data.push(" xmlns=" + XHTML.uri.quote());
for (let { name: name, value: value } in util.Array.itervalues(node.attributes)) { for (let { name: name, value: value } in util.Array.itervalues(node.attributes)) {
if (name == "liberator:highlight") { if (name == "dactyl:highlight") {
name = "class"; name = "class";
value = "hl-" + value; value = "hl-" + value;
} }
if (name == "href") { 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); value = services.get("io").newChannel(value, null, null).originalURI.path.substr(1);
if (!/[#\/]/.test(value)) if (!/[#\/]/.test(value))
value += ".xhtml"; value += ".xhtml";
@@ -423,14 +423,14 @@ const Util = Module("util", {
return xmlhttp; return xmlhttp;
} }
catch (e) { catch (e) {
liberator.log("Error opening " + url + ": " + e, 1); dactyl.log("Error opening " + url + ": " + e, 1);
return null; return null;
} }
}, },
/** /**
* Evaluates an XPath expression in the current or provided * 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. * namespaces. The result may be used as an iterator.
* *
* @param {string} expression The XPath expression to evaluate. * @param {string} expression The XPath expression to evaluate.
@@ -454,7 +454,7 @@ const Util = Module("util", {
return { return {
xhtml: "http://www.w3.org/1999/xhtml", xhtml: "http://www.w3.org/1999/xhtml",
xhtml2: "http://www.w3.org/2002/06/xhtml2", xhtml2: "http://www.w3.org/2002/06/xhtml2",
liberator: NS.uri dactyl: NS.uri
}[prefix] || null; }[prefix] || null;
}, },
asIterator ? XPathResult.ORDERED_NODE_ITERATOR_TYPE : XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, asIterator ? XPathResult.ORDERED_NODE_ITERATOR_TYPE : XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
@@ -559,7 +559,7 @@ const Util = Module("util", {
return false; return false;
const NAMESPACES = util.Array.toObject([ const NAMESPACES = util.Array.toObject([
[NS, 'liberator'], [NS, 'dactyl'],
[XHTML, 'html'], [XHTML, 'html'],
[XUL, 'xul'] [XUL, 'xul']
]); ]);
@@ -674,7 +674,7 @@ const Util = Module("util", {
let endTime = Date.now() + time; let endTime = Date.now() + time;
while (start < end) { while (start < end) {
if (Date.now() > endTime) { if (Date.now() > endTime) {
liberator.threadYield(true, true); dactyl.threadYield(true, true);
endTime = Date.now() + time; endTime = Date.now() + time;
} }
yield start++; yield start++;

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="all" name="all"
title="&liberator.appname; All" title="&dactyl.appname; All"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<tags>all</tags> <tags>all</tags>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="autocommands" name="autocommands"
title="&liberator.appname; Autocommands" title="&dactyl.appname; Autocommands"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="autocommands">Automatic commands</h1> <h1 tag="autocommands">Automatic commands</h1>
@@ -31,7 +31,7 @@
variables. variables.
</p> </p>
<p>Add <a>cmd</a> to the list of commands &liberator.appname; will execute on <a>event</a> for a URL matching <a>pat</a>:</p> <p>Add <a>cmd</a> to the list of commands &dactyl.appname; will execute on <a>event</a> for a URL matching <a>pat</a>:</p>
<ul> <ul>
<li><ex>:autocmd[!]</ex> <a>events</a> <a>pat</a>: list/remove autocommands filtered by <a>events</a> and <a>pat</a></li> <li><ex>:autocmd[!]</ex> <a>events</a> <a>pat</a>: list/remove autocommands filtered by <a>events</a> and <a>pat</a></li>

View File

@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="browsing" name="browsing"
title="&liberator.appname; Browsing" title="&dactyl.appname; Browsing"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="surfing browsing">Browsing</h1> <h1 tag="surfing browsing">Browsing</h1>
<toc start="2"/> <toc start="2"/>
&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 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: have 2 possibilities:
<item> <item>
@@ -21,7 +21,7 @@ have 2 possibilities:
<spec>CTRL-Z</spec> <spec>CTRL-Z</spec>
<description> <description>
<p> <p>
Disable all &liberator.appname; keys except <k name="Esc"/> and pass them to the next event Disable all &dactyl.appname; keys except <k name="Esc"/> and pass them to the next event
handler. This is especially useful if JavaScript controlled forms (e.g., the 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 RichEdit form fields of Gmail) don't work anymore. To exit this mode, press
<k name="Esc"/>. If you also need to pass <k name="Esc"/> in this mode to the web page, <k name="Esc"/>. If you also need to pass <k name="Esc"/> in this mode to the web page,
@@ -37,10 +37,10 @@ have 2 possibilities:
<description> <description>
<p> <p>
If you only need to pass a single key to a JavaScript form field or another If you only need to pass a single key to a JavaScript form field or another
extension prefix the key with <k name="C-v"/>. Also works to unshadow &liberator.host; extension prefix the key with <k name="C-v"/>. Also works to unshadow &dactyl.host;
shortcuts like <k name="C-o"/> which are otherwise hidden in &liberator.appname;. When shortcuts like <k name="C-o"/> which are otherwise hidden in &dactyl.appname;. When
&liberator.appname; mode is temporarily disabled with <k name="C-z"/>, <k name="C-v"/> will pass &dactyl.appname; mode is temporarily disabled with <k name="C-z"/>, <k name="C-v"/> will pass
the next key to &liberator.appname; instead of the web page. the next key to &dactyl.appname; instead of the web page.
</p> </p>
</description> </description>
</item> </item>
@@ -87,7 +87,7 @@ have 2 possibilities:
opens a Google search for linus torvalds). opens a Google search for linus torvalds).
</li> </li>
<li> <li>
Passed directly to &liberator.host; in all other cases Passed directly to &dactyl.host; in all other cases
(<ex>:open www.osnews.com, www.slashdot.org</ex> (<ex>:open www.osnews.com, www.slashdot.org</ex>
opens OSNews in the current, and Slashdot in a new opens OSNews in the current, and Slashdot in a new
background tab). background tab).
@@ -441,7 +441,7 @@ have 2 possibilities:
<description> <description>
<p> <p>
Quit current tab. If this is the last tab in the window, close the window. If 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. session is not stored.
</p> </p>
</description> </description>
@@ -453,7 +453,7 @@ have 2 possibilities:
<spec>:quita<oa>ll</oa></spec> <spec>:quita<oa>ll</oa></spec>
<description> <description>
<p> <p>
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. The session is not stored.
</p> </p>
</description> </description>
@@ -484,7 +484,7 @@ have 2 possibilities:
<spec>:xa<oa>ll</oa></spec> <spec>:xa<oa>ll</oa></spec>
<description> <description>
<p> <p>
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. <ex>:wq</ex> is different from Vim, as it are open. The session is stored. <ex>:wq</ex> is different from Vim, as it
closes the window instead of just one tab by popular demand. Complain on the closes the window instead of just one tab by popular demand. Complain on the
mailing list if you want to change that. mailing list if you want to change that.
@@ -507,7 +507,7 @@ have 2 possibilities:
<spec>ZZ</spec> <spec>ZZ</spec>
<description> <description>
<p> <p>
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 <ex>:xall</ex>. are open. The session is stored. Works like <ex>:xall</ex>.
</p> </p>
</description> </description>

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="buffer" name="buffer"
title="&liberator.appname; Buffer" title="&dactyl.appname; Buffer"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="buffer document">Buffer</h1> <h1 tag="buffer document">Buffer</h1>
<toc start="2"/> <toc start="2"/>
&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. (X)HTML document with advanced features.
<h2 tag="buffer-information">Buffer information</h2> <h2 tag="buffer-information">Buffer information</h2>
@@ -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 The available zoom range can be changed by setting the
<link topic="http://kb.mozillazine.org/Zoom.minPercent">'zoom.minPercent'</link> and <link topic="http://kb.mozillazine.org/Zoom.minPercent">'zoom.minPercent'</link> and
<link topic="http://kb.mozillazine.org/Zoom.maxPercent">'zoom.maxPercent'</link> &liberator.host; <link topic="http://kb.mozillazine.org/Zoom.maxPercent">'zoom.maxPercent'</link> &dactyl.host;
preferences. The zoom levels can be changed using the preferences. The zoom levels can be changed using the
<link topic="http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues">'toolkit.ZoomManager.zoomLevels'</link> <link topic="http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues">'toolkit.ZoomManager.zoomLevels'</link>
preference. preference.

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="cmdline" name="cmdline"
title="&liberator.appname; Command-line" title="&dactyl.appname; Command-line"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="Command-line-mode Command-line mode-cmdline">Command-line mode</h1> <h1 tag="Command-line-mode Command-line mode-cmdline">Command-line mode</h1>

View File

@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd" [ <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd" [
<!ENTITY tab "&#xa0;&#xa0;&#xa0;"> <!ENTITY tab "&#xa0;&#xa0;&#xa0;">
]> ]>
<document <document
name="developer" name="developer"
title="&liberator.appname; Developer information" title="&dactyl.appname; Developer information"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="developer-information">Developer information</h1> <h1 tag="developer-information">Developer information</h1>
@@ -63,7 +63,7 @@
<p> <p>
If you don't know in which file/section you should put some If you don't know in which file/section you should put some
documentation, ask on the mailing list or on documentation, ask on the mailing list or on
<link topic="irc://irc.freenode.net/vimperator">#vimperator</link>. <link topic="irc://irc.freenode.net/pentadactyl">#pentadactyl</link>.
</p> </p>
<h3 tag="help-tags help-xml">Help tags</h3> <h3 tag="help-tags help-xml">Help tags</h3>
@@ -89,7 +89,7 @@
<dt>&tab;@topic</dt> <dd>The topic of the link. Either a help topic or a fully-qualified URI.</dd> <dt>&tab;@topic</dt> <dd>The topic of the link. Either a help topic or a fully-qualified URI.</dd>
<dt>em</dt> <dd><em>Emphasized</em> text. (HelpEm)</dd> <dt>em</dt> <dd><em>Emphasized</em> text. (HelpEm)</dd>
<dt>str</dt> <dd>A <str>string</str>, with its contents wrapped in quotes. (HelpString)</dd> <dt>str</dt> <dd>A <str>string</str>, with its contents wrapped in quotes. (HelpString)</dd>
<dt>logo</dt> <dd>&liberator.appname;'s logo. (Logo)</dd> <dt>logo</dt> <dd>&dactyl.appname;'s logo. (Logo)</dd>
</dl> </dl>
<dl> <dl>
<dt>Items</dt><dd/> <dt>Items</dt><dd/>
@@ -129,7 +129,7 @@
<dt>&tab;@summary</dt> <dd>A short description of the plugin, shown in its section head.</dd> <dt>&tab;@summary</dt> <dd>A short description of the plugin, shown in its section head.</dd>
<dt>project</dt> <dd>The project for which this plugin was intended.</dd> <dt>project</dt> <dd>The project for which this plugin was intended.</dd>
<dt>&tab;@name</dt> <dd>The name of the project (i.e., <str>&liberator.name;</str>)</dd> <dt>&tab;@name</dt> <dd>The name of the project (i.e., <str>&dactyl.name;</str>)</dd>
<dt>&tab;@minVersion</dt> <dd>The minimum version of the project for which this plugin is intended to work.</dd> <dt>&tab;@minVersion</dt> <dd>The minimum version of the project for which this plugin is intended to work.</dd>
<dt>&tab;@maxVersion</dt> <dd>The maximum version of the project for which this plugin is intended to work.</dd> <dt>&tab;@maxVersion</dt> <dd>The maximum version of the project for which this plugin is intended to work.</dd>
@@ -153,13 +153,13 @@
<h2 tag="writing-plugins">Writing plugins</h2> <h2 tag="writing-plugins">Writing plugins</h2>
<p> <p>
Writing &liberator.appname; plugins is incredibly simple. Writing &dactyl.appname; plugins is incredibly simple.
Plugins are simply JavaScript files which run with full chrome Plugins are simply JavaScript files which run with full chrome
privileges and have full access to the &liberator.appname; and privileges and have full access to the &dactyl.appname; and
&liberator.host; APIs. Each plugin has its own global object, &dactyl.host; APIs. Each plugin has its own global object,
which means that the variables and functions that you create which means that the variables and functions that you create
won't pollute the global <em>window</em> or private won't pollute the global <em>window</em> or private
<em>liberator</em> namespaces. This means that there's no need <em>dactyl</em> namespaces. This means that there's no need
to wrap your plugin in a closure, as is often the practice in to wrap your plugin in a closure, as is often the practice in
JavaScript development. Furthermore, any plugin which is JavaScript development. Furthermore, any plugin which is
installed in your <o>runtimepath</o><em>/plugin</em> directory installed in your <o>runtimepath</o><em>/plugin</em> directory
@@ -186,7 +186,7 @@ var INFO =
xmlns="http://vimperator.org/namespaces/liberator"> xmlns="http://vimperator.org/namespaces/liberator">
<author email="maglione.k@gmail.com">Kris Maglione</author> <author email="maglione.k@gmail.com">Kris Maglione</author>
<license href="http://opensource.org/licenses/mit-license.php">MIT</license> <license href="http://opensource.org/licenses/mit-license.php">MIT</license>
<project name="Vimperator" minVersion="2.0"/> <project name="Pentadactyl" minVersion="2.0"/>
<p> <p>
This plugin provides the same features as the ever popular FlashBlock This plugin provides the same features as the ever popular FlashBlock
Firefox addon. Flash animations are substituted with place holders which Firefox addon. Flash animations are substituted with place holders which
@@ -216,9 +216,9 @@ var INFO =
The inline XML is made possible by The inline XML is made possible by
<link topic="https://developer.mozilla.org/en/E4X">E4X</link>. <link topic="https://developer.mozilla.org/en/E4X">E4X</link>.
It's important that the documentation be assigned to the It's important that the documentation be assigned to the
<em>INFO</em> variable, or &liberator.appname; will not be able <em>INFO</em> variable, or &dactyl.appname; will not be able
to find it. The documentation that you provide behaves exactly 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 <ex>:help</ex> with the tags you provide are available via <ex>:help</ex> with
full tag completion and cross-referencing support. Although full tag completion and cross-referencing support. Although
documentation is not required, we strongly recommend that all documentation is not required, we strongly recommend that all

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="eval" name="eval"
title="&liberator.appname; Expression Evaluation" title="&dactyl.appname; Expression Evaluation"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="expression expr eval">Expression evaluation</h1> <h1 tag="expression expr eval">Expression evaluation</h1>
@@ -84,12 +84,12 @@
<p> <p>
The special version <ex>:javascript!</ex> opens the JavaScript console of The special version <ex>:javascript!</ex> opens the JavaScript console of
&liberator.host;. &dactyl.host;.
</p> </p>
<p> <p>
<k name="Tab"/> completion is available for <ex>:javascript <a>cmd</a><k name="Tab"/></ex> (but not <k name="Tab"/> completion is available for <ex>:javascript <a>cmd</a><k name="Tab"/></ex> (but not
yet for the <ex>:js &lt;&lt;EOF</ex> multiline widget). Be aware that &liberator.appname; needs yet for the <ex>:js &lt;&lt;EOF</ex> multiline widget). Be aware that &dactyl.appname; needs
to run <a>cmd</a> through eval() to get the completions, which could have unwanted to run <a>cmd</a> through eval() to get the completions, which could have unwanted
side effects. side effects.
</p> </p>

View File

@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="gui" name="gui"
title="&liberator.appname; GUI" title="&dactyl.appname; GUI"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="gui">&liberator.appname;'s GUI</h1> <h1 tag="gui">&dactyl.appname;'s GUI</h1>
<toc start="2"/> <toc start="2"/>
<p> <p>
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 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 is required. There are commands for accessing the menu system, standard dialogs
and the sidebar. and the sidebar.
@@ -26,7 +26,7 @@
<description> <description>
<p> <p>
Execute <a>menu</a> from the command line. This command provides command-line access Execute <a>menu</a> from the command line. This command provides command-line access
to all menu items available from the main &liberator.host; menubar. <a>menu</a> is a to all menu items available from the main &dactyl.host; menubar. <a>menu</a> is a
hierarchical path to the menu item with each submenu separated by a period. hierarchical path to the menu item with each submenu separated by a period.
E.g. <ex>:emenu File.Open File…</ex> E.g. <ex>:emenu File.Open File…</ex>
</p> </p>
@@ -41,10 +41,10 @@
<spec>:addo<oa>ns</oa></spec> <spec>:addo<oa>ns</oa></spec>
<description> <description>
<p> <p>
Show available &liberator.host; Extensions and Themes. Show available &dactyl.host; Extensions and Themes.
You can add/remove/disable browser extensions from this dialog. You can add/remove/disable browser extensions from this dialog.
Be aware that not all &liberator.host; extensions work, because &liberator.appname; overrides Be aware that not all &dactyl.host; extensions work, because &dactyl.appname; overrides
some key bindings and changes &liberator.host;'s GUI. some key bindings and changes &dactyl.host;'s GUI.
</p> </p>
</description> </description>
</item> </item>
@@ -52,13 +52,13 @@
<item> <item>
<tags>:dia :dialog</tags> <tags>:dia :dialog</tags>
<spec>:dia<oa>log</oa> <oa>&liberator.host;-dialog</oa></spec> <spec>:dia<oa>log</oa> <oa>&dactyl.host;-dialog</oa></spec>
<description> <description>
<p>Open a &liberator.host; dialog.</p> <p>Open a &dactyl.host; dialog.</p>
<p>Available dialogs:</p> <p>Available dialogs:</p>
<dl tag="dialog-list"> <dl tag="dialog-list">
<dt>about</dt> <dd>About Mozilla &liberator.host;;</dd> <dt>about</dt> <dd>About Mozilla &dactyl.host;;</dd>
<dt>addbookmark</dt> <dd>Add bookmark for the current page</dd> <dt>addbookmark</dt> <dd>Add bookmark for the current page</dd>
<dt>addons</dt> <dd>Manage Add-ons</dd> <dt>addons</dt> <dd>Manage Add-ons</dd>
<dt>bookmarks</dt> <dd>List your bookmarks</dd> <dt>bookmarks</dt> <dd>List your bookmarks</dd>
@@ -75,7 +75,7 @@
<dt>pageinfo</dt> <dd>Show information about the current page</dd> <dt>pageinfo</dt> <dd>Show information about the current page</dd>
<dt>pagesource</dt> <dd>View page source</dd> <dt>pagesource</dt> <dd>View page source</dd>
<dt>places</dt> <dd>Places Organizer: Manage your bookmarks and history</dd> <dt>places</dt> <dd>Places Organizer: Manage your bookmarks and history</dd>
<dt>preferences</dt> <dd>Show &liberator.host; preferences dialog</dd> <dt>preferences</dt> <dd>Show &dactyl.host; preferences dialog</dd>
<dt>printpreview</dt> <dd>Preview the page before printing</dd> <dt>printpreview</dt> <dd>Preview the page before printing</dd>
<dt>printsetup</dt> <dd>Setup the page size and orientation before printing</dd> <dt>printsetup</dt> <dd>Setup the page size and orientation before printing</dd>
<dt>print</dt> <dd>Show print dialog</dd> <dt>print</dt> <dd>Show print dialog</dd>
@@ -93,7 +93,7 @@
<spec>:downl<oa>oads</oa></spec> <spec>:downl<oa>oads</oa></spec>
<description> <description>
<p> <p>
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. in a new tab. Here, downloads can be paused, canceled and resumed.
</p> </p>
</description> </description>
@@ -191,7 +191,7 @@
<description> <description>
<p> <p>
Open the sidebar window. <a>name</a> is any of the menu items listed under the Open the sidebar window. <a>name</a> 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. also available in the sidebar.
</p> </p>
</description> </description>
@@ -231,7 +231,7 @@
</li> </li>
<li> <li>
Security: The security information button is displayed when appropriate 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. current security status of the loaded page.
<ul> <ul>
<li>black the site's identity is unverified and the connection is unencrypted</li> <li>black the site's identity is unverified and the connection is unencrypted</li>
@@ -242,7 +242,7 @@
</li> </li>
<li> <li>
Extensions: Any extension buttons that would normally be installed to the 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.
</li> </li>
</ul> </ul>

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="hints" name="hints"
title="&liberator.appname; Hints" title="&dactyl.appname; Hints"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="quick-hints hints">Hints</h1> <h1 tag="quick-hints hints">Hints</h1>
<toc start="2"/> <toc start="2"/>
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 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 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 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 Start QuickHint mode, but open link in a new tab. Like normal QuickHint
mode (activated with <k>f</k>) but opens the link in a new tab. The new mode (activated with <k>f</k>) but opens the link in a new tab. The new
tab will be loaded in background according to the tab will be loaded in background according to the
<str>browser.tabs.loadInBackground</str> &liberator.host; preference. <str>browser.tabs.loadInBackground</str> &dactyl.host; preference.
</p> </p>
</description> </description>
</item> </item>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="index" name="index"
title="&liberator.appname; Index" title="&dactyl.appname; Index"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="index">Index</h1> <h1 tag="index">Index</h1>
@@ -37,7 +37,7 @@ This file contains a list of all available commands, mappings and options.
<dt><k name="C-u"/></dt> <dd>Scroll window upwards in the buffer</dd> <dt><k name="C-u"/></dt> <dd>Scroll window upwards in the buffer</dd>
<dt><k name="C-v"/></dt> <dd>Pass through next key</dd> <dt><k name="C-v"/></dt> <dd>Pass through next key</dd>
<dt><k name="C-x"/></dt> <dd>Decrement last number in URL</dd> <dt><k name="C-x"/></dt> <dd>Decrement last number in URL</dd>
<dt><k name="C-z"/></dt> <dd>Temporarily ignore all &liberator.appname; key bindings</dd> <dt><k name="C-z"/></dt> <dd>Temporarily ignore all &dactyl.appname; key bindings</dd>
</dl> </dl>
@@ -258,7 +258,7 @@ This file contains a list of all available commands, mappings and options.
<dt><ex>:delmarks</ex></dt> <dd>Delete the specified marks</dd> <dt><ex>:delmarks</ex></dt> <dd>Delete the specified marks</dd>
<dt><ex>:delqmarks</ex></dt> <dd>Delete the specified QuickMarks</dd> <dt><ex>:delqmarks</ex></dt> <dd>Delete the specified QuickMarks</dd>
<dt><ex>:delstyle</ex></dt> <dd>Delete any matching styles</dd> <dt><ex>:delstyle</ex></dt> <dd>Delete any matching styles</dd>
<dt><ex>:dialog</ex></dt> <dd>Open a &liberator.host; dialog</dd> <dt><ex>:dialog</ex></dt> <dd>Open a &dactyl.host; dialog</dd>
<dt><ex>:doautoall</ex></dt> <dd>Apply the autocommands matching the specified URL to all buffers</dd> <dt><ex>:doautoall</ex></dt> <dd>Apply the autocommands matching the specified URL to all buffers</dd>
<dt><ex>:doautocmd</ex></dt> <dd>Apply the autocommands matching the specified URL to the current buffer</dd> <dt><ex>:doautocmd</ex></dt> <dd>Apply the autocommands matching the specified URL to the current buffer</dd>
<dt><ex>:downloads</ex></dt> <dd>Show progress of current downloads</dd> <dt><ex>:downloads</ex></dt> <dd>Show progress of current downloads</dd>
@@ -280,7 +280,7 @@ This file contains a list of all available commands, mappings and options.
<dt><ex>:hardcopy</ex></dt> <dd>Print current document</dd> <dt><ex>:hardcopy</ex></dt> <dd>Print current document</dd>
<dt><ex>:help</ex></dt> <dd>Open the help page</dd> <dt><ex>:help</ex></dt> <dd>Open the help page</dd>
<dt><ex>:helpall</ex></dt> <dd>Open the single unchunked help page</dd> <dt><ex>:helpall</ex></dt> <dd>Open the single unchunked help page</dd>
<dt><ex>:highlight</ex></dt> <dd>Style &liberator.appname;</dd> <dt><ex>:highlight</ex></dt> <dd>Style &dactyl.appname;</dd>
<dt><ex>:history</ex></dt> <dd>Show recently visited URLs</dd> <dt><ex>:history</ex></dt> <dd>Show recently visited URLs</dd>
<dt><ex>:iabbrev</ex></dt> <dd>Abbreviate a key sequence in Insert mode</dd> <dt><ex>:iabbrev</ex></dt> <dd>Abbreviate a key sequence in Insert mode</dd>
<dt><ex>:iabclear</ex></dt> <dd>Remove all abbreviations in Insert mode</dd> <dt><ex>:iabclear</ex></dt> <dd>Remove all abbreviations in Insert mode</dd>
@@ -301,7 +301,7 @@ This file contains a list of all available commands, mappings and options.
<dt><ex>:marks</ex></dt> <dd>Show all location marks of current web page</dd> <dt><ex>:marks</ex></dt> <dd>Show all location marks of current web page</dd>
<dt><ex>:messages</ex></dt> <dd>Display previously given messages</dd> <dt><ex>:messages</ex></dt> <dd>Display previously given messages</dd>
<dt><ex>:messclear</ex></dt> <dd>Clear the message history</dd> <dt><ex>:messclear</ex></dt> <dd>Clear the message history</dd>
<dt><ex>:mk&liberator.name;rc</ex></dt> <dd>Write current key mappings and changed options to the config file</dd> <dt><ex>:mk&dactyl.name;rc</ex></dt> <dd>Write current key mappings and changed options to the config file</dd>
<dt><ex>:nmap</ex></dt> <dd>Map a key sequence in Normal mode</dd> <dt><ex>:nmap</ex></dt> <dd>Map a key sequence in Normal mode</dd>
<dt><ex>:nmapclear</ex></dt> <dd>Remove all mappings in Normal mode</dd> <dt><ex>:nmapclear</ex></dt> <dd>Remove all mappings in Normal mode</dd>
<dt><ex>:nnoremap</ex></dt> <dd>Map a key sequence without remapping keys in Normal mode</dd> <dt><ex>:nnoremap</ex></dt> <dd>Map a key sequence without remapping keys in Normal mode</dd>
@@ -314,12 +314,12 @@ This file contains a list of all available commands, mappings and options.
<dt><ex>:pageinfo</ex></dt> <dd>Show various page information</dd> <dt><ex>:pageinfo</ex></dt> <dd>Show various page information</dd>
<dt><ex>:pagestyle</ex></dt> <dd>Select the author style sheet to apply</dd> <dt><ex>:pagestyle</ex></dt> <dd>Select the author style sheet to apply</dd>
<dt><ex>:play</ex></dt> <dd>Replay a recorded macro</dd> <dt><ex>:play</ex></dt> <dd>Replay a recorded macro</dd>
<dt><ex>:preferences</ex></dt> <dd>Show &liberator.host; preferences dialog</dd> <dt><ex>:preferences</ex></dt> <dd>Show &dactyl.host; preferences dialog</dd>
<dt><ex>:pwd</ex></dt> <dd>Print the current directory name</dd> <dt><ex>:pwd</ex></dt> <dd>Print the current directory name</dd>
<dt><ex>:qmark</ex></dt> <dd>Mark a URL with a letter for quick access</dd> <dt><ex>:qmark</ex></dt> <dd>Mark a URL with a letter for quick access</dd>
<dt><ex>:qmarks</ex></dt> <dd>Show all QuickMarks</dd> <dt><ex>:qmarks</ex></dt> <dd>Show all QuickMarks</dd>
<dt><ex>:quit</ex></dt> <dd>Quit current tab</dd> <dt><ex>:quit</ex></dt> <dd>Quit current tab</dd>
<dt><ex>:quitall</ex></dt> <dd>Quit &liberator.appname;</dd> <dt><ex>:quitall</ex></dt> <dd>Quit &dactyl.appname;</dd>
<dt><ex>:redraw</ex></dt> <dd>Redraw the screen</dd> <dt><ex>:redraw</ex></dt> <dd>Redraw the screen</dd>
<dt><ex>:reload</ex></dt> <dd>Reload the current web page</dd> <dt><ex>:reload</ex></dt> <dd>Reload the current web page</dd>
<dt><ex>:reloadall</ex></dt> <dd>Reload all tab pages</dd> <dt><ex>:reloadall</ex></dt> <dd>Reload all tab pages</dd>
@@ -337,7 +337,7 @@ This file contains a list of all available commands, mappings and options.
<dt><ex>:source</ex></dt> <dd>Read Ex commands from a file</dd> <dt><ex>:source</ex></dt> <dd>Read Ex commands from a file</dd>
<dt><ex>:stop</ex></dt> <dd>Stop loading the current web page</dd> <dt><ex>:stop</ex></dt> <dd>Stop loading the current web page</dd>
<dt><ex>:stopall</ex></dt> <dd>Stop loading all tab pages</dd> <dt><ex>:stopall</ex></dt> <dd>Stop loading all tab pages</dd>
<dt><ex>:style</ex></dt> <dd>Style &liberator.appname; and web sites</dd> <dt><ex>:style</ex></dt> <dd>Style &dactyl.appname; and web sites</dd>
<dt><ex>:styledisable</ex></dt> <dd>Disable a user style sheet</dd> <dt><ex>:styledisable</ex></dt> <dd>Disable a user style sheet</dd>
<dt><ex>:styleenable</ex></dt> <dd>Enable a user style sheet</dd> <dt><ex>:styleenable</ex></dt> <dd>Enable a user style sheet</dd>
<dt><ex>:styletoggle</ex></dt> <dd>Toggle a user style sheet</dd> <dt><ex>:styletoggle</ex></dt> <dd>Toggle a user style sheet</dd>
@@ -392,7 +392,7 @@ This file contains a list of all available commands, mappings and options.
<dt><o>eventignore</o></dt> <dd>List of autocommand event names which should be ignored</dd> <dt><o>eventignore</o></dt> <dd>List of autocommand event names which should be ignored</dd>
<dt><o>exrc</o></dt> <dd>Allow reading of an RC file in the current directory</dd> <dt><o>exrc</o></dt> <dd>Allow reading of an RC file in the current directory</dd>
<dt><o>extendedhinttags</o></dt> <dd>XPath string of hintable elements activated by <k>;</k></dd> <dt><o>extendedhinttags</o></dt> <dd>XPath string of hintable elements activated by <k>;</k></dd>
<dt><o>fileencoding</o></dt> <dd>Changes the character encoding that &liberator.appname; uses to read and write files</dd> <dt><o>fileencoding</o></dt> <dd>Changes the character encoding that &dactyl.appname; uses to read and write files</dd>
<dt><o>followhints</o></dt> <dd>Change the behaviour of <k name="Return"/> in Hints mode</dd> <dt><o>followhints</o></dt> <dd>Change the behaviour of <k name="Return"/> in Hints mode</dd>
<dt><o>fullscreen</o></dt> <dd>Show the current window fullscreen</dd> <dt><o>fullscreen</o></dt> <dd>Show the current window fullscreen</dd>
<dt><o>guioptions</o></dt> <dd>Show or hide certain GUI elements like the menu or toolbar</dd> <dt><o>guioptions</o></dt> <dd>Show or hide certain GUI elements like the menu or toolbar</dd>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="insert" name="insert"
title="&liberator.appname; Insert Mode" title="&dactyl.appname; Insert Mode"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="Insert-mode Insert mode-insert">Insert mode</h1> <h1 tag="Insert-mode Insert mode-insert">Insert mode</h1>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="map" name="map"
title="&liberator.appname; Key Mappings" title="&dactyl.appname; Key Mappings"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1>Key mappings, abbreviations, and user-defined commands</h1> <h1>Key mappings, abbreviations, and user-defined commands</h1>
@@ -33,12 +33,12 @@
<li>Normal mode: When browsing normally</li> <li>Normal mode: When browsing normally</li>
<li>Visual mode: When selecting text with the cursor keys</li> <li>Visual mode: When selecting text with the cursor keys</li>
<li>Insert mode: When interacting with text fields on a website</li> <li>Insert mode: When interacting with text fields on a website</li>
<li>Command-line mode: When typing into the &liberator.appname; command line</li> <li>Command-line mode: When typing into the &dactyl.appname; command line</li>
</ul> </ul>
<warning> <warning>
Mappings are NOT saved between sessions, make sure you put them in your Mappings are NOT saved between sessions, make sure you put them in your
&liberator.name;rc file! &dactyl.name;rc file!
</warning> </warning>
<h3 tag=":map-commands">Map commands</h3> <h3 tag=":map-commands">Map commands</h3>
@@ -279,7 +279,7 @@
<h2 tag="abbreviations">Abbreviations</h2> <h2 tag="abbreviations">Abbreviations</h2>
<p> <p>
&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 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 words. An abbreviation can be one of three types that are defined by the
types of constituent characters. Whitespace and quotes are non-keyword types of constituent characters. Whitespace and quotes are non-keyword
@@ -475,7 +475,7 @@
<dt>buffer</dt> <dd>buffers</dd> <dt>buffer</dt> <dd>buffers</dd>
<dt>color</dt> <dd>color schemes</dd> <dt>color</dt> <dd>color schemes</dd>
<dt>command</dt> <dd>Ex commands</dd> <dt>command</dt> <dd>Ex commands</dd>
<dt>dialog</dt> <dd>&liberator.host; dialogs</dd> <dt>dialog</dt> <dd>&dactyl.host; dialogs</dd>
<dt>dir</dt> <dd>directories</dd> <dt>dir</dt> <dd>directories</dd>
<dt>environment</dt> <dd>environment variables</dd> <dt>environment</dt> <dd>environment variables</dd>
<dt>event</dt> <dd>autocommand events</dd> <dt>event</dt> <dd>autocommand events</dd>
@@ -486,8 +486,8 @@
<dt>macro</dt> <dd>named macros</dd> <dt>macro</dt> <dd>named macros</dd>
<dt>mapping</dt> <dd>user mappings</dd> <dt>mapping</dt> <dd>user mappings</dd>
<dt>menu</dt> <dd>menu items</dd> <dt>menu</dt> <dd>menu items</dd>
<dt>option</dt> <dd>&liberator.appname; options</dd> <dt>option</dt> <dd>&dactyl.appname; options</dd>
<dt>preference</dt> <dd>&liberator.host; preferences</dd> <dt>preference</dt> <dd>&dactyl.host; preferences</dd>
<dt>search</dt> <dd>search engines and keywords</dd> <dt>search</dt> <dd>search engines and keywords</dd>
<dt>shellcmd</dt> <dd>shell commands</dd> <dt>shellcmd</dt> <dd>shell commands</dd>
<dt>sidebar</dt> <dd>sidebar panels</dd> <dt>sidebar</dt> <dd>sidebar panels</dd>

View File

@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="marks" name="marks"
title="&liberator.appname; Marks" title="&dactyl.appname; Marks"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="different-marks marks">Marks</h1> <h1 tag="different-marks marks">Marks</h1>
<toc start="2"/> <toc start="2"/>
<p> <p>
&liberator.appname; supports a number of different marks: &dactyl.appname; supports a number of different marks:
</p> </p>
<ul> <ul>
<li>Bookmarks which allow you to mark a web page as one of your favorites for easy access.</li> <li>Bookmarks which allow you to mark a web page as one of your favorites for easy access.</li>
<li>QuickMarks allow you to define up to 62 (a-zA-Z0-9) web sites (or groups of web sites) which you visit most often.</li> <li>QuickMarks allow you to define up to 62 (a-zA-Z0-9) web sites (or groups of web sites) which you visit most often.</li>
<li>Local marks to store the position within a web page.</li> <li>Local marks to store the position within a web page.</li>
<li>History is also a special type of marks, as &liberator.appname; automatically remembers sites which you have visited in the past.</li> <li>History is also a special type of marks, as &dactyl.appname; automatically remembers sites which you have visited in the past.</li>
</ul> </ul>
<h1 tag="bookmarks">Bookmarks</h1> <h1 tag="bookmarks">Bookmarks</h1>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="message" name="message"
title="&liberator.appname; Messages" title="&dactyl.appname; Messages"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="messages">Error and informational messages</h1> <h1 tag="messages">Error and informational messages</h1>
@@ -14,7 +14,7 @@
<tags>message-history</tags> <tags>message-history</tags>
<p> <p>
&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 history. The type of info messages output can be controlled by
the <o>verbose</o> option. The number of stored messages can be set the <o>verbose</o> option. The number of stored messages can be set
with the <o>messages</o> option. with the <o>messages</o> option.

View File

@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="options" name="options"
title="&liberator.appname; Options" title="&dactyl.appname; Options"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="options">Options</h1> <h1 tag="options">Options</h1>
<toc start="2"/> <toc start="2"/>
<p> <p>
&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: achieve special effects. These options come in 5 forms:
</p> </p>
@@ -227,19 +227,19 @@
character) or <em>$<a>VAR</a></em>. <em>%VAR%</em> is also supported on Windows. character) or <em>$<a>VAR</a></em>. <em>%VAR%</em> is also supported on Windows.
</p> </p>
<h2 tag="&liberator.host;-options preferences">Setting &liberator.host; options</h2> <h2 tag="&dactyl.host;-options preferences">Setting &dactyl.host; options</h2>
<p>&liberator.host; options can be viewed and set with the following commands:</p> <p>&dactyl.host; options can be viewed and set with the following commands:</p>
<item> <item>
<tags>:prefs :preferences</tags> <tags>:prefs :preferences</tags>
<spec>:pref[erences]</spec> <spec>:pref[erences]</spec>
<description> <description>
<p> <p>
Show the &liberator.host; preferences dialog. You can change the browser Show the &dactyl.host; preferences dialog. You can change the browser
preferences from this dialog. Be aware that not all &liberator.host; preferences from this dialog. Be aware that not all &dactyl.host;
preferences work, because &liberator.appname; overrides some key bindings and preferences work, because &dactyl.appname; overrides some key bindings and
changes &liberator.host;'s GUI. changes &dactyl.host;'s GUI.
</p> </p>
</description> </description>
</item> </item>
@@ -249,7 +249,7 @@
<spec>:pref[erences]!</spec> <spec>:pref[erences]!</spec>
<description> <description>
<p> <p>
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. preferences.
</p> </p>
</description> </description>
@@ -260,7 +260,7 @@
<spec>:se[t]! <a>preference</a>=<a>value</a></spec> <spec>:se[t]! <a>preference</a>=<a>value</a></spec>
<description> <description>
<p> <p>
Change any &liberator.host; <a>preference</a> (those in the about:config Change any &dactyl.host; <a>preference</a> (those in the about:config
window). You can also reset/delete those preferences with window). You can also reset/delete those preferences with
<ex>:set! <a>preference</a>&amp;</ex>. <ex>:set! <a>preference</a>&amp;</ex>.
</p> </p>
@@ -270,7 +270,7 @@
<tags>overridden-preferences</tags> <tags>overridden-preferences</tags>
<p> <p>
&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 they can be changed to a different value in your RC file using
<ex>:set! <a>preference</a>=<a>value</a></ex> <ex>:set! <a>preference</a>=<a>value</a></ex>
</p> </p>
@@ -371,7 +371,7 @@
<dl> <dl>
<dt>s</dt> <dd>Search engines and keyword URLs</dd> <dt>s</dt> <dd>Search engines and keyword URLs</dd>
<dt>f</dt> <dd>Local files</dd> <dt>f</dt> <dd>Local files</dd>
<dt>l</dt> <dd>&liberator.host; location bar entries (bookmarks and history sorted in an intelligent way)</dd> <dt>l</dt> <dd>&dactyl.host; location bar entries (bookmarks and history sorted in an intelligent way)</dd>
<dt>b</dt> <dd>Bookmarks</dd> <dt>b</dt> <dd>Bookmarks</dd>
<dt>h</dt> <dd>History</dd> <dt>h</dt> <dd>History</dd>
<dt>S</dt> <dd>Search engine suggestions</dd> <dt>S</dt> <dd>Search engine suggestions</dd>
@@ -410,7 +410,7 @@
</p> </p>
<p> <p>
If <o>defsearch</o> is empty, then &liberator.host; will always attempt to If <o>defsearch</o> is empty, then &dactyl.host; will always attempt to
open the raw [arg]. open the raw [arg].
</p> </p>
</description> </description>
@@ -430,7 +430,7 @@
</p> </p>
<warning> <warning>
&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. process, such as with gvim without the -f argument.
</warning> </warning>
</description> </description>
@@ -513,7 +513,7 @@
<type>string</type> <type>string</type>
<default>UTF-8</default> <default>UTF-8</default>
<description> <description>
<p>Changes the character encoding that &liberator.appname; uses to read and write files.</p> <p>Changes the character encoding that &dactyl.appname; uses to read and write files.</p>
</description> </description>
</item> </item>
@@ -644,7 +644,7 @@
<dt>contains</dt> <dd>The typed characters are split on whitespace, and these character groups have to match anywhere inside the text of the link.</dd> <dt>contains</dt> <dd>The typed characters are split on whitespace, and these character groups have to match anywhere inside the text of the link.</dd>
<dt>wordstartswith</dt> <dd>The typed characters are matched with the beginning of the first word (see <o>wordseparators</o>) 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.</dd> <dt>wordstartswith</dt> <dd>The typed characters are matched with the beginning of the first word (see <o>wordseparators</o>) 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.</dd>
<dt>firstletters</dt> <dd>Behaves like wordstartswith, but non-matching words aren't overleaped.</dd> <dt>firstletters</dt> <dd>Behaves like wordstartswith, but non-matching words aren't overleaped.</dd>
<dt>custom</dt> <dd>Delegate to a custom function: liberator.plugins.customHintMatcher(hintString)</dd> <dt>custom</dt> <dd>Delegate to a custom function: dactyl.plugins.customHintMatcher(hintString)</dd>
</dl> </dl>
</description> </description>
</item> </item>
@@ -756,7 +756,7 @@
<description> <description>
<p> <p>
Use Insert mode as the default for text areas. This is useful if you 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 Input fields default to this behaviour irrespective of this option's
setting. setting.
</p> </p>
@@ -814,9 +814,9 @@
<description> <description>
<p> <p>
Load plugin scripts when starting up. When on, yet unloaded plugins 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 <ex>:loadplugins</ex> sourced. To load plugins earlier, use the <ex>:loadplugins</ex>
command within the &liberator.name;rc. command within the &dactyl.name;rc.
</p> </p>
</description> </description>
</item> </item>
@@ -962,7 +962,7 @@
effective. effective.
</p> </p>
<note>This option does not change the popup blocker of &liberator.host; in any way.</note> <note>This option does not change the popup blocker of &dactyl.host; in any way.</note>
</description> </description>
</item> </item>
@@ -985,13 +985,13 @@
<item> <item>
<tags>$&liberator.idname;_RUNTIME</tags> <tags>$&dactyl.idname;_RUNTIME</tags>
<tags>'rtp' 'runtimepath'</tags> <tags>'rtp' 'runtimepath'</tags>
<spec>'runtimepath' 'rtp'</spec> <spec>'runtimepath' 'rtp'</spec>
<type>stringlist</type> <type>stringlist</type>
<default type="plain"><str>$&liberator.idname;_RUNTIME</str> or <default type="plain"><str>$&dactyl.idname;_RUNTIME</str> or
Unix, Mac: <str>~/.&liberator.name;</str>, Unix, Mac: <str>~/.&dactyl.name;</str>,
Windows: <str>~/&liberator.name;</str></default> Windows: <str>~/&dactyl.name;</str></default>
<description> <description>
<p>List of directories searched for runtime files:</p> <p>List of directories searched for runtime files:</p>
@@ -1003,17 +1003,17 @@
<p>Example:</p> <p>Example:</p>
<code><ex>:set runtimepath=<str>~/my&liberator.name;,~/.&liberator.name;</str></ex></code> <code><ex>:set runtimepath=<str>~/my&dactyl.name;,~/.&dactyl.name;</str></ex></code>
<p> <p>
This will search for plugins in both This will search for plugins in both
<str>~/my&liberator.name;/plugin</str> and <str>~/my&dactyl.name;/plugin</str> and
<str>~/.&liberator.name;/plugin</str> <str>~/.&dactyl.name;/plugin</str>
</p> </p>
<p> <p>
On startup, if the environment variable <em>$&liberator.idname;_RUNTIME</em> does not On startup, if the environment variable <em>$&dactyl.idname;_RUNTIME</em> does not
exist, &liberator.appname; will set it to match this value. exist, &dactyl.appname; will set it to match this value.
</p> </p>
</description> </description>
</item> </item>
@@ -1212,15 +1212,15 @@
<tags>'titlestring'</tags> <tags>'titlestring'</tags>
<spec>'titlestring'</spec> <spec>'titlestring'</spec>
<type>string</type> <type>string</type>
<default>&liberator.appname;</default> <default>&dactyl.appname;</default>
<description> <description>
<p> <p>
Change the title of the browser window. &liberator.appname; changes the Change the title of the browser window. &dactyl.appname; changes the
browser title from <str>Title of web page - Mozilla &liberator.host;</str> browser title from <str>Title of web page - Mozilla &dactyl.host;</str>
to <str>Title of web page - &liberator.appname;</str>. If you don't like to <str>Title of web page - &dactyl.appname;</str>. If you don't like
that, you can restore it with: that, you can restore it with:
</p> </p>
<code><ex>:set titlestring=<str>Mozilla &liberator.host;</str></ex></code> <code><ex>:set titlestring=<str>Mozilla &dactyl.host;</str></ex></code>
</description> </description>
</item> </item>
@@ -1266,7 +1266,7 @@
<description> <description>
<p> <p>
Define which info messages are displayed. When bigger than zero, 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 <ex>:messages</ex> command. The highest viewed at any time with the <ex>:messages</ex> command. The highest
value is 15, being the most verbose mode. value is 15, being the most verbose mode.
</p> </p>

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="pattern" name="pattern"
title="&liberator.appname; Patterns" title="&dactyl.appname; Patterns"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="text-search-commands">Text search commands</h1> <h1 tag="text-search-commands">Text search commands</h1>
<toc start="2"/> <toc start="2"/>
<p> <p>
&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 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. this will ever be available.
</p> </p>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="print" name="print"
title="&liberator.appname; Printing" title="&dactyl.appname; Printing"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="printing">Printing</h1> <h1 tag="printing">Printing</h1>
@@ -34,7 +34,7 @@
</item> </item>
<h2 tag="&liberator.host;-print-dialogs">&liberator.host; printing dialogs</h2> <h2 tag="&dactyl.host;-print-dialogs">&dactyl.host; printing dialogs</h2>
<p> <p>
The "Print Preview" and "Page Setup" dialogs can be opened via the <ex>:dialog</ex> The "Print Preview" and "Page Setup" dialogs can be opened via the <ex>:dialog</ex>

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="repeat" name="repeat"
title="&liberator.appname; Repeating Commands" title="&dactyl.appname; Repeating Commands"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="repeating">Repeating commands</h1> <h1 tag="repeating">Repeating commands</h1>
<toc start="2"/> <toc start="2"/>
<p>&liberator.appname; can repeat a number of commands and record macros.</p> <p>&dactyl.appname; can repeat a number of commands and record macros.</p>
<h2 tag="single-repeat">Single repeats</h2> <h2 tag="single-repeat">Single repeats</h2>
@@ -21,7 +21,7 @@
<description> <description>
<p> <p>
Repeat the last keyboard mapping <oa>count</oa> times. Note that, unlike in Vim, this Repeat the last keyboard mapping <oa>count</oa> 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. have them.
</p> </p>
</description> </description>
@@ -139,8 +139,8 @@ function hello2() {
<p>are only available within the scope of the script.</p> <p>are only available within the scope of the script.</p>
<p> <p>
The <tt>.&liberator.name;rc</tt> file in your home directory and any The <tt>.&dactyl.name;rc</tt> file in your home directory and any
files in <tt>~/.&liberator.name;/plugin/</tt> are always files in <tt>~/.&dactyl.name;/plugin/</tt> are always
sourced at startup. <tt>~</tt> is supported as a sourced at startup. <tt>~</tt> is supported as a
shortcut for the <tt>$HOME</tt> directory. If <oa>!</oa> is shortcut for the <tt>$HOME</tt> directory. If <oa>!</oa> is
specified, errors are not printed. specified, errors are not printed.
@@ -155,10 +155,10 @@ function hello2() {
<description> <description>
<p> <p>
Load all unloaded plugins immediately. Because plugins are automatically Load all unloaded plugins immediately. Because plugins are automatically
loaded after &liberator.name;rc is sourced, this command must be placed early loaded after &dactyl.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 in the &dactyl.name;rc file if &dactyl.name;rc also includes commands that are
implemented by plugins. Additionally, this command allows for sourcing implemented by plugins. Additionally, this command allows for sourcing
new plugins without restarting &liberator.appname;. new plugins without restarting &dactyl.appname;.
</p> </p>
</description> </description>
</item> </item>
@@ -194,7 +194,7 @@ function hello2() {
<spec>:fini<oa>sh</oa></spec> <spec>:fini<oa>sh</oa></spec>
<description> <description>
<p> <p>
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. script file.
</p> </p>
</description> </description>
@@ -213,7 +213,7 @@ function hello2() {
which might be slow, so take the results with a grain of salt. which might be slow, so take the results with a grain of salt.
</p> </p>
<p>If <a>code</a> starts with a <ex>:</ex>, it is executed as a &liberator.appname; command.</p> <p>If <a>code</a> starts with a <ex>:</ex>, it is executed as a &dactyl.appname; command.</p>
<p> <p>
Use the special version with <oa>!</oa> if you just want to run any command multiple Use the special version with <oa>!</oa> if you just want to run any command multiple

View File

@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="starting" name="starting"
title="&liberator.appname; Starting" title="&dactyl.appname; Starting"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="starting">Starting &liberator.appname;</h1> <h1 tag="starting">Starting &dactyl.appname;</h1>
<toc start="2"/> <toc start="2"/>
<tags>startup-options</tags> <tags>startup-options</tags>
<p> <p>
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. option. These are passed as single string argument.
E.g., &liberator.hostbin; -&liberator.name; <str>++cmd 'set exrc' +u 'tempRcFile' ++noplugin</str> E.g., &dactyl.hostbin; -&dactyl.name; <str>++cmd 'set exrc' +u 'tempRcFile' ++noplugin</str>
</p> </p>
<item> <item>
@@ -72,24 +72,24 @@
<h2 tag="initialization startup">Initialization</h2> <h2 tag="initialization startup">Initialization</h2>
<p>At startup, &liberator.appname; completes the following tasks in order. </p> <p>At startup, &dactyl.appname; completes the following tasks in order. </p>
<ol> <ol>
<li> &liberator.appname; can perform user initialization commands. When <li> &dactyl.appname; can perform user initialization commands. When
one of the following is successfully located, it is executed, one of the following is successfully located, it is executed,
and no further locations are tried. and no further locations are tried.
<ol> <ol>
<li tag="$&liberator.idname;_INIT"> <li tag="$&dactyl.idname;_INIT">
<em>$&liberator.idname;_INIT</em> — May contain a single Ex command (e.g., <em>$&dactyl.idname;_INIT</em> — May contain a single Ex command (e.g.,
"<ex>:source <a>file</a></ex>"). "<ex>:source <a>file</a></ex>").
</li> </li>
<li tag="$MY_&liberator.idname;RC"> <li tag="$MY_&dactyl.idname;RC">
<em>~/&liberator.name;rc</em> — Windows only. If this file exists, its contents <em>~/&dactyl.name;rc</em> — Windows only. If this file exists, its contents
are executed and <em>$MY_&liberator.idname;RC</em> set to its path. are executed and <em>$MY_&dactyl.idname;RC</em> set to its path.
</li> </li>
<li> <li>
<em>~/.&liberator.name;rc</em> — If this file exists, its contents are executed. <em>~/.&dactyl.name;rc</em> — If this file exists, its contents are executed.
</li> </li>
</ol> </ol>
</li> </li>
@@ -121,7 +121,7 @@ The user's ~ (i.e., "home") directory is determined as follows:
<ul> <ul>
<li>On Unix and Mac, the environment variable <em>$HOME</em> is used.</li> <li>On Unix and Mac, the environment variable <em>$HOME</em> is used.</li>
<li> <li>
On Windows, &liberator.appname; checks for the existence of On Windows, &dactyl.appname; checks for the existence of
<em>%HOME%</em>, then <em>%USERPROFILE%</em>, and then <em>%HOME%</em>, then <em>%USERPROFILE%</em>, and then
<em>%HOMEDRIVE%%HOMEPATH%</em>. It uses the first one it <em>%HOMEDRIVE%%HOMEPATH%</em>. It uses the first one it
finds. finds.
@@ -131,13 +131,13 @@ The user's ~ (i.e., "home") directory is determined as follows:
<h2 tag="save-settings">Saving settings</h2> <h2 tag="save-settings">Saving settings</h2>
<item> <item>
<tags>:mkv :mk&liberator.name;rc</tags> <tags>:mkv :mk&dactyl.name;rc</tags>
<spec>:mkv<oa>imperatorrc</oa><oa>!</oa> <oa>file</oa></spec> <spec>:mkv<oa>imperatorrc</oa><oa>!</oa> <oa>file</oa></spec>
<description> <description>
<p> <p>
Write current key mappings and changed options to <oa>file</oa>. If no Write current key mappings and changed options to <oa>file</oa>. If no
<oa>file</oa> is specified then <em>~/.&liberator.name;rc</em> is written unless this file <oa>file</oa> is specified then <em>~/.&dactyl.name;rc</em> is written unless this file
already exists. The special version <ex>:mk&liberator.name;rc!</ex> will overwrite already exists. The special version <ex>:mk&dactyl.name;rc!</ex> will overwrite
<oa>file</oa> if it exists. <oa>file</oa> if it exists.
</p> </p>
@@ -155,7 +155,7 @@ The user's ~ (i.e., "home") directory is determined as follows:
<tags>:res :restart</tags> <tags>:res :restart</tags>
<spec>:res<oa>tart</oa></spec> <spec>:res<oa>tart</oa></spec>
<description> <description>
<p>Force &liberator.host; to restart. Useful when installing extensions.</p> <p>Force &dactyl.host; to restart. Useful when installing extensions.</p>
</description> </description>
</item> </item>

View File

@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="styling" name="styling"
title="&liberator.appname; Styling" title="&dactyl.appname; Styling"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="styling">Styling the GUI and web pages</h1> <h1 tag="styling">Styling the GUI and web pages</h1>
<toc start="2"/> <toc start="2"/>
<p> <p>
&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 styling is specified via CSS. Although you may style any user interface element
via the <ex>:style</ex> command, most &liberator.appname; elements can be styled with the via the <ex>:style</ex> command, most &dactyl.appname; elements can be styled with the
<ex>:highlight</ex> command, for convenience. <ex>:highlight</ex> command, for convenience.
</p> </p>
@@ -43,7 +43,7 @@
Highlight <a>group</a> with <a>css</a>. <a>css</a> is one or more comma separated CSS Highlight <a>group</a> with <a>css</a>. <a>css</a> is one or more comma separated CSS
declarations (E.g. <em>color: blue; background-color: red</em>). Normally, <a>css</a> is declarations (E.g. <em>color: blue; background-color: red</em>). Normally, <a>css</a> is
checked for valid syntax before it's applied. Once you're certain it's valid, checked for valid syntax before it's applied. Once you're certain it's valid,
<oa>!</oa> can be used to skip the check to speed up &liberator.appname; startup. <a>selector</a> <oa>!</oa> can be used to skip the check to speed up &dactyl.appname; startup. <a>selector</a>
can be any valid CSS selector, such as <ex>:hover</ex>, and, if provided, will can be any valid CSS selector, such as <ex>:hover</ex>, and, if provided, will
restrict the match to matching elements. restrict the match to matching elements.
</p> </p>
@@ -51,7 +51,7 @@
<p>Valid groups are:</p> <p>Valid groups are:</p>
<dl> <dl>
<dt>Bell</dt> <dd>&liberator.appname;'s visual bell</dd> <dt>Bell</dt> <dd>&dactyl.appname;'s visual bell</dd>
<dt>Boolean</dt> <dd>A JavaScript Boolean object</dd> <dt>Boolean</dt> <dd>A JavaScript Boolean object</dd>
<dt>CmdLine</dt> <dd>The command line</dd> <dt>CmdLine</dt> <dd>The command line</dd>
<dt>CmdOutput</dt> <dd></dd> <dt>CmdOutput</dt> <dd></dd>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="tabs" name="tabs"
title="&liberator.appname; Tabs" title="&dactyl.appname; Tabs"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="tabs">Tabs</h1> <h1 tag="tabs">Tabs</h1>
@@ -355,7 +355,7 @@ See <t>opening</t> for other ways to open new tabs.
<spec>:undoa<oa>ll</oa></spec> <spec>:undoa<oa>ll</oa></spec>
<description> <description>
<p> <p>
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. after a browser restart.
</p> </p>
</description> </description>

View File

@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="various" name="various"
title="&liberator.appname; Other" title="&dactyl.appname; Other"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<h1>Other help</h1> <h1>Other help</h1>
@@ -78,7 +78,7 @@
<p> <p>
Warning: Input redirection (&lt; foo) not done, also do not run commands which Warning: Input redirection (&lt; 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. <ex>:! xterm &amp;</ex>). processes, though (e.g. <ex>:! xterm &amp;</ex>).
</p> </p>
</description> </description>
@@ -147,7 +147,7 @@
<spec>:ve<oa>rsion</oa><oa>!</oa></spec> <spec>:ve<oa>rsion</oa><oa>!</oa></spec>
<description> <description>
<p> <p>
Show version information. You can show the &liberator.host; version page with Show version information. You can show the &dactyl.host; version page with
<ex>:version!</ex>. <ex>:version!</ex>.
</p> </p>
</description> </description>

View File

@@ -119,7 +119,7 @@ function writeFile(file, data) {
var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); var ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
var prefService = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefService) 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); var json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
function getCharPref(name) { function getCharPref(name) {
@@ -296,9 +296,9 @@ var storage = {
addObserver: function addObserver(key, callback, ref) { addObserver: function addObserver(key, callback, ref) {
if (ref) { if (ref) {
if (!ref.liberatorStorageRefs) if (!ref.dactylStorageRefs)
ref.liberatorStorageRefs = []; ref.dactylStorageRefs = [];
ref.liberatorStorageRefs.push(callback); ref.dactylStorageRefs.push(callback);
var callbackRef = Cu.getWeakReference(callback); var callbackRef = Cu.getWeakReference(callback);
} }
else { else {
@@ -322,7 +322,7 @@ var storage = {
removeDeadObservers: function () { removeDeadObservers: function () {
for (let [key, ary] in Iterator(observers)) { 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) if (!ary.length)
delete observers[key]; delete observers[key];
} }

View File

@@ -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"); @namespace html url("http://www.w3.org/1999/xhtml");
/* Applied to all content */ /* Applied to all content */
[liberator|activeframe] { [dactyl|activeframe] {
-moz-binding: url(chrome://liberator/content/bindings.xml#frame); -moz-binding: url(chrome://dactyl/content/bindings.xml#frame);
} }
[liberator|highlight~=HintImage], [dactyl|highlight~=HintImage],
[liberator|highlight~=Hint] { [dactyl|highlight~=Hint] {
z-index: 5000; z-index: 5000;
position: absolute !important; position: absolute !important;
} }
[liberator|highlight~=Search] { [dactyl|highlight~=Search] {
display: inline !important; display: inline !important;
} }
/* Applied only to completion buffer and MOW */ /* Applied only to completion buffer and MOW */
@-moz-document @-moz-document
url-prefix(chrome://liberator/) { url-prefix(chrome://dactyl/) {
*:-moz-loading, *:-moz-broken { display: none !important; } *:-moz-loading, *:-moz-broken { display: none !important; }
[liberator|highlight~=Completions] { [dactyl|highlight~=Completions] {
width: 100%; width: 100%;
display: table; display: table;
} }
[liberator|highlight~=CompItem], [dactyl|highlight~=CompItem],
[liberator|highlight~=CompTitle] { [dactyl|highlight~=CompTitle] {
display: table-row; display: table-row;
} }
[liberator|highlight~=Completions] > ul { [dactyl|highlight~=Completions] > ul {
display: table-row; display: table-row;
} }
[liberator|highlight~=CompItem] > *, [dactyl|highlight~=CompItem] > *,
[liberator|highlight~=CompTitle] > * { [dactyl|highlight~=CompTitle] > * {
-moz-binding: url(chrome://liberator/content/bindings.xml#compitem-td); -moz-binding: url(chrome://dactyl/content/bindings.xml#compitem-td);
display: table-cell; display: table-cell;
vertical-align: middle; vertical-align: middle;
} }
[liberator|highlight~=CompMsg] { [dactyl|highlight~=CompMsg] {
height: 1.5em; height: 1.5em;
line-height: 1.5em !important; line-height: 1.5em !important;
} }
@@ -69,11 +69,11 @@
@-moz-document @-moz-document
url-prefix(chrome://) { url-prefix(chrome://) {
.liberator-container > * { .dactyl-container > * {
font-family: inherit; font-family: inherit;
} }
#liberator-completions { #dactyl-completions {
-moz-user-focus: ignore; -moz-user-focus: ignore;
overflow: -moz-scrollbars-none !important; /* does not seem to work fully */ overflow: -moz-scrollbars-none !important; /* does not seem to work fully */
border-width: 0px !important; border-width: 0px !important;
@@ -90,17 +90,17 @@ statusbarpanel {
font-family: monospace; font-family: monospace;
} }
#liberator-statusline { #dactyl-statusline {
font-family: monospace; font-family: monospace;
margin: 0px; margin: 0px;
} }
#liberator-statusline > label { #dactyl-statusline > label {
padding: 0px 0px 0px 8px; padding: 0px 0px 0px 8px;
} }
#liberator-statusline > label:first-child { #dactyl-statusline > label:first-child {
padding: 0px; padding: 0px;
} }
#liberator-statusline-field-url { #dactyl-statusline-field-url {
background-color: inherit; background-color: inherit;
color: inherit; color: inherit;
} }
@@ -113,23 +113,23 @@ statusbarpanel {
display: none; display: none;
} }
#liberator-commandline-prompt { #dactyl-commandline-prompt {
background-color: inherit; background-color: inherit;
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }
#liberator-commandline-command { #dactyl-commandline-command {
background-color: inherit; background-color: inherit;
color: inherit; color: inherit;
margin: 0px; margin: 0px;
} }
#liberator-commandline-command html|*:focus { #dactyl-commandline-command html|*:focus {
outline-width: 0px !important outline-width: 0px !important
} }
#liberator-commandline-command .textbox-search-icons { #dactyl-commandline-command .textbox-search-icons {
visibility: collapse !important; visibility: collapse !important;
} }
#liberator-message { #dactyl-message {
margin: 0px; margin: 0px;
} }
@@ -140,39 +140,39 @@ statusbarpanel {
/* MOW */ /* MOW */
#liberator-completions, #dactyl-completions,
#liberator-multiline-output, #dactyl-multiline-output,
#liberator-multiline-input { #dactyl-multiline-input {
overflow: hidden; overflow: hidden;
background-color: white; background-color: white;
color: black; color: black;
} }
#liberator-completions-content, #dactyl-completions-content,
#liberator-multiline-output-content, #dactyl-multiline-output-content,
#liberator-multiline-input { #dactyl-multiline-input {
white-space: pre; white-space: pre;
font-family: -moz-fixed; font-family: -moz-fixed;
margin: 0px; margin: 0px;
} }
#liberator-completions-content *, #dactyl-completions-content *,
#liberator-multiline-output-content *, #dactyl-multiline-output-content *,
#liberator-commandline-prompt *, #dactyl-commandline-prompt *,
#liberator-commandline-command { #dactyl-commandline-command {
font: inherit; font: inherit;
} }
#liberator-completions-content table, #dactyl-completions-content table,
#liberator-multiline-output-content table { #dactyl-multiline-output-content table {
white-space: inherit; white-space: inherit;
border-spacing: 0px; border-spacing: 0px;
} }
#liberator-completions-content td, #dactyl-completions-content td,
#liberator-multiline-output-content td, #dactyl-multiline-output-content td,
#liberator-completions-content th, #dactyl-completions-content th,
#liberator-multiline-output-content th { #dactyl-multiline-output-content th {
padding: 0px 2px; padding: 0px 2px;
} }

View File

@@ -7,5 +7,5 @@ Inactive/former developers:
Patches: Patches:
* Christian Dietrich (too many to list) * 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. to that AUTHOR file for more contributors.

View File

@@ -59,6 +59,6 @@
2008-04-29: 2008-04-29:
* version 0.1 * 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: // vim: set filetype=asciidoc:

View File

@@ -1,18 +1,18 @@
# Thunderbird # Thunderbird
content muttator content/ content muttator content/
skin muttator classic/1.0 skin/ skin muttator classic/1.0 skin/
locale liberator en-US locale/en-US/ locale dactyl en-US locale/en-US/
content liberator ../common/content/ content dactyl ../common/content/
resource liberator ../common/modules/ resource dactyl ../common/modules/
skin liberator classic/1.0 ../common/skin/ skin dactyl classic/1.0 ../common/skin/
override chrome://liberator/content/liberator.dtd chrome://muttator/content/liberator.dtd override chrome://dactyl/content/dactyl.dtd chrome://muttator/content/dactyl.dtd
override chrome://liberator/content/config.js chrome://muttator/content/config.js 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/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 overlay chrome://messenger/content/messengercompose/messengercompose.xul chrome://muttator/content/compose/compose.xul

View File

@@ -62,9 +62,9 @@ const Addressbook = Module("addressbook", {
if (addresses.length < 1) { if (addresses.length < 1) {
if (!filter) if (!filter)
liberator.echoerr("Exxx: No contacts", commandline.FORCE_SINGLELINE); dactyl.echoerr("Exxx: No contacts", commandline.FORCE_SINGLELINE);
else 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; return false;
} }
@@ -99,9 +99,9 @@ const Addressbook = Module("addressbook", {
displayName = this.generateDisplayName(firstName, lastName); displayName = this.generateDisplayName(firstName, lastName);
if (addressbook.add(mailAddr, firstName, lastName, displayName)) 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 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; var to = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor;
} }
catch (e) { catch (e) {
liberator.beep(); dactyl.beep();
} }
if (!to) if (!to)

View File

@@ -0,0 +1,4 @@
<!ENTITY dactyl.mainWindow "msgcomposeWindow">
<!ENTITY dactyl.name "muttator">
<!ENTITY dactyl.statusBefore "">
<!ENTITY dactyl.statusAfter "statusText">

View File

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ***** BEGIN LICENSE BLOCK ***** {{{
// Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
}}} ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://dactyl/skin/dactyl.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "dactyl.dtd" [
<!ENTITY dactyl.content "chrome://dactyl/content/">
]>
<overlay id="dactyl"
xmlns:dactyl="http://vimperator.org/namespaces/liberator"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript;version=1.8" src="&dactyl.content;dactyl-overlay.js"/>
<window id="&dactyl.mainWindow;">
<keyset id="mainKeyset">
<key id="key_open_vimbar" key=":" oncommand="dactyl.modules.commandline.open(':', '', dactyl.modules.modes.EX);" modifiers=""/>
<key id="key_stop" keycode="VK_ESCAPE" oncommand="dactyl.modules.events.onEscape();"/>
<!-- other keys are handled inside the event loop in events.js -->
</keyset>
<popupset>
<panel id="dactyl-visualbell" dactyl:highlight="Bell"/>
</popupset>
<!--this notifies us also of focus events in the XUL
from: http://developer.mozilla.org/en/docs/XUL_Tutorial:Updating_Commands !-->
<commandset id="onPentadactylFocus"
commandupdater="true"
events="focus"
oncommandupdate="if (dactyl.modules.events != undefined) dactyl.modules.events.onFocusChange(event);"/>
<commandset id="onPentadactylSelect"
commandupdater="true"
events="select"
oncommandupdate="if (dactyl.modules.events != undefined) dactyl.modules.events.onSelectionChange(event);"/>
<!-- As of Firefox 3.1pre, <iframe>.height changes do not seem to have immediate effect,
therefore we need to put them into a <vbox> for which that works just fine -->
<vbox class="dactyl-container" hidden="false" collapsed="true">
<iframe id="dactyl-multiline-output" src="chrome://dactyl/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
</vbox>
<vbox class="dactyl-container" hidden="false" collapsed="true">
<iframe id="dactyl-completions" src="chrome://dactyl/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="dactyl.modules.commandline.onMultilineOutputEvent(event)"/>
</vbox>
<stack orient="horizontal" align="stretch" class="dactyl-container" dactyl:highlight="CmdLine">
<textbox class="plain" id="dactyl-message" flex="1" readonly="true" dactyl:highlight="Normal"/>
<hbox id="dactyl-commandline" hidden="false" collapsed="true" class="dactyl-container" dactyl:highlight="Normal">
<label class="plain" id="dactyl-commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
<textbox class="plain" id="dactyl-commandline-command" flex="1" type="timed" timeout="100"
oninput="dactyl.modules.commandline.onEvent(event);"
onkeyup="dactyl.modules.commandline.onEvent(event);"
onfocus="dactyl.modules.commandline.onEvent(event);"
onblur="dactyl.modules.commandline.onEvent(event);"/>
</hbox>
</stack>
<vbox class="dactyl-container" hidden="false" collapsed="false">
<textbox id="dactyl-multiline-input" class="plain" flex="1" rows="1" hidden="false" collapsed="true" multiline="true"
onkeypress="dactyl.modules.commandline.onMultilineInputEvent(event);"
oninput="dactyl.modules.commandline.onMultilineInputEvent(event);"
onblur="dactyl.modules.commandline.onMultilineInputEvent(event);"/>
</vbox>
</window>
<statusbar id="status-bar" dactyl:highlight="StatusLine">
<hbox insertbefore="&dactyl.statusBefore;" insertafter="&dactyl.statusAfter;"
id="dactyl-statusline" flex="1" hidden="false" align="center">
<textbox class="plain" id="dactyl-statusline-field-url" readonly="false" flex="1" crop="end"/>
<label class="plain" id="dactyl-statusline-field-inputbuffer" flex="0"/>
<label class="plain" id="dactyl-statusline-field-progress" flex="0"/>
<label class="plain" id="dactyl-statusline-field-tabcount" flex="0"/>
<label class="plain" id="dactyl-statusline-field-bufferposition" flex="0"/>
</hbox>
<!-- just hide them since other elements expect them -->
<statusbarpanel id="statusbar-display" hidden="true"/>
<statusbarpanel id="statusbar-progresspanel" hidden="true"/>
</statusbar>
</overlay>
<!-- vim: set fdm=marker sw=4 ts=4 et: -->

View File

@@ -1,4 +0,0 @@
<!ENTITY liberator.mainWindow "msgcomposeWindow">
<!ENTITY liberator.name "muttator">
<!ENTITY liberator.statusBefore "">
<!ENTITY liberator.statusAfter "statusText">

View File

@@ -1,98 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- ***** BEGIN LICENSE BLOCK ***** {{{
// Copyright (c) 2006-2009 by Martin Stubenschrott <stubenschrott@vimperator.org>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
}}} ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://liberator/skin/liberator.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "liberator.dtd" [
<!ENTITY liberator.content "chrome://liberator/content/">
]>
<overlay id="liberator"
xmlns:liberator="http://vimperator.org/namespaces/liberator"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:nc="http://home.netscape.com/NC-rdf#"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript;version=1.8" src="&liberator.content;liberator-overlay.js"/>
<window id="&liberator.mainWindow;">
<keyset id="mainKeyset">
<key id="key_open_vimbar" key=":" oncommand="liberator.modules.commandline.open(':', '', liberator.modules.modes.EX);" modifiers=""/>
<key id="key_stop" keycode="VK_ESCAPE" oncommand="liberator.modules.events.onEscape();"/>
<!-- other keys are handled inside the event loop in events.js -->
</keyset>
<popupset>
<panel id="liberator-visualbell" liberator:highlight="Bell"/>
</popupset>
<!--this notifies us also of focus events in the XUL
from: http://developer.mozilla.org/en/docs/XUL_Tutorial:Updating_Commands !-->
<commandset id="onVimperatorFocus"
commandupdater="true"
events="focus"
oncommandupdate="if (liberator.modules.events != undefined) liberator.modules.events.onFocusChange(event);"/>
<commandset id="onVimperatorSelect"
commandupdater="true"
events="select"
oncommandupdate="if (liberator.modules.events != undefined) liberator.modules.events.onSelectionChange(event);"/>
<!-- As of Firefox 3.1pre, <iframe>.height changes do not seem to have immediate effect,
therefore we need to put them into a <vbox> for which that works just fine -->
<vbox class="liberator-container" hidden="false" collapsed="true">
<iframe id="liberator-multiline-output" src="chrome://liberator/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="liberator.modules.commandline.onMultilineOutputEvent(event)"/>
</vbox>
<vbox class="liberator-container" hidden="false" collapsed="true">
<iframe id="liberator-completions" src="chrome://liberator/content/buffer.xhtml"
flex="1" hidden="false" collapsed="false"
onclick="liberator.modules.commandline.onMultilineOutputEvent(event)"/>
</vbox>
<stack orient="horizontal" align="stretch" class="liberator-container" liberator:highlight="CmdLine">
<textbox class="plain" id="liberator-message" flex="1" readonly="true" liberator:highlight="Normal"/>
<hbox id="liberator-commandline" hidden="false" collapsed="true" class="liberator-container" liberator:highlight="Normal">
<label class="plain" id="liberator-commandline-prompt" flex="0" crop="end" value="" collapsed="true"/>
<textbox class="plain" id="liberator-commandline-command" flex="1" type="timed" timeout="100"
oninput="liberator.modules.commandline.onEvent(event);"
onkeyup="liberator.modules.commandline.onEvent(event);"
onfocus="liberator.modules.commandline.onEvent(event);"
onblur="liberator.modules.commandline.onEvent(event);"/>
</hbox>
</stack>
<vbox class="liberator-container" hidden="false" collapsed="false">
<textbox id="liberator-multiline-input" class="plain" flex="1" rows="1" hidden="false" collapsed="true" multiline="true"
onkeypress="liberator.modules.commandline.onMultilineInputEvent(event);"
oninput="liberator.modules.commandline.onMultilineInputEvent(event);"
onblur="liberator.modules.commandline.onMultilineInputEvent(event);"/>
</vbox>
</window>
<statusbar id="status-bar" liberator:highlight="StatusLine">
<hbox insertbefore="&liberator.statusBefore;" insertafter="&liberator.statusAfter;"
id="liberator-statusline" flex="1" hidden="false" align="center">
<textbox class="plain" id="liberator-statusline-field-url" readonly="false" flex="1" crop="end"/>
<label class="plain" id="liberator-statusline-field-inputbuffer" flex="0"/>
<label class="plain" id="liberator-statusline-field-progress" flex="0"/>
<label class="plain" id="liberator-statusline-field-tabcount" flex="0"/>
<label class="plain" id="liberator-statusline-field-bufferposition" flex="0"/>
</hbox>
<!-- just hide them since other elements expect them -->
<statusbarpanel id="statusbar-display" hidden="true"/>
<statusbarpanel id="statusbar-progresspanel" hidden="true"/>
</statusbar>
</overlay>
<!-- vim: set fdm=marker sw=4 ts=4 et: -->

View File

@@ -12,7 +12,7 @@ const Config = Module("config", ConfigBase, {
/*** required options, no checks done if they really exist, so be careful ***/ /*** required options, no checks done if they really exist, so be careful ***/
name: "Muttator", name: "Muttator",
hostApplication: "Thunderbird", // TODO: can this be found out otherwise? gBrandBundle.getString("brandShortName"); hostApplication: "Thunderbird", // TODO: can this be found out otherwise? gBrandBundle.getString("brandShortName");
// Yes, but it will be localized unlike all other strings. So, it's best left until we i18n liberator. --djk // Yes, but it will be localized unlike all other strings. So, it's best left until we i18n dactyl. --djk
get mainWindowId() this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow", get mainWindowId() this.isComposeWindow ? "msgcomposeWindow" : "messengerWindow",
@@ -94,11 +94,11 @@ const Config = Module("config", ConfigBase, {
focusChange: function (win) { focusChange: function (win) {
// we switch to -- MESSAGE -- mode for Muttator, when the main HTML widget gets focus // we switch to -- MESSAGE -- mode for Muttator, when the main HTML widget gets focus
if (win && win.document instanceof HTMLDocument || liberator.focus instanceof HTMLAnchorElement) { if (win && win.document instanceof HTMLDocument || dactyl.focus instanceof HTMLAnchorElement) {
if (config.isComposeWindow) if (config.isComposeWindow)
modes.set(modes.INSERT, modes.TEXTAREA); modes.set(modes.INSERT, modes.TEXTAREA);
else if (liberator.mode != modes.MESSAGE) else if (dactyl.mode != modes.MESSAGE)
liberator.mode = modes.MESSAGE; dactyl.mode = modes.MESSAGE;
} }
}, },

View File

@@ -0,0 +1,13 @@
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
%dactylBranding;
<!ENTITY dactyl.mainWindow "messengerWindow">
<!ENTITY dactyl.name "muttator">
<!ENTITY dactyl.idname "muttator">
<!ENTITY dactyl.appname "Muttator">
<!ENTITY dactyl.host "&brandShortName;">
<!ENTITY dactyl.hostbin "thunderbird">
<!ENTITY dactyl.statusBefore "">
<!ENTITY dactyl.statusAfter "statusTextBox">

View File

@@ -1,13 +0,0 @@
<!ENTITY % liberatorBranding SYSTEM "chrome://branding/locale/brand.dtd">
%liberatorBranding;
<!ENTITY liberator.mainWindow "messengerWindow">
<!ENTITY liberator.name "muttator">
<!ENTITY liberator.idname "muttator">
<!ENTITY liberator.appname "Muttator">
<!ENTITY liberator.host "&brandShortName;">
<!ENTITY liberator.hostbin "thunderbird">
<!ENTITY liberator.statusBefore "">
<!ENTITY liberator.statusAfter "statusTextBox">

View File

@@ -71,17 +71,17 @@ const Mail = Module("mail", {
_moveOrCopy: function (copy, destinationFolder, operateOnThread) { _moveOrCopy: function (copy, destinationFolder, operateOnThread) {
let folders = mail.getFolders(destinationFolder); let folders = mail.getFolders(destinationFolder);
if (folders.length == 0) if (folders.length == 0)
return void liberator.echoerr("Exxx: No matching folder for " + destinationFolder); return void dactyl.echoerr("Exxx: No matching folder for " + destinationFolder);
else if (folders.length > 1) else if (folders.length > 1)
return liberator.echoerr("Exxx: More than one match for " + destinationFolder); return dactyl.echoerr("Exxx: More than one match for " + destinationFolder);
let count = gDBView.selection.count; let count = gDBView.selection.count;
if (!count) if (!count)
return void liberator.beep(); return void dactyl.beep();
(copy ? MsgCopyMessage : MsgMoveMessage)(folders[0]); (copy ? MsgCopyMessage : MsgMoveMessage)(folders[0]);
setTimeout(function () { setTimeout(function () {
liberator.echomsg(count + " message(s) " + (copy ? "copied" : "moved") + " to " + folders[0].prettyName, 1); dactyl.echomsg(count + " message(s) " + (copy ? "copied" : "moved") + " to " + folders[0].prettyName, 1);
}, 100); }, 100);
}, },
@@ -115,7 +115,7 @@ const Mail = Module("mail", {
i += direction; i += direction;
} }
if (!folder || count > 0) if (!folder || count > 0)
liberator.beep(); dactyl.beep();
else else
gFolderTreeView.selection.timedSelect(c + folder, 500); gFolderTreeView.selection.timedSelect(c + folder, 500);
}, },
@@ -169,7 +169,7 @@ const Mail = Module("mail", {
let url = args.attachments.pop(); let url = args.attachments.pop();
let file = io.getFile(url); let file = io.getFile(url);
if (!file.exists()) if (!file.exists())
return void liberator.echoerr("Exxx: Could not attach file `" + url + "'", commandline.FORCE_SINGLELINE); return void dactyl.echoerr("Exxx: Could not attach file `" + url + "'", commandline.FORCE_SINGLELINE);
attachment = Cc["@mozilla.org/messengercompose/attachment;1"].createInstance(Ci.nsIMsgAttachment); attachment = Cc["@mozilla.org/messengercompose/attachment;1"].createInstance(Ci.nsIMsgAttachment);
attachment.url = "file://" + file.path; attachment.url = "file://" + file.path;
@@ -354,7 +354,7 @@ const Mail = Module("mail", {
} }
catch (e) { catch (e) {
msgs = folder.getMessages(msgWindow); // for older thunderbirds msgs = folder.getMessages(msgWindow); // for older thunderbirds
liberator.dump("WARNING: " + folder.prettyName + " failed to getMessages, trying old API"); dactyl.dump("WARNING: " + folder.prettyName + " failed to getMessages, trying old API");
//continue; //continue;
} }
@@ -376,7 +376,7 @@ const Mail = Module("mail", {
// TODO: finally for the "rest" of the current folder // TODO: finally for the "rest" of the current folder
liberator.beep(); dactyl.beep();
}, },
setHTML: function (value) { setHTML: function (value) {
@@ -403,8 +403,8 @@ const Mail = Module("mail", {
let folder = mail.getFolders(arg, true, true)[count]; let folder = mail.getFolders(arg, true, true)[count];
if (!folder) if (!folder)
liberator.echoerr("Exxx: Folder \"" + arg + "\" does not exist"); dactyl.echoerr("Exxx: Folder \"" + arg + "\" does not exist");
else if (liberator.forceNewTab) else if (dactyl.forceNewTab)
MsgOpenNewTabForFolder(folder.URI); MsgOpenNewTabForFolder(folder.URI);
else else
SelectFolder(folder.URI); SelectFolder(folder.URI);
@@ -435,7 +435,7 @@ const Mail = Module("mail", {
// TODO: is there a better way to check for validity? // TODO: is there a better way to check for validity?
if (addresses.some(function (recipient) !(/\S@\S+\.\S/.test(recipient)))) if (addresses.some(function (recipient) !(/\S@\S+\.\S/.test(recipient))))
return void liberator.echoerr("Exxx: Invalid e-mail address"); return void dactyl.echoerr("Exxx: Invalid e-mail address");
mail.composeNewMail(mailargs); mail.composeNewMail(mailargs);
}, },
@@ -499,7 +499,7 @@ const Mail = Module("mail", {
"Open the message in new tab", "Open the message in new tab",
function () { function () {
if (gDBView && gDBView.selection.count < 1) if (gDBView && gDBView.selection.count < 1)
return void liberator.beep(); return void dactyl.beep();
MsgOpenNewTabForMessage(); MsgOpenNewTabForMessage();
}); });
@@ -558,7 +558,7 @@ const Mail = Module("mail", {
let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase(); let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, false, count); mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, false, count);
} }
catch (e) { liberator.beep(); } catch (e) { dactyl.beep(); }
}, },
{ count: true }); { count: true });
@@ -569,7 +569,7 @@ const Mail = Module("mail", {
let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase(); let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, true, count); mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, true, count);
} }
catch (e) { liberator.beep(); } catch (e) { dactyl.beep(); }
}, },
{ count: true }); { count: true });
@@ -586,7 +586,7 @@ const Mail = Module("mail", {
commandline.open(":", "mail " + to + " -subject=", modes.EX); commandline.open(":", "mail " + to + " -subject=", modes.EX);
} }
catch (e) { catch (e) {
liberator.beep(); dactyl.beep();
} }
}); });
@@ -634,7 +634,7 @@ const Mail = Module("mail", {
if (messenger.canUndo()) if (messenger.canUndo())
messenger.undo(msgWindow); messenger.undo(msgWindow);
else else
liberator.beep(); dactyl.beep();
}); });
mappings.add(myModes, ["<C-r>"], mappings.add(myModes, ["<C-r>"],
"Redo", "Redo",
@@ -642,7 +642,7 @@ const Mail = Module("mail", {
if (messenger.canRedo()) if (messenger.canRedo())
messenger.redo(msgWindow); messenger.redo(msgWindow);
else else
liberator.beep(); dactyl.beep();
}); });
// GETTING MAIL // GETTING MAIL
@@ -699,7 +699,7 @@ const Mail = Module("mail", {
if (folder) if (folder)
SelectFolder(folder.URI); SelectFolder(folder.URI);
else else
liberator.beep(); dactyl.beep();
}, },
{ count: true }); { count: true });
@@ -789,7 +789,7 @@ const Mail = Module("mail", {
"Label message", "Label message",
function (arg) { function (arg) {
if (!GetSelectedMessages()) if (!GetSelectedMessages())
return void liberator.beep(); return void dactyl.beep();
switch (arg) { switch (arg) {
case "r": MsgMarkMsgAsRead(); break; case "r": MsgMarkMsgAsRead(); break;
@@ -799,7 +799,7 @@ const Mail = Module("mail", {
case "p": ToggleMessageTagKey(3); break; // Personal case "p": ToggleMessageTagKey(3); break; // Personal
case "t": ToggleMessageTagKey(4); break; // TODO case "t": ToggleMessageTagKey(4); break; // TODO
case "l": ToggleMessageTagKey(5); break; // Later case "l": ToggleMessageTagKey(5); break; // Later
default: liberator.beep(); default: dactyl.beep();
} }
}, },
{ {
@@ -811,7 +811,7 @@ const Mail = Module("mail", {
"Mark current folder as read", "Mark current folder as read",
function () { function () {
if (mail.currentFolder.isServer) if (mail.currentFolder.isServer)
return liberator.beep(); return dactyl.beep();
mail.currentFolder.markAllMessagesRead(msgWindow); mail.currentFolder.markAllMessagesRead(msgWindow);
}); });
@@ -846,7 +846,7 @@ const Mail = Module("mail", {
let subject = gDBView.hdrForFirstSelectedMessage.mime2DecodedSubject; let subject = gDBView.hdrForFirstSelectedMessage.mime2DecodedSubject;
util.copyToClipboard(subject, true); util.copyToClipboard(subject, true);
} }
catch (e) { liberator.beep(); } catch (e) { dactyl.beep(); }
}); });
mappings.add(myModes, ["y"], mappings.add(myModes, ["y"],
@@ -858,7 +858,7 @@ const Mail = Module("mail", {
else else
util.copyToClipboard(gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor, true); util.copyToClipboard(gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor, true);
} }
catch (e) { liberator.beep(); } catch (e) { dactyl.beep(); }
}); });
// RSS specific mappings // RSS specific mappings
@@ -871,7 +871,7 @@ const Mail = Module("mail", {
// TODO: what to do for non-rss message? // TODO: what to do for non-rss message?
} }
catch (e) { catch (e) {
liberator.beep(); dactyl.beep();
} }
}); });
}, },

View File

@@ -14,10 +14,10 @@
sodipodi:version="0.32" sodipodi:version="0.32"
inkscape:version="0.46" inkscape:version="0.46"
version="1.0" version="1.0"
sodipodi:docbase="/home/maxauthority/code/vimperator" sodipodi:docbase="/home/maxauthority/code/pentadactyl"
sodipodi:docname="muttator.svg" sodipodi:docname="muttator.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape" inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:export-filename="/home/maxauthority/code/vimperator/vimperator.png" inkscape:export-filename="/home/maxauthority/code/pentadactyl/pentadactyl.png"
inkscape:export-xdpi="90" inkscape:export-xdpi="90"
inkscape:export-ydpi="90"> inkscape:export-ydpi="90">
<defs <defs

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -3,7 +3,7 @@
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2009 Aug 27 " Last Change: 2009 Aug 27
" TODO: make this muttator specific - shared liberator config? " TODO: make this muttator specific - shared dactyl config?
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish

View File

@@ -9,9 +9,9 @@
<em:creator>Martin Stubenschrott</em:creator> <em:creator>Martin Stubenschrott</em:creator>
<em:homepageURL>http://vimperator.org/</em:homepageURL> <em:homepageURL>http://vimperator.org/</em:homepageURL>
<em:iconURL>chrome://muttator/skin/icon.png</em:iconURL> <em:iconURL>chrome://muttator/skin/icon.png</em:iconURL>
<em:optionsURL>chrome://liberator/content/preferences.xul</em:optionsURL> <em:optionsURL>chrome://dactyl/content/preferences.xul</em:optionsURL>
<em:file> <em:file>
<Description about="urn:mozilla:extension:file:vimperator.jar"> <Description about="urn:mozilla:extension:file:pentadactyl.jar">
<em:package>content/muttator/</em:package> <em:package>content/muttator/</em:package>
</Description> </Description>
</em:file> </em:file>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE overlay SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE overlay SYSTEM "chrome://dactyl/content/dactyl.dtd">
<overlay <overlay
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE overlay SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE overlay SYSTEM "chrome://dactyl/content/dactyl.dtd">
<overlay <overlay
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
@@ -16,11 +16,11 @@
<dt>PageLoadPre</dt> <dd>Triggered after a page load is initiated</dd> <dt>PageLoadPre</dt> <dd>Triggered after a page load is initiated</dd>
<dt>PageLoad</dt> <dd>Triggered when a page gets (re)loaded/opened</dd> <dt>PageLoad</dt> <dd>Triggered when a page gets (re)loaded/opened</dd>
<dt>ShellCmdPost</dt> <dd>Triggered after executing a shell command with <ex>:!</ex><a>cmd</a></dd> <dt>ShellCmdPost</dt> <dd>Triggered after executing a shell command with <ex>:!</ex><a>cmd</a></dd>
<dt>&liberator.appname;Enter</dt> <dd>Triggered after &liberator.host; starts</dd> <dt>&dactyl.appname;Enter</dt> <dd>Triggered after &dactyl.host; starts</dd>
<dt>&liberator.appname;LeavePre</dt><dd>Triggered before exiting &liberator.host;, just before destroying each module</dd> <dt>&dactyl.appname;LeavePre</dt><dd>Triggered before exiting &dactyl.host;, just before destroying each module</dd>
<dt>&liberator.appname;Leave</dt> <dd>Triggered before exiting &liberator.host;</dd> <dt>&dactyl.appname;Leave</dt> <dd>Triggered before exiting &dactyl.host;</dd>
<dt>FolderLoad</dt> <dd>Triggered after switching folders in &liberator.host;</dd> <dt>FolderLoad</dt> <dd>Triggered after switching folders in &dactyl.host;</dd>
</dl> </dl>
<dl tag="autocommand-args" replace="autocommand-args"> <dl tag="autocommand-args" replace="autocommand-args">

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE overlay SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE overlay SYSTEM "chrome://dactyl/content/dactyl.dtd">
<overlay <overlay
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<dl tag="dialog-list" replace="dialog-list"> <dl tag="dialog-list" replace="dialog-list">
<dt>about</dt> <dd>About &liberator.host;</dd> <dt>about</dt> <dd>About &dactyl.host;</dd>
<dt>addons</dt> <dd>Manage Add-ons</dd> <dt>addons</dt> <dd>Manage Add-ons</dd>
<dt>addressbook</dt> <dd>Address book</dd> <dt>addressbook</dt> <dd>Address book</dd>
<dt>checkupdates</dt> <dd>Check for updates</dd> <dt>checkupdates</dt> <dd>Check for updates</dd>
@@ -18,7 +18,7 @@
<dt>openfile</dt> <dd>Open the file selector dialog</dd> <dt>openfile</dt> <dd>Open the file selector dialog</dd>
<dt>pageinfo</dt> <dd>Show information about the current page</dd> <dt>pageinfo</dt> <dd>Show information about the current page</dd>
<dt>pagesource</dt> <dd>View page source</dd> <dt>pagesource</dt> <dd>View page source</dd>
<dt>preferences</dt> <dd>Show &liberator.host; preferences dialog</dd> <dt>preferences</dt> <dd>Show &dactyl.host; preferences dialog</dd>
<dt>printsetup</dt> <dd>Setup the page size and orientation before printing</dd> <dt>printsetup</dt> <dd>Setup the page size and orientation before printing</dd>
<dt>print</dt> <dd>Show print dialog</dd> <dt>print</dt> <dd>Show print dialog</dd>
<dt>saveframe</dt> <dd>Save frame to disk</dd> <dt>saveframe</dt> <dd>Save frame to disk</dd>

View File

@@ -1,38 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="chrome://liberator/content/help.xsl"?> <?xml-stylesheet type="text/xsl" href="chrome://dactyl/content/help.xsl"?>
<!DOCTYPE document SYSTEM "chrome://liberator/content/liberator.dtd"> <!DOCTYPE document SYSTEM "chrome://dactyl/content/dactyl.dtd">
<document <document
name="intro" name="intro"
title="&liberator.appname; Introduction" title="&dactyl.appname; Introduction"
xmlns="http://vimperator.org/namespaces/liberator" xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml"> xmlns:html="http://www.w3.org/1999/xhtml">
<logo/> <logo/>
<html:p style="text-align: center; font-weight: bold;">
First there was a Navigator, then there was an Explorer.
Later it was time for a Konqueror. Now it's time for an Imperator, the
VIMperator :)
</html:p>
<h1 tag="intro">Introduction</h1> <h1 tag="intro">Introduction</h1>
<link topic="http://vimperator.org">&liberator.appname;</link> is a free browser add-on for &liberator.host;, <link topic="http://vimperator.org">&dactyl.appname;</link> is a free browser add-on for &dactyl.host;,
which makes it look and behave like the which makes it look and behave like the
<link topic="http://www.vim.org">Vim</link> <link topic="http://www.vim.org">Vim</link>
text editor. It has similar key bindings, and you could call it a modal text editor. It has similar key bindings, and you could call it a modal
web browser, as key bindings differ according to which mode you are in. web browser, as key bindings differ according to which mode you are in.
<warning tag="warning"> <warning tag="warning">
To provide the most authentic Vim experience, the &liberator.host; menubar and toolbar are hidden. To provide the most authentic Vim experience, the &dactyl.host; menubar and toolbar are hidden.
</warning> </warning>
<p>If you really need them, type: <ex>:set guioptions+=mT</ex> to get them back.</p> <p>If you really need them, type: <ex>:set guioptions+=mT</ex> to get them back.</p>
<p> <p>
If you don't like &liberator.appname; at all, you can uninstall it by typing If you don't like &dactyl.appname; at all, you can uninstall it by typing
<ex>:extdelete &liberator.appname;</ex> or <ex>:extdisable &liberator.appname;</ex> to disable it. <ex>:extdelete &dactyl.appname;</ex> or <ex>:extdisable &dactyl.appname;</ex> to disable it.
</p> </p>
<p> <p>
If you like it but can't remember the shortcuts, then press If you like it but can't remember the shortcuts, then press
@@ -41,21 +35,21 @@ web browser, as key bindings differ according to which mode you are in.
<tags>author donaton sponsor</tags> <tags>author donaton sponsor</tags>
<p> <p>
&liberator.appname; was initially written by &dactyl.appname; was initially written by
<link topic="mailto:stubenschrott@vimperator.org">Martin <link topic="mailto:stubenschrott@vimperator.org">Martin
Stubenschrott</link> but has found many other Stubenschrott</link> but has found many other
<link topic="http://vimperator.org/trac/wiki/&liberator.appname;/Authors">contributors</link> <link topic="http://vimperator.org/trac/wiki/&dactyl.appname;/Authors">contributors</link>
in the meanwhile. If you appreciate the work on &liberator.appname; and want to in the meanwhile. If you appreciate the work on &dactyl.appname; and want to
encourage us working on it more, you can send us greetings, patches, or encourage us working on it more, you can send us greetings, patches, or
donations (thanks a lot to donations (thanks a lot to
<link topic="http://vimperator.org/trac/wiki/&liberator.appname;/Donors">these <link topic="http://vimperator.org/trac/wiki/&dactyl.appname;/Donors">these
people</link> people</link>
who already did): who already did):
</p> </p>
<html:form style="text-align: center;" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <html:form style="text-align: center;" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick"/> <input type="hidden" name="cmd" value="_s-xclick"/>
<input type="image" src="chrome://liberator/content/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/> <input type="image" src="chrome://dactyl/content/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"/>
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBDDJfc+lXLBSAM9XSWv/ebzG/L7PTqYiIXaWVg8pfinDsfYaAcifcgCTuApg4v/VaZIQ/hLODzQu2EvmjGXP0twErA/Q8G5gx0l197PJSyVXb1sLwd1mgOdLF4t0HmDCdEI9z3H6CMhsb3xVwlfpzllSfCIqzlSpx4QtdzEZGzLDELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI8ZOwn5QkHgaAgZjjtPQxB7Vw2rS7Voap9y+xdVLoczUQ97hw+bOdZLcGykBtfoVjdn76MS51QKjGp1fEmxkqTuQ+Fxv8+OVtHu0QF/qlrhmC3fJBRJ0IFWxKdXS+Wod4615BDaG2X1hzvCL443ffka8XlLSiFTuW43BumQs/O+6Jqsk2hcReP3FIQOvtWMSgGTALnZx7x5c60u/3NSKW5qvyWKCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA3MDMyMTIyMzI1OFowIwYJKoZIhvcNAQkEMRYEFCirrvlwYVHQiNEEbM6ikfx9+Dm5MA0GCSqGSIb3DQEBAQUABIGAtbsR8GdCdURLziozXLSdtY+zJZUPPeQFXXy2V1S/3ldiN+pRvd4HI7xz8mOY1UaKJZpwZnOosy9MflL1/hbiEtEyQ2Dm/s4jnTcJng/NjLIZu+0NYxXRJhB+zMJubnMMMjzNrGlqI4F2HAB/bCA1eOJ5B83Of3dA4rk/T/8GoSQ=-----END PKCS7-----"/> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBDDJfc+lXLBSAM9XSWv/ebzG/L7PTqYiIXaWVg8pfinDsfYaAcifcgCTuApg4v/VaZIQ/hLODzQu2EvmjGXP0twErA/Q8G5gx0l197PJSyVXb1sLwd1mgOdLF4t0HmDCdEI9z3H6CMhsb3xVwlfpzllSfCIqzlSpx4QtdzEZGzLDELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI8ZOwn5QkHgaAgZjjtPQxB7Vw2rS7Voap9y+xdVLoczUQ97hw+bOdZLcGykBtfoVjdn76MS51QKjGp1fEmxkqTuQ+Fxv8+OVtHu0QF/qlrhmC3fJBRJ0IFWxKdXS+Wod4615BDaG2X1hzvCL443ffka8XlLSiFTuW43BumQs/O+6Jqsk2hcReP3FIQOvtWMSgGTALnZx7x5c60u/3NSKW5qvyWKCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTAeFw0wNDAyMTMxMDEzMTVaFw0zNTAyMTMxMDEzMTVaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwUdO3fxEzEtcnI7ZKZL412XvZPugoni7i7D7prCe0AtaHTc97CYgm7NsAtJyxNLixmhLV8pyIEaiHXWAh8fPKW+R017+EmXrr9EaquPmsVvTywAAE1PMNOKqo2kl4Gxiz9zZqIajOm1fZGWcGS0f5JQ2kBqNbvbg2/Za+GJ/qwUCAwEAAaOB7jCB6zAdBgNVHQ4EFgQUlp98u8ZvF71ZP1LXChvsENZklGswgbsGA1UdIwSBszCBsIAUlp98u8ZvF71ZP1LXChvsENZklGuhgZSkgZEwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAgV86VpqAWuXvX6Oro4qJ1tYVIT5DgWpE692Ag422H7yRIr/9j/iKG4Thia/Oflx4TdL+IFJBAyPK9v6zZNZtBgPBynXb048hsP16l2vi0k5Q2JKiPDsEfBhGI+HnxLXEaUWAcVfCsQFvd2A1sxRr67ip5y2wwBelUecP3AjJ+YcxggGaMIIBlgIBATCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTA3MDMyMTIyMzI1OFowIwYJKoZIhvcNAQkEMRYEFCirrvlwYVHQiNEEbM6ikfx9+Dm5MA0GCSqGSIb3DQEBAQUABIGAtbsR8GdCdURLziozXLSdtY+zJZUPPeQFXXy2V1S/3ldiN+pRvd4HI7xz8mOY1UaKJZpwZnOosy9MflL1/hbiEtEyQ2Dm/s4jnTcJng/NjLIZu+0NYxXRJhB+zMJubnMMMjzNrGlqI4F2HAB/bCA1eOJ5B83Of3dA4rk/T/8GoSQ=-----END PKCS7-----"/>
</html:form> </html:form>
@@ -64,7 +58,7 @@ web browser, as key bindings differ according to which mode you are in.
us by buying some cool us by buying some cool
<link topic="http://www.zazzle.com/maxauthority*">merchandise</link> like <link topic="http://www.zazzle.com/maxauthority*">merchandise</link> like
t-shirts or mugs. Of course, as we believe in free, open source software, only t-shirts or mugs. Of course, as we believe in free, open source software, only
support us financially if you really like &liberator.appname; and the money doesn't hurt support us financially if you really like &dactyl.appname; and the money doesn't hurt
— otherwise just use it, recommend it, and like it :) — otherwise just use it, recommend it, and like it :)
</p> </p>
@@ -76,8 +70,8 @@ web browser, as key bindings differ according to which mode you are in.
A quick-start tutorial for new users. A quick-start tutorial for new users.
</li> </li>
<li> <li>
<link topic="starting">Starting &liberator.appname;</link>: <link topic="starting">Starting &dactyl.appname;</link>:
How &liberator.appname; starts up, where it reads the config file… How &dactyl.appname; starts up, where it reads the config file…
</li> </li>
<li> <li>
<link topic="browsing">Browsing</link>: <link topic="browsing">Browsing</link>:
@@ -137,12 +131,12 @@ web browser, as key bindings differ according to which mode you are in.
Printing pages. Printing pages.
</li> </li>
<li> <li>
<link topic="gui">&liberator.appname;'s GUI</link>: <link topic="gui">&dactyl.appname;'s GUI</link>:
Accessing &liberator.host; menus, dialogs and the sidebar. Accessing &dactyl.host; menus, dialogs and the sidebar.
</li> </li>
<li> <li>
<link topic="styling">Styling the GUI and web pages</link>: <link topic="styling">Styling the GUI and web pages</link>:
Changing the styling of content pages and &liberator.appname; itself. Changing the styling of content pages and &dactyl.appname; itself.
</li> </li>
<li> <li>
<link topic="message">Error and informational messages</link>: <link topic="message">Error and informational messages</link>:
@@ -177,8 +171,8 @@ or <ex>:help :set</ex>.
<li>Advanced completion of bookmark and history URLs (searching also in title, not only URL)</li> <li>Advanced completion of bookmark and history URLs (searching also in title, not only URL)</li>
<li>Vim-like statusline with a Wget-like progress bar</li> <li>Vim-like statusline with a Wget-like progress bar</li>
<li>Minimal GUI (easily hide useless menubar and toolbar with <ex>:set guioptions=</ex>)</li> <li>Minimal GUI (easily hide useless menubar and toolbar with <ex>:set guioptions=</ex>)</li>
<li>Ability to <ex>:source</ex> JavaScript files, and to use a <em>~/.vimperatorrc</em> file with syntax highlighting if you install vimperator.vim</li> <li>Ability to <ex>:source</ex> JavaScript files, and to use a <em>~/.pentadactylrc</em> file with syntax highlighting if you install pentadactyl.vim</li>
<li>Easy quick searches (<ex>:open foo</ex> will search for "foo" in google, <ex>:open ebay terminator</ex> will search for "terminator" on ebay) with support for &liberator.host; keyword bookmarks and search engines</li> <li>Easy quick searches (<ex>:open foo</ex> will search for "foo" in google, <ex>:open ebay terminator</ex> will search for "terminator" on ebay) with support for &dactyl.host; keyword bookmarks and search engines</li>
<li>Count supported for many commands (<em>3</em><k name="C-o"/> will go back 3 pages)</li> <li>Count supported for many commands (<em>3</em><k name="C-o"/> will go back 3 pages)</li>
<li>Beep on errors</li> <li>Beep on errors</li>
<li>Marks support (<k>m</k><em>a</em> to set mark a on a web page, <k>'</k><em>a</em> to go there)</li> <li>Marks support (<k>m</k><em>a</em> to set mark a on a web page, <k>'</k><em>a</em> to go there)</li>
@@ -197,10 +191,10 @@ or <ex>:help :set</ex>.
<p> <p>
Please send comments/bug reports/patches to the mailing list, where we will Please send comments/bug reports/patches to the mailing list, where we will
properly answer any questions. You can also join the properly answer any questions. You can also join the
<link topic="irc://irc.freenode.net/vimperator">#vimperator</link> IRC channel <link topic="irc://irc.freenode.net/pentadactyl">#pentadactyl</link> IRC channel
on <link target="http://www.freenode.net/">Freenode</link> or check the on <link target="http://www.freenode.net/">Freenode</link> or check the
<link topic="http://vimperator.org/trac/wiki/&liberator.appname;/Wiki">Wiki</link> for <link topic="http://vimperator.org/trac/wiki/&dactyl.appname;/Wiki">Wiki</link> for
<link topic="http://vimperator.org/trac/wiki/&liberator.appname;/FAQ"> <link topic="http://vimperator.org/trac/wiki/&dactyl.appname;/FAQ">
frequently asked questions (FAQ) frequently asked questions (FAQ)
</link>. Make sure, you have read the TODO file first, as we are aware of many </link>. Make sure, you have read the TODO file first, as we are aware of many
things which can be improved when we find time for it or receive patches. things which can be improved when we find time for it or receive patches.
@@ -216,41 +210,41 @@ mutt.
<h2 tag="intro">Introduction</h2> <h2 tag="intro">Introduction</h2>
http://vimperator.org/muttator[&liberator.appname;] is a free browser add-on for http://vimperator.org/muttator[&dactyl.appname;] is a free browser add-on for
&liberator.hostapp;, which makes it look and behave like the http://www.vim.org[Vim] &dactyl.hostapp;, which makes it look and behave like the http://www.vim.org[Vim]
text editor. It has similar key bindings, and you could call it a modal mail text editor. It has similar key bindings, and you could call it a modal mail
client, as key bindings differ according to which mode you are in. client, as key bindings differ according to which mode you are in.
|warning| + |warning| +
Warning: Warning:
To provide the most authentic Vim experience, the &liberator.hostapp; menubar and toolbar were hidden. + To provide the most authentic Vim experience, the &dactyl.hostapp; menubar and toolbar were hidden. +
If you really need them, type: <ex>:set guioptions+=mT</ex> to get them back. + If you really need them, type: <ex>:set guioptions+=mT</ex> to get them back. +
If you don't like &liberator.appname; at all, you can uninstall it by typing If you don't like &dactyl.appname; at all, you can uninstall it by typing
<ex>:addons</ex> and remove/disable it. + <ex>:addons</ex> and remove/disable it. +
If you like it, but can't remember the shortcuts, press <k>F1</k> or If you like it, but can't remember the shortcuts, press <k>F1</k> or
<ex>:help</ex> to get this help window back. <ex>:help</ex> to get this help window back.
|author| |donation| + |author| |donation| +
&liberator.appname; was written by mailto:stubenschrott@vimperator.org[Martin Stubenschrott]. &dactyl.appname; was written by mailto:stubenschrott@vimperator.org[Martin Stubenschrott].
If you appreciate my work on &liberator.appname; and want to encourage me working on it If you appreciate my work on &dactyl.appname; and want to encourage me working on it
more, you can either send me greetings, patches or make a donation: more, you can either send me greetings, patches or make a donation:
NOTE: If this link does not work, go to http://vimperator.org/muttator and NOTE: If this link does not work, go to http://vimperator.org/muttator and
click the donation button there, because &liberator.hostapp; seems to have a problem click the donation button there, because &dactyl.hostapp; seems to have a problem
when this link is inside an e-mail (which this help screen actually is). when this link is inside an e-mail (which this help screen actually is).
<pan><handle/></pan> <pan><handle/></pan>
Of course as a believer in free open source software, only make a donation Of course as a believer in free open source software, only make a donation
if you really like &liberator.appname; and the money doesn't hurt -- otherwise just use if you really like &dactyl.appname; and the money doesn't hurt -- otherwise just use
it, recommend it and like it :) it, recommend it and like it :)
<h2 tag="overview">Help topics</h2> <h2 tag="overview">Help topics</h2>
<ol> <ol>
<li> <li>
<link topic="starting">Starting &liberator.appname;</link>: <link topic="starting">Starting &dactyl.appname;</link>:
How &liberator.appname; starts up, where it reads the config file… How &dactyl.appname; starts up, where it reads the config file…
</li> </li>
<li> <li>
<link topic="browsing">Browsing</link>: <link topic="browsing">Browsing</link>:
@@ -310,12 +304,12 @@ it, recommend it and like it :)
Printing pages. Printing pages.
</li> </li>
<li> <li>
<link topic="gui">&liberator.appname;'s GUI</link>: <link topic="gui">&dactyl.appname;'s GUI</link>:
Accessing &liberator.host; menus, dialogs and the sidebar. Accessing &dactyl.host; menus, dialogs and the sidebar.
</li> </li>
<li> <li>
<link topic="styling">Styling the GUI and web pages</link>: <link topic="styling">Styling the GUI and web pages</link>:
Changing the styling of content pages and &liberator.appname; itself. Changing the styling of content pages and &dactyl.appname; itself.
</li> </li>
<li> <li>
<link topic="message">Error and informational messages</link>: <link topic="message">Error and informational messages</link>:
@@ -339,7 +333,7 @@ it, recommend it and like it :)
For now use <ex>:viusage!</ex>, <ex>:exusage!</ex> and <ex>:optionusage!</ex> to find For now use <ex>:viusage!</ex>, <ex>:exusage!</ex> and <ex>:optionusage!</ex> to find
out about available mappings, commands and options. When in Message mode out about available mappings, commands and options. When in Message mode
(activated by <k>i</k>), most mappings from &liberator.appname; are available. (activated by <k>i</k>), most mappings from &dactyl.appname; are available.
You can also jump directly to the help of a specific command with You can also jump directly to the help of a specific command with
@@ -364,13 +358,13 @@ You can also jump directly to the help of a specific command with
<li> <li>
Ability to <ex>:source</ex> JavaScript files, and to use a Ability to <ex>:source</ex> JavaScript files, and to use a
[a]~/.muttatorrc[a] file with syntax highlighting if you install [a]~/.muttatorrc[a] file with syntax highlighting if you install
http://code.google.com/p/vimperator-labs/issues/detail?id=51[muttator.vim] http://code.google.com/p/pentadactyl-labs/issues/detail?id=51[muttator.vim]
</li> </li>
<li>Count supported for many commands (<em>3</em><key name="C-o"/> will go back 3 messages)</li> <li>Count supported for many commands (<em>3</em><key name="C-o"/> will go back 3 messages)</li>
<li>Beep on errors</li> <li>Beep on errors</li>
<li><ex>:map</ex> support (and feedkeys() for script writers)</li> <li><ex>:map</ex> support (and feedkeys() for script writers)</li>
<li><ex>:time</ex> support for profiling</li> <li><ex>:time</ex> support for profiling</li>
<li>Many other vimperator features are available when in <tt>-- MESSAGE --</tt> mode</li> <li>Many other pentadactyl features are available when in <tt>-- MESSAGE --</tt> mode</li>
<li>A comprehensive help file, explaining all commands, mappings and options. </li> <li>A comprehensive help file, explaining all commands, mappings and options. </li>
</ul> </ul>
@@ -378,14 +372,14 @@ You can also jump directly to the help of a specific command with
Please send comments/bug reports/patches to the mailing list, where we will Please send comments/bug reports/patches to the mailing list, where we will
properly answer any questions. You can also join the properly answer any questions. You can also join the
<link topic="irc://irc.freenode.net/vimperator">#vimperator</link> IRC channel <link topic="irc://irc.freenode.net/pentadactyl">#pentadactyl</link> IRC channel
on <link topic="http://www.freenode.net/">Freenode</link> or check the on <link topic="http://www.freenode.net/">Freenode</link> or check the
<link topic="http://code.google.com/p/vimperator-labs/w/list?q=label%3Aproject-muttator">Wiki</link> <link topic="http://code.google.com/p/pentadactyl-labs/w/list?q=label%3Aproject-muttator">Wiki</link>
for for
<link topic="http://code.google.com/p/vimperator-labs/wiki/&liberator.appname;FAQ"> <link topic="http://code.google.com/p/pentadactyl-labs/wiki/&dactyl.appname;FAQ">
frequently asked questions (FAQ)</link>. frequently asked questions (FAQ)</link>.
Make sure, you have read the Make sure, you have read the
<link topic="http://vimperator-labs.googlecode.com/hg/muttator/TODO">TODO</link> <link topic="http://pentadactyl-labs.googlecode.com/hg/muttator/TODO">TODO</link>
file first, as we are aware of many things which can be improved when we find file first, as we are aware of many things which can be improved when we find
time for it or receive patches. time for it or receive patches.

View File

@@ -1,13 +1,5 @@
Main developer/Project founder:
* Martin Stubenschrott (stubenschrott@vimperator.org)
Developers: Developers:
* Kris Maglione * Kris Maglione
* Ted Pavlic <ted@tedpavlic.com>
* anekos <anekos@snca.net>
* teramako <teramako@gmail.com>
* janus_wel <janus.wel.3@gmail.com>
* Conrad Irwin
Inactive/former developers: Inactive/former developers:
* Viktor Kojouharov (Виктор Кожухаров) * Viktor Kojouharov (Виктор Кожухаров)
@@ -16,6 +8,12 @@ Inactive/former developers:
* Doug Kearns (dougkearns@gmail.com) * Doug Kearns (dougkearns@gmail.com)
* Konstantin Stepanov (milezv@yandex.ru) * Konstantin Stepanov (milezv@yandex.ru)
* Tim Hammerquist (penryu@gmail.com) * Tim Hammerquist (penryu@gmail.com)
* Ted Pavlic <ted@tedpavlic.com>
* anekos <anekos@snca.net>
* teramako <teramako@gmail.com>
* janus_wel <janus.wel.3@gmail.com>
* Martin Stubenschrott (stubenschrott@vimperator.org)
* Conrad Irwin
Patches (in no special order): Patches (in no special order):
* Ruud Grosmann ('followhints' option) * Ruud Grosmann ('followhints' option)
@@ -33,7 +31,7 @@ Patches (in no special order):
* Lee Hinman (:open ./.. support) * Lee Hinman (:open ./.. support)
* Bart Trojanowski (Makefile) * Bart Trojanowski (Makefile)
* Hannes Rist (:set titlestring support) * Hannes Rist (:set titlestring support)
* Nikolai Weibull ($VIMPERATOR_HOME) * Nikolai Weibull ($PENTADACTYL_HOME)
* Joseph Xu (supporting multiple top level windows better) * Joseph Xu (supporting multiple top level windows better)
* Raimon Grau Cuscó (document relationship navigation - ]], [[) * Raimon Grau Cuscó (document relationship navigation - ]], [[)
* Ryan Zheng (ctrl-x/a support) * Ryan Zheng (ctrl-x/a support)

View File

@@ -1,6 +1,6 @@
#### configuration #### configuration
VERSION = 2.3a1pre VERSION = 2.3a1pre
NAME = vimperator NAME = pentadactyl
include ../common/Makefile include ../common/Makefile

View File

@@ -14,7 +14,7 @@
2009-10-28: 2009-10-28:
* version 2.2 * version 2.2
* IMPORTANT: Vimperator's licence has changed from the MPL/GPL/LGPL * IMPORTANT: Pentadactyl's licence has changed from the MPL/GPL/LGPL
tri-license to the MIT license. tri-license to the MIT license.
* IMPORTANT: Map.flags has been replaced with individual properties. * IMPORTANT: Map.flags has been replaced with individual properties.
Mappings defined in plugins with mappings.add will need to be updated. Mappings defined in plugins with mappings.add will need to be updated.
@@ -51,7 +51,7 @@
autocommand autocommand
* add *-description* option to [c]:command[c] * add *-description* option to [c]:command[c]
* command-line options are now supported via the host application's * command-line options are now supported via the host application's
*-liberator* option *-dactyl* option
* add [m];i[m] and [m];I[m] for opening image location (in new tab) * add [m];i[m] and [m];I[m] for opening image location (in new tab)
* add [j]all.html[j] to show all help sections in a single page - available via * add [j]all.html[j] to show all help sections in a single page - available via
[c]:helpall[c] [c]:helpall[c]
@@ -64,7 +64,7 @@
* IMPORTANT: Default value of 'complete' has been changed from "sfl" to "slf" * IMPORTANT: Default value of 'complete' has been changed from "sfl" to "slf"
* massively speed up [c]:open[c] completions * massively speed up [c]:open[c] completions
* TabMixPlus (and other tab extensions) should work much better now * TabMixPlus (and other tab extensions) should work much better now
together with Vimperator unless you [c]:set guioptions+=[nN][c] together with Pentadactyl unless you [c]:set guioptions+=[nN][c]
* remove 'preload' option. You can fake it by some custom JavaScript in your RC file. * remove 'preload' option. You can fake it by some custom JavaScript in your RC file.
* add [c]:frameonly[c] * add [c]:frameonly[c]
* add [c]:stopall[c] * add [c]:stopall[c]
@@ -72,7 +72,7 @@
* add 'encoding' * add 'encoding'
* add 'hintinputs' * add 'hintinputs'
* add [c]:silent[c] * add [c]:silent[c]
* add [j]$MY_VIMPERATORRC[j] * add [j]$MY_PENTADACTYLRC[j]
* add ' and " local marks * add ' and " local marks
* add [m]w[m] and [m]W[m] Normal mode mappings for symmetry with * add [m]w[m] and [m]W[m] Normal mode mappings for symmetry with
[m]o[m]/[m]O[m] and [m]t[m]/[m]T[m] [m]o[m]/[m]O[m] and [m]t[m]/[m]T[m]
@@ -95,19 +95,19 @@
not using the args parser explicitly. The old string value is now not using the args parser explicitly. The old string value is now
available via args.string. available via args.string.
* IMPORTANT: 'verbose' is now used for message levels. Logging is * IMPORTANT: 'verbose' is now used for message levels. Logging is
controlled by the *extensions.liberator.loglevel* preference. controlled by the *extensions.dactyl.loglevel* preference.
* IMPORTANT: [c]:viusage[c] and [c]:exusage[c] now jump to the help index, use the * IMPORTANT: [c]:viusage[c] and [c]:exusage[c] now jump to the help index, use the
special versions for the old behavior. special versions for the old behavior.
* IMPORTANT: renamed Startup and Quit autocmd events to *VimperatorEnter* and * IMPORTANT: renamed Startup and Quit autocmd events to *PentadactylEnter* and
*VimperatorLeave* respectively. *PentadactylLeave* respectively.
* IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages. * IMPORTANT: 'verbose' is now by default at 1, set to 0 to not show any status messages.
* IMPORTANT: $VIMPERATOR_HOME is no longer used. * IMPORTANT: $PENTADACTYL_HOME is no longer used.
* Selecting an <input type="file"> with hints now causes the command line to prompt * Selecting an <input type="file"> with hints now causes the command line to prompt
for file input (instead of doing nothing). for file input (instead of doing nothing).
* [count][m]<C-n>[m] now goes to the [count]th next tab rather than the [count]th tab. * [count][m]<C-n>[m] now goes to the [count]th next tab rather than the [count]th tab.
* add ~/.vimperator/info/{profile}/, similar to viminfo * add ~/.pentadactyl/info/{profile}/, similar to viminfo
* add [j]$VIMPERATOR_RUNTIME[j], [j]$VIMPERATOR_INIT[j] * add [j]$PENTADACTYL_RUNTIME[j], [j]$PENTADACTYL_INIT[j]
* [c]:hardcopy[c] now supports output redirection to a file on Unix and MacUnix * [c]:hardcopy[c] now supports output redirection to a file on Unix and MacUnix
* add [m];f[m] extended hint mode to focus a frame * add [m];f[m] extended hint mode to focus a frame
* add "r", "l", and "b" to 'guioptions' to toggle the scrollbars. * add "r", "l", and "b" to 'guioptions' to toggle the scrollbars.
@@ -154,7 +154,7 @@
* add 'helpfile' option * add 'helpfile' option
* add 'wildignore' option * add 'wildignore' option
* add [c]:finish[c] command * add [c]:finish[c] command
* new events *BookmarkAdd*, *ShellCmdPost*, *VimperatorLeavePre*, *DownloadPost* * new events *BookmarkAdd*, *ShellCmdPost*, *PentadactylLeavePre*, *DownloadPost*
* add 'cdpath' option * add 'cdpath' option
* allow [c]:dialog[c] to open the cookies manager * allow [c]:dialog[c] to open the cookies manager
* add 'loadplugins' option * add 'loadplugins' option
@@ -178,8 +178,8 @@
:command AlertMe :js alert(<args>) :command AlertMe :js alert(<args>)
................................... ...................................
* IMPORTANT: changed (again) the default keybinding to temporarily disable all * IMPORTANT: changed (again) the default keybinding to temporarily disable all
Vimperator keybindings from [m]<C-q>[m] to [m]<C-z>[m] since many users complained Pentadactyl keybindings from [m]<C-q>[m] to [m]<C-z>[m] since many users complained
about hitting [m]<C-q>[m] twice and exiting Vimperator about hitting [m]<C-q>[m] twice and exiting Pentadactyl
* IMPORTANT: removed old [c]:buffers![c] buffer window, as it was ugly and slightly broken * IMPORTANT: removed old [c]:buffers![c] buffer window, as it was ugly and slightly broken
use [m]B[m] or [c]:buffers[c] instead use [m]B[m] or [c]:buffers[c] instead
* IMPORTANT: input fields are not blured anymore by default after a page has loaded * IMPORTANT: input fields are not blured anymore by default after a page has loaded
@@ -293,11 +293,11 @@
2007-12-21: 2007-12-21:
* version 0.5.3 * version 0.5.3
* IMPORTANT: options are no longer automatically stored - use the * IMPORTANT: options are no longer automatically stored - use the
~/.vimperatorrc file instead for persistent options ~/.pentadactylrc file instead for persistent options
* [c]:tabnext[c] and [c]:tabprevious[c] now accept an argument * [c]:tabnext[c] and [c]:tabprevious[c] now accept an argument
* the count to [m]gT[m] now specifies a relative tab motion like Vim * the count to [m]gT[m] now specifies a relative tab motion like Vim
* new [c]:pa[geinfo][c] command, and [m]<C-g>[m] and [m]g<C-g>[m] mappings (thanks Marco Candrian) * new [c]:pa[geinfo][c] command, and [m]<C-g>[m] and [m]g<C-g>[m] mappings (thanks Marco Candrian)
* added new [c]:mkvimperatorrc[c] command * added new [c]:mkpentadactylrc[c] command
* remove [c]:redraw[c] and [m]<C-L>[m] commands as they rely on FF3 features * remove [c]:redraw[c] and [m]<C-L>[m] commands as they rely on FF3 features
* [c]:ls[c], [c]:history[c] and [c]:bmarks[c] output is now hyperlinked * [c]:ls[c], [c]:history[c] and [c]:bmarks[c] output is now hyperlinked
* new [m]gb[m] and [m]gB[m] mappings to repeat the last [c]:buffer[!][c] command, * new [m]gb[m] and [m]gB[m] mappings to repeat the last [c]:buffer[!][c] command,
@@ -340,10 +340,10 @@
highlighted text strings when 'hlsearch' is set highlighted text strings when 'hlsearch' is set
* added 'linksearch' option to restrict page searches to link text - *\L* * added 'linksearch' option to restrict page searches to link text - *\L*
and *\l* can be used in the search pattern to override 'linksearch' and *\l* can be used in the search pattern to override 'linksearch'
* Vimperator trys to stay in command mode after loading pages instead * Pentadactyl trys to stay in command mode after loading pages instead
of having a text field focused of having a text field focused
* added a visual bell and replaced 'beep' with 'visualbell' * added a visual bell and replaced 'beep' with 'visualbell'
* added Vimperator logo (can be seen in the addons manager) * added Pentadactyl logo (can be seen in the addons manager)
* added 'hlsearch','incsearch', 'ignorecase' and 'smartcase' options * added 'hlsearch','incsearch', 'ignorecase' and 'smartcase' options
* many small bug fixes and enhancments * many small bug fixes and enhancments
@@ -351,8 +351,8 @@
* version 0.5.1 * version 0.5.1
* native [m]/[m] and [m]?[m] search and [m]n[m] and [m]N[m] working again * native [m]/[m] and [m]?[m] search and [m]n[m] and [m]N[m] working again
* the URL in the status line can be selected with the mouse again * the URL in the status line can be selected with the mouse again
* the Windows default RC file is now ~/_vimperatorrc and the plugin * the Windows default RC file is now ~/_pentadactylrc and the plugin
directory is ~/vimperator/plugin directory is ~/pentadactyl/plugin
* command-line history now works properly on Windows * command-line history now works properly on Windows
* filename completion now works on Windows * filename completion now works on Windows
* the Bookmarks Toolbar Folder is now read when bookmarks are first * the Bookmarks Toolbar Folder is now read when bookmarks are first
@@ -371,10 +371,10 @@
* rename [c]:bm[c], [c]:bmadd[c], and [c]:bmdel[c] to [c]:bmarks[c], [c]:bmark[c], and [c]:delbmarks[c] respectively * rename [c]:bm[c], [c]:bmadd[c], and [c]:bmdel[c] to [c]:bmarks[c], [c]:bmark[c], and [c]:delbmarks[c] respectively
* new [c]:normal[c] command * new [c]:normal[c] command
* the command line keeps focus now, even when clicking outside of it * the command line keeps focus now, even when clicking outside of it
* vimperator.events.feedkeys("2zi") support for scripts * pentadactyl.events.feedkeys("2zi") support for scripts
* [m]<C-u>[m]/[m]<C-d>[m] for scrolling the window up/down and the associated * [m]<C-u>[m]/[m]<C-d>[m] for scrolling the window up/down and the associated
'scroll' option 'scroll' option
* files in ~/.vimperator/plugin/ are auto-sourced * files in ~/.pentadactyl/plugin/ are auto-sourced
* [c]:winopen[c] support (multiple windows still very very experimental) * [c]:winopen[c] support (multiple windows still very very experimental)
* 'activate' option implemented * 'activate' option implemented
* search engines which use POST instead of GET work now * search engines which use POST instead of GET work now
@@ -398,8 +398,8 @@
* [c]:hardcopy[c] works now and shows the printing dialog * [c]:hardcopy[c] works now and shows the printing dialog
* changed [m]R[m] to reload without cache instead of reload all due to popular request * changed [m]R[m] to reload without cache instead of reload all due to popular request
* changed secure sites -> green, broken sites -> red in the statusbar * changed secure sites -> green, broken sites -> red in the statusbar
* Vimperator now sets the window title, so it's "vimperator.mozdev.org - * Pentadactyl now sets the window title, so it's "pentadactyl.mozdev.org -
Vimperator" instead of "vimperator.mozdev.org - Mozilla Firefox" Pentadactyl" instead of "pentadactyl.mozdev.org - Mozilla Firefox"
Use [c]:set titlestring=...[c] to change it back (help from Hannes Rist) Use [c]:set titlestring=...[c] to change it back (help from Hannes Rist)
* [c]:tabmove[c] command (by Doug Kearns) * [c]:tabmove[c] command (by Doug Kearns)
* 'showstatuslinks' option to control where/if we show the destination of * 'showstatuslinks' option to control where/if we show the destination of
@@ -411,7 +411,7 @@
'extendedhinttags' settings with [c]:set hinttags&[c] and [c]:set extendedhinttags&[c]) 'extendedhinttags' settings with [c]:set hinttags&[c] and [c]:set extendedhinttags&[c])
* [c]:set option&[c] resets the option to the default value * [c]:set option&[c] resets the option to the default value
* added [c]:tabonly[c] and [c]:tabrewind[c] and [c]:tablast[c] commands and some futher aliases [c]:tabNext[c], etc. (by Doug Kearns) * added [c]:tabonly[c] and [c]:tabrewind[c] and [c]:tablast[c] commands and some futher aliases [c]:tabNext[c], etc. (by Doug Kearns)
* added vimparator.vim for .vimperatorrc syntax highlighting in the XPI (by Doug Kearns) * added vimparator.vim for .pentadactylrc syntax highlighting in the XPI (by Doug Kearns)
* Added keyword support for bookmarks to the [c]:[tab]open[c] commands * Added keyword support for bookmarks to the [c]:[tab]open[c] commands
* many small bug fixes and enhancements * many small bug fixes and enhancements
@@ -424,8 +424,8 @@
2007-05-01: 2007-05-01:
* version 0.4 * version 0.4
* extension GUID was changed to \'vimperator@mozdev.net' -> YOU WILL HAVE * extension GUID was changed to \'pentadactyl@mozdev.net' -> YOU WILL HAVE
TO UNINSTALL ANY OLD VIMPERATOR INSTALLATION BEFORE INSTALLING THIS VERSION TO UNINSTALL ANY OLD PENTADACTYL INSTALLATION BEFORE INSTALLING THIS VERSION
* support for internal search engines was dropped. Now we use Firefox search engines. * support for internal search engines was dropped. Now we use Firefox search engines.
* support for 'wildmode' completion setting with support for matching the * support for 'wildmode' completion setting with support for matching the
longest common substring. Also new 'wildoptions' setting. longest common substring. Also new 'wildoptions' setting.
@@ -442,7 +442,7 @@
* newly designed help page * newly designed help page
* [c]:help section[c] supported, [c]:help :set[c] will show help for the [c]:set[c] command * [c]:help section[c] supported, [c]:help :set[c] will show help for the [c]:set[c] command
(patch from Viktor Kojouharov) (patch from Viktor Kojouharov)
* [c]:source[c] support, and auto-sourcing ~/.vimperatorrc on startup * [c]:source[c] support, and auto-sourcing ~/.pentadactylrc on startup
* [c]:javascript <<EOF[c] support to execute multiline JavaScript code * [c]:javascript <<EOF[c] support to execute multiline JavaScript code
also changed [c]:exec[c] to behave more Vim like also changed [c]:exec[c] to behave more Vim like
* fixed saving of session * fixed saving of session
@@ -466,7 +466,7 @@
* added [m]<C-v>[m] support to pass one key to Firefox (patch by Muthu Kannan) * added [m]<C-v>[m] support to pass one key to Firefox (patch by Muthu Kannan)
* also [m]I[m] will go to "ignorekeys" mode until [m]<Esc>[m] is pressed, presenting a workaround * also [m]I[m] will go to "ignorekeys" mode until [m]<Esc>[m] is pressed, presenting a workaround
for many JavaScript form fields like GMail, until something better comes along for many JavaScript form fields like GMail, until something better comes along
* Vimperator can now be automatically updated in the [c]:addons[c] screen like other extensions * Pentadactyl can now be automatically updated in the [c]:addons[c] screen like other extensions
* fixed [c]:tabnext[c]/[c]:tabprevious[c] commands * fixed [c]:tabnext[c]/[c]:tabprevious[c] commands
* documented "s" and "b" 'guioptions' flags for statusbar/bookmark bar * documented "s" and "b" 'guioptions' flags for statusbar/bookmark bar
* implemented the possibility to use [m]<C-[>[m] as an alternative to [m]<Esc>[m], to leave the command line * implemented the possibility to use [m]<C-[>[m] as an alternative to [m]<Esc>[m], to leave the command line

View File

@@ -42,10 +42,10 @@ BUGS:
FEATURES: FEATURES:
8 Document Textarea, Caret and Visual modes. 8 Document Textarea, Caret and Visual modes.
8 Replace config.name tests in liberator with more specific feature 8 Replace config.name tests in dactyl with more specific feature
tests or overridable APIs where at all feasible. tests or overridable APIs where at all feasible.
8 change the extension ID to vimperator@vimperator.org rather than 8 change the extension ID to pentadactyl@vimperator.org rather than
vimperator@mozdev.org pentadactyl@mozdev.org
8 finish :help TODOs 8 finish :help TODOs
8 fix local options 8 fix local options
8 adaptive timeout for auto-completions, :set completions can be updated more often than 8 adaptive timeout for auto-completions, :set completions can be updated more often than
@@ -89,7 +89,7 @@ FEATURES:
6 Use ctrl-w+j/k/w to switch between sidebar, content, preview window 6 Use ctrl-w+j/k/w to switch between sidebar, content, preview window
6 Command :tags for getting a list of used tags 6 Command :tags for getting a list of used tags
6 ;?<hint> should show more information 6 ;?<hint> should show more information
6 Add information to liberator/HACKING file about testing and optimization 6 Add information to dactyl/HACKING file about testing and optimization
5 when looking at a zoomed out image (because it's large), zi should zoom in 5 when looking at a zoomed out image (because it's large), zi should zoom in
maybe with this? : http://mxr.mozilla.org/seamonkey/source/content/html/document/public/nsIImageDocument.idl maybe with this? : http://mxr.mozilla.org/seamonkey/source/content/html/document/public/nsIImageDocument.idl
5 make a command to search within google search results 5 make a command to search within google search results
@@ -100,5 +100,5 @@ FEATURES:
3 add a command-line window (:help cmdline-window in Vim). 3 add a command-line window (:help cmdline-window in Vim).
3 Splitting Windows with [:sp :vsp ctrl-w,s ctrl-w,v] and closing with [ctrl-w,q], moving with [ctrl-w,w or tab] 3 Splitting Windows with [:sp :vsp ctrl-w,s ctrl-w,v] and closing with [ctrl-w,q], moving with [ctrl-w,w or tab]
have a look into the split browser extension have a look into the split browser extension
1 Reformat liberator/HACKING so that git diff can find sections and report changes @ somewhere 1 Reformat dactyl/HACKING so that git diff can find sections and report changes @ somewhere

View File

@@ -0,0 +1,28 @@
# Firefox
content pentadactyl content/
skin pentadactyl classic/1.0 skin/
locale pentadactyl en-US locale/en-US/
locale dactyl en-US ../common/locale/en-US/
content dactyl ../common/content/
resource dactyl ../common/modules/
skin dactyl classic/1.0 ../common/skin/
override chrome://dactyl/content/dactyl.dtd chrome://pentadactyl/content/dactyl.dtd
override chrome://dactyl/content/config.js chrome://pentadactyl/content/config.js
overlay chrome://browser/content/browser.xul chrome://dactyl/content/dactyl.xul
overlay chrome://browser/content/browser.xul chrome://pentadactyl/content/pentadactyl.xul
component {81495d80-89ee-4c36-a88d-ea7c4e5ac63f} components/about-handler.js
contract @mozilla.org/network/protocol/about;1?what=pentadactyl {81495d80-89ee-4c36-a88d-ea7c4e5ac63f}
component {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69} components/commandline-handler.js
contract @mozilla.org/commandlinehandler/general-startup;1?type=pentadactyl {16dc34f7-6d22-4aa4-a67f-2921fb5dcb69}
category command-line-handler m-pentadactyl @mozilla.org/commandlinehandler/general-startup;1?type=pentadactyl
component {c1b67a07-18f7-4e13-b361-2edcc35a5a0d} components/protocols.js
contract @mozilla.org/network/protocol;1?name=chrome-data {c1b67a07-18f7-4e13-b361-2edcc35a5a0d}
component {9c8f2530-51c8-4d41-b356-319e0b155c44} components/protocols.js
contract @mozilla.org/network/protocol;1?name=dactyl {9c8f2530-51c8-4d41-b356-319e0b155c44}

View File

@@ -1,6 +1,6 @@
// Header: // Header:
"use strict"; "use strict";
const Name = "Vimperator"; const Name = "Pentadactyl";
/* /*
* We can't load our modules here, so the following code is sadly * We can't load our modules here, so the following code is sadly
* duplicated: .w !sh * duplicated: .w !sh

View File

@@ -1,6 +1,6 @@
// Header: // Header:
"use strict"; "use strict";
const Name = "Vimperator"; const Name = "Pentadactyl";
/* /*
* We can't load our modules here, so the following code is sadly * We can't load our modules here, so the following code is sadly
* duplicated: .w !sh * duplicated: .w !sh

View File

@@ -5,21 +5,21 @@
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<title>About:Vimperator</title> <title>About:Pentadactyl</title>
<link rel="stylesheet" href="chrome://vimperator/skin/about.css" type="text/css" /> <link rel="stylesheet" href="chrome://pentadactyl/skin/about.css" type="text/css" />
<link rel="icon" href="chrome://vimperator/skin/icon.png" type="image/png" /> <link rel="icon" href="chrome://pentadactyl/skin/icon.png" type="image/png" />
</head> </head>
<body> <body>
<div id="main-container"> <div id="main-container">
<div id="img-container"> <div id="img-container">
<div id="text-container"> <div id="text-container">
<div style="text-align: center;"> <div style="text-align: center;">
<img src="chrome://vimperator/content/logo.png" alt="Vimperator" /> <img src="chrome://pentadactyl/content/logo.png" alt="Pentadactyl" />
version ###VERSION### version ###VERSION###
by Martin Stubenschrott et al. by Martin Stubenschrott et al.
Vimperator is open source and freely distributable Pentadactyl is open source and freely distributable
Sponsor Vimperator development!</div><div style="padding-left: 5em;">type :help sponsor&lt;<span class="key">Enter</span>&gt; for information Sponsor Pentadactyl development!</div><div style="padding-left: 5em;">type :help sponsor&lt;<span class="key">Enter</span>&gt; for information
type :q&lt;<span class="key">Enter</span>&gt; to exit type :q&lt;<span class="key">Enter</span>&gt; to exit
type :help&lt;<span class="key">Enter</span>&gt; or &lt;<span class="key">F1</span>&gt; for on-line help type :help&lt;<span class="key">Enter</span>&gt; or &lt;<span class="key">F1</span>&gt; for on-line help

View File

Before

Width:  |  Height:  |  Size: 221 KiB

After

Width:  |  Height:  |  Size: 221 KiB

View File

@@ -10,7 +10,7 @@ const Config = Module("config", ConfigBase, {
}, },
/*** required options, no checks done if they really exist, so be careful ***/ /*** required options, no checks done if they really exist, so be careful ***/
name: "Vimperator", name: "Pentadactyl",
hostApplication: "Firefox", hostApplication: "Firefox",
/*** optional options, there are checked for existence and a fallback provided ***/ /*** optional options, there are checked for existence and a fallback provided ***/
@@ -19,7 +19,7 @@ const Config = Module("config", ConfigBase, {
complete: "slf", complete: "slf",
guioptions: "rb", guioptions: "rb",
showtabline: 2, showtabline: 2,
titlestring: "Vimperator" titlestring: "Pentadactyl"
}, },
guioptions: { guioptions: {
@@ -42,9 +42,9 @@ const Config = Module("config", ConfigBase, {
["PrivateMode", "Triggered when private mode is activated or deactivated"], ["PrivateMode", "Triggered when private mode is activated or deactivated"],
["Sanitize", "Triggered when a sanitizeable item is cleared"], ["Sanitize", "Triggered when a sanitizeable item is cleared"],
["ShellCmdPost", "Triggered after executing a shell command with :!cmd"], ["ShellCmdPost", "Triggered after executing a shell command with :!cmd"],
["VimperatorEnter", "Triggered after Firefox starts"], ["PentadactylEnter", "Triggered after Firefox starts"],
["VimperatorLeavePre", "Triggered before exiting Firefox, just before destroying each module"], ["PentadactylLeavePre","Triggered before exiting Firefox, just before destroying each module"],
["VimperatorLeave", "Triggered before exiting Firefox"]], ["PentadactylLeave", "Triggered before exiting Firefox"]],
dialogs: { dialogs: {
about: ["About Firefox", about: ["About Firefox",
@@ -66,7 +66,7 @@ const Config = Module("config", ConfigBase, {
customizetoolbar: ["Customize the Toolbar", customizetoolbar: ["Customize the Toolbar",
function () { window.BrowserCustomizeToolbar(); }], function () { window.BrowserCustomizeToolbar(); }],
dominspector: ["DOM Inspector", dominspector: ["DOM Inspector",
function () { try { window.inspectDOMDocument(content.document); } catch (e) { liberator.echoerr("DOM Inspector extension not installed"); } }], function () { try { window.inspectDOMDocument(content.document); } catch (e) { dactyl.echoerr("DOM Inspector extension not installed"); } }],
downloads: ["Manage Downloads", downloads: ["Manage Downloads",
function () { window.toOpenWindowByType("Download:Manager", "chrome://mozapps/content/downloads/downloads.xul", "chrome,dialog=no,resizable"); }], function () { window.toOpenWindowByType("Download:Manager", "chrome://mozapps/content/downloads/downloads.xul", "chrome,dialog=no,resizable"); }],
history: ["List your history", history: ["List your history",
@@ -128,7 +128,7 @@ const Config = Module("config", ConfigBase, {
commands.add(["winon[ly]"], commands.add(["winon[ly]"],
"Close all other windows", "Close all other windows",
function () { function () {
liberator.windows.forEach(function (win) { dactyl.windows.forEach(function (win) {
if (win != window) if (win != window)
win.close(); win.close();
}); });
@@ -139,9 +139,9 @@ const Config = Module("config", ConfigBase, {
"Show " + config.hostApplication + " preferences", "Show " + config.hostApplication + " preferences",
function (args) { function (args) {
if (args.bang) { // open Firefox settings GUI dialog if (args.bang) { // open Firefox settings GUI dialog
liberator.open("about:config", dactyl.open("about:config",
(options["newtab"] && options.get("newtab").has("all", "prefs")) (options["newtab"] && options.get("newtab").has("all", "prefs"))
? liberator.NEW_TAB : liberator.CURRENT_TAB); ? dactyl.NEW_TAB : dactyl.CURRENT_TAB);
} }
else else
window.openPreferences(); window.openPreferences();
@@ -180,7 +180,7 @@ const Config = Module("config", ConfigBase, {
} }
} }
liberator.echoerr("No sidebar " + arg + " found"); dactyl.echoerr("No sidebar " + arg + " found");
}, },
{ {
argCount: "1", argCount: "1",
@@ -194,9 +194,9 @@ const Config = Module("config", ConfigBase, {
commands.add(["wind[ow]"], commands.add(["wind[ow]"],
"Execute a command and tell it to output in a new window", "Execute a command and tell it to output in a new window",
function (args) { function (args) {
liberator.forceNewWindow = true; dactyl.forceNewWindow = true;
liberator.execute(args.string, null, true); dactyl.execute(args.string, null, true);
liberator.forceNewWindow = false; dactyl.forceNewWindow = false;
}, },
{ {
argCount: "+", argCount: "+",
@@ -215,9 +215,9 @@ const Config = Module("config", ConfigBase, {
args = args.string; args = args.string;
if (args) if (args)
liberator.open(args, liberator.NEW_WINDOW); dactyl.open(args, dactyl.NEW_WINDOW);
else else
liberator.open("about:blank", liberator.NEW_WINDOW); dactyl.open("about:blank", dactyl.NEW_WINDOW);
}, },
{ {
completer: function (context) completion.url(context), completer: function (context) completion.url(context),

View File

@@ -0,0 +1,13 @@
<!ENTITY % dactylBranding SYSTEM "chrome://branding/locale/brand.dtd">
%dactylBranding;
<!ENTITY dactyl.mainWindow "main-window">
<!ENTITY dactyl.name "pentadactyl">
<!ENTITY dactyl.idname "PENTADACTYL">
<!ENTITY dactyl.appname "Pentadactyl">
<!ENTITY dactyl.host "&brandShortName;">
<!ENTITY dactyl.hostbin "firefox">
<!ENTITY dactyl.statusBefore "statusbar-display">
<!ENTITY dactyl.statusAfter "">

Some files were not shown because too many files have changed in this diff Show More