1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 20:27:58 +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
fe9ffcfb48c7050f5e6872285ff0197eb54cf213 vimperator-0.4.1
d063e0e23d668dcf807e2032f032a3d23486ec48 vimperator-0.5
ce28bfd79dcc119abf59e9318d524144f45d53f5 vimperator-0.5-branch-HEAD-merge-1
019506ce1fa1a647f27fb4aed293b6e0fe629d31 vimperator-0.5.1
605db9f5c6cb5a1d65c95211f78d0a480a1566fd vimperator-0.5.2
3b8c0bcbbf8663fde9f959efbc1ad5fda3d9d1f6 vimperator-0.5.3
c9273973fc735678c3930bc15fb4915414907d23 vimperator-1.0
96b65677b4c5a29525fd791aaadbc51a4ba7b7c2 vimperator-1.1
ff456886599eb7ad2cdd718eac498b6c8a9efc75 vimperator-1.2
e34e4c4a9c24488f570d08200182542134e05f29 vimperator-2.0
e34e4c4a9c24488f570d08200182542134e05f29 vimperator-2.0
f65383ca4fc4872827f3f23350ae503c93cd66a4 vimperator-2.0~alpha1
75873caffbe7327bfd1c27e615378d2a196a9286 vimperator-2.1
7777c3e4d29893701a64f46adbd60b3b06cda7a6 vimperator-2.2~beta1
d4c91b705d551c63c5a0d929248ec873e978a188 vimperator-2.2
fe9ffcfb48c7050f5e6872285ff0197eb54cf213 pentadactyl-0.4.1
d063e0e23d668dcf807e2032f032a3d23486ec48 pentadactyl-0.5
ce28bfd79dcc119abf59e9318d524144f45d53f5 pentadactyl-0.5-branch-HEAD-merge-1
019506ce1fa1a647f27fb4aed293b6e0fe629d31 pentadactyl-0.5.1
605db9f5c6cb5a1d65c95211f78d0a480a1566fd pentadactyl-0.5.2
3b8c0bcbbf8663fde9f959efbc1ad5fda3d9d1f6 pentadactyl-0.5.3
c9273973fc735678c3930bc15fb4915414907d23 pentadactyl-1.0
96b65677b4c5a29525fd791aaadbc51a4ba7b7c2 pentadactyl-1.1
ff456886599eb7ad2cdd718eac498b6c8a9efc75 pentadactyl-1.2
e34e4c4a9c24488f570d08200182542134e05f29 pentadactyl-2.0
e34e4c4a9c24488f570d08200182542134e05f29 pentadactyl-2.0
f65383ca4fc4872827f3f23350ae503c93cd66a4 pentadactyl-2.0~alpha1
75873caffbe7327bfd1c27e615378d2a196a9286 pentadactyl-2.1
7777c3e4d29893701a64f46adbd60b3b06cda7a6 pentadactyl-2.2~beta1
d4c91b705d551c63c5a0d929248ec873e978a188 pentadactyl-2.2
ca14d185b1506c77b748925770731b66d3dddfbe xulmus-0.1

View File

@@ -1,6 +1,6 @@
= Hacking =
If you've taken to hacking Vimperator source code, we hope that you'll share
If you've taken to hacking Pentadactyl source code, we hope that you'll share
your changes. In case you do, please keep the following in mind, and we'll be
happy to accept your patches.
@@ -20,7 +20,7 @@ important, please ask.
In general: Just look at the existing source code!
We try to target experienced JavaScript developers who do not
necessarily need to have a good understanding of Vimperator's source
necessarily need to have a good understanding of Pentadactyl's source
code, nor necessarily understand in-depth concepts of other
languages like Lisp or Python. Therefore, the coding style should
feel natural to any JavaScript developer. Of course, this does not

View File

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

View File

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

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

View File

@@ -35,7 +35,7 @@ const AutoCommands = Module("autocommands", {
add: function (events, regex, cmd) {
if (typeof events == "string") {
events = events.split(",");
liberator.log("DEPRECATED: the events list arg to autocommands.add() should be an array of event names");
dactyl.log("DEPRECATED: the events list arg to autocommands.add() should be an array of event names");
}
events.forEach(function (event) {
this._store.push(AutoCommand(event, RegExp(regex), cmd));
@@ -119,7 +119,7 @@ const AutoCommands = Module("autocommands", {
let autoCmds = this._store.filter(function (autoCmd) autoCmd.event == event);
liberator.echomsg("Executing " + event + " Auto commands for \"*\"", 8);
dactyl.echomsg("Executing " + event + " Auto commands for \"*\"", 8);
let lastPattern = null;
let url = args.url || "";
@@ -127,22 +127,22 @@ const AutoCommands = Module("autocommands", {
for (let [, autoCmd] in Iterator(autoCmds)) {
if (autoCmd.pattern.test(url)) {
if (!lastPattern || lastPattern.source != autoCmd.pattern.source)
liberator.echomsg("Executing " + event + " Auto commands for \"" + autoCmd.pattern.source + "\"", 8);
dactyl.echomsg("Executing " + event + " Auto commands for \"" + autoCmd.pattern.source + "\"", 8);
lastPattern = autoCmd.pattern;
liberator.echomsg("autocommand " + autoCmd.command, 9);
dactyl.echomsg("autocommand " + autoCmd.command, 9);
if (typeof autoCmd.command == "function") {
try {
autoCmd.command.call(autoCmd, args);
}
catch (e) {
liberator.reportError(e);
liberator.echoerr(e);
dactyl.reportError(e);
dactyl.echoerr(e);
}
}
else
liberator.execute(commands.replaceTokens(autoCmd.command, args), null, true);
dactyl.execute(commands.replaceTokens(autoCmd.command, args), null, true);
}
}
}
@@ -162,7 +162,7 @@ const AutoCommands = Module("autocommands", {
RegExp(regex);
}
catch (e) {
liberator.assert(false, "E475: Invalid argument: " + regex);
dactyl.assert(false, "E475: Invalid argument: " + regex);
}
if (event) {
@@ -171,7 +171,7 @@ const AutoCommands = Module("autocommands", {
validEvents.push("*");
events = event.split(",");
liberator.assert(events.every(function (event) validEvents.indexOf(event) >= 0),
dactyl.assert(events.every(function (event) validEvents.indexOf(event) >= 0),
"E216: No such group or event: " + event);
}
@@ -221,7 +221,7 @@ const AutoCommands = Module("autocommands", {
function (args) {
// Vim compatible
if (args.length == 0) {
liberator.echomsg("No matching autocommands");
dactyl.echomsg("No matching autocommands");
return;
}
@@ -230,14 +230,14 @@ const AutoCommands = Module("autocommands", {
let validEvents = config.autocommands.map(function (e) e[0]);
// TODO: add command validators
liberator.assert(event != "*",
dactyl.assert(event != "*",
"E217: Can't execute autocommands for ALL events");
liberator.assert(validEvents.indexOf(event) >= 0,
dactyl.assert(validEvents.indexOf(event) >= 0,
"E216: No such group or event: " + args);
liberator.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)),
dactyl.assert(autocommands.get(event).some(function (c) c.pattern.test(defaultURL)),
"No matching autocommands");
if (this.name == "doautoall" && liberator.has("tabs")) {
if (this.name == "doautoall" && dactyl.has("tabs")) {
let current = tabs.index();
for (let i = 0; i < tabs.count; i++) {

View File

@@ -1,14 +1,14 @@
<?xml version="1.0"?>
<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:xbl="http://www.mozilla.org/xbl"
xmlns:html="http://www.w3.org/1999/xhtml">
<binding id="frame">
<content>
<html:div liberator:highlight="FrameIndicator"/>
<html:div dactyl:highlight="FrameIndicator"/>
<children/>
</content>
</binding>
@@ -19,17 +19,17 @@
<binding id="tab" display="xul:hbox"
extends="chrome://global/content/bindings/tabbox.xml#tab">
<content chromedir="ltr" closetabtext="Close Tab">
<xul:stack class="tab-icon liberator-tab-stack">
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image" liberator:highlight="TabIcon"/>
<xul:stack class="tab-icon dactyl-tab-stack">
<xul:image xbl:inherits="validate,src=image" class="tab-icon-image" dactyl:highlight="TabIcon"/>
<xul:vbox>
<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:vbox>
</xul:stack>
<xul:label xbl:inherits="value=ordinal" liberator:highlight="TabNumber"/>
<xul:label flex="1" xbl:inherits="value=label,crop,accesskey" class="tab-text" liberator:highlight="TabText"/>
<xul:toolbarbutton anonid="close-button" tabindex="-1" class="tab-close-button" liberator:highlight="TabClose"/>
<xul:label xbl:inherits="value=ordinal" dactyl:highlight="TabNumber"/>
<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" dactyl:highlight="TabClose"/>
</content>
</binding>
<binding id="tab-mac"
@@ -37,17 +37,17 @@
<content chromedir="ltr" closetabtext="Close Tab">
<xul:hbox class="tab-image-left" 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 class="tab-extra-status"/>
<xul:vbox>
<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:vbox>
</xul: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 class="tab-text-stack" flex="1">
<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
const Bookmarks = Module("bookmarks", {
requires: ["autocommands", "config", "liberator", "storage", "services"],
requires: ["autocommands", "config", "dactyl", "storage", "services"],
init: function () {
const faviconService = services.get("favicon");
@@ -47,7 +47,7 @@ const Bookmarks = Module("bookmarks", {
const storage = modules.storage;
function Cache(name, store) {
const rootFolders = [bookmarksService.toolbarFolder, bookmarksService.bookmarksMenuFolder, bookmarksService.unfiledBookmarksFolder];
const sleep = liberator.sleep; // Storage objects are global to all windows, 'liberator' isn't.
const sleep = dactyl.sleep; // Storage objects are global to all windows, 'dactyl' isn't.
let bookmarks = [];
let self = this;
@@ -154,7 +154,7 @@ const Bookmarks = Module("bookmarks", {
onItemVisited: function onItemVisited() {},
onItemMoved: function onItemMoved() {},
onItemAdded: function onItemAdded(itemId, folder, index) {
// liberator.dump("onItemAdded(" + itemId + ", " + folder + ", " + index + ")\n");
// dactyl.dump("onItemAdded(" + itemId + ", " + folder + ", " + index + ")\n");
if (bookmarksService.getItemType(itemId) == bookmarksService.TYPE_BOOKMARK) {
if (self.isBookmark(itemId)) {
let bmark = loadBookmark(readBookmark(itemId));
@@ -163,14 +163,14 @@ const Bookmarks = Module("bookmarks", {
}
},
onItemRemoved: function onItemRemoved(itemId, folder, index) {
// liberator.dump("onItemRemoved(" + itemId + ", " + folder + ", " + index + ")\n");
// dactyl.dump("onItemRemoved(" + itemId + ", " + folder + ", " + index + ")\n");
if (deleteBookmark(itemId))
storage.fireEvent(name, "remove", itemId);
},
onItemChanged: function onItemChanged(itemId, property, isAnnotation, value) {
if (isAnnotation)
return;
// liberator.dump("onItemChanged(" + itemId + ", " + property + ", " + value + ")\n");
// dactyl.dump("onItemChanged(" + itemId + ", " + property + ", " + value + ")\n");
let bookmark = bookmarks.filter(function (item) item.id == itemId)[0];
if (bookmark) {
if (property == "tags")
@@ -241,7 +241,7 @@ const Bookmarks = Module("bookmarks", {
}
}
catch (e) {
liberator.log(e, 0);
dactyl.log(e, 0);
return false;
}
@@ -285,13 +285,13 @@ const Bookmarks = Module("bookmarks", {
return bmarks.length;
}
catch (e) {
liberator.log(e, 0);
dactyl.log(e, 0);
return 0;
}
},
// TODO: add filtering
// also ensures that each search engine has a Liberator-friendly alias
// also ensures that each search engine has a Dactyl-friendly alias
getSearchEngines: function getSearchEngines() {
let searchEngines = [];
for (let [, engine] in Iterator(services.get("browserSearch").getVisibleEngines({}))) {
@@ -432,16 +432,16 @@ const Bookmarks = Module("bookmarks", {
let items = completion.runCompleter("bookmark", filter, maxItems, tags);
if (items.length)
return liberator.open(items.map(function (i) i.url), liberator.NEW_TAB);
return dactyl.open(items.map(function (i) i.url), dactyl.NEW_TAB);
if (filter.length > 0 && tags.length > 0)
liberator.echoerr("E283: No bookmarks matching tags: \"" + tags + "\" and string: \"" + filter + "\"");
dactyl.echoerr("E283: No bookmarks matching tags: \"" + tags + "\" and string: \"" + filter + "\"");
else if (filter.length > 0)
liberator.echoerr("E283: No bookmarks matching string: \"" + filter + "\"");
dactyl.echoerr("E283: No bookmarks matching string: \"" + filter + "\"");
else if (tags.length > 0)
liberator.echoerr("E283: No bookmarks matching tags: \"" + tags + "\"");
dactyl.echoerr("E283: No bookmarks matching tags: \"" + tags + "\"");
else
liberator.echoerr("No bookmarks set");
dactyl.echoerr("No bookmarks set");
return null;
}
}, {
@@ -494,10 +494,10 @@ const Bookmarks = Module("bookmarks", {
if (bookmarks.add(false, title, url, keyword, tags, args.bang)) {
let extra = (title == url) ? "" : " (" + title + ")";
liberator.echomsg("Added bookmark: " + url + extra, 1, commandline.FORCE_SINGLELINE);
dactyl.echomsg("Added bookmark: " + url + extra, 1, commandline.FORCE_SINGLELINE);
}
else
liberator.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE);
dactyl.echoerr("Exxx: Could not add bookmark `" + title + "'", commandline.FORCE_SINGLELINE);
}, {
argCount: "?",
bang: true,
@@ -537,7 +537,7 @@ const Bookmarks = Module("bookmarks", {
function (resp) {
if (resp && resp.match(/^y(es)?$/i)) {
bookmarks._cache.bookmarks.forEach(function (bmark) { services.get("bookmarks").removeItem(bmark.id); });
liberator.echomsg("All bookmarks deleted", 1, commandline.FORCE_SINGLELINE);
dactyl.echomsg("All bookmarks deleted", 1, commandline.FORCE_SINGLELINE);
}
});
}
@@ -545,7 +545,7 @@ const Bookmarks = Module("bookmarks", {
let url = args.string || buffer.URL;
let deletedCount = bookmarks.remove(url);
liberator.echomsg(deletedCount + " bookmark(s) with url " + url.quote() + " deleted", 1, commandline.FORCE_SINGLELINE);
dactyl.echomsg(deletedCount + " bookmark(s) with url " + url.quote() + " deleted", 1, commandline.FORCE_SINGLELINE);
}
},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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 () {
let elem = liberator.focus;
let elem = dactyl.focus;
// A error occurs if the element has been removed when "elem.selectionStart" is executed.
try {
if (elem && elem.selectionEnd)
@@ -106,13 +106,13 @@ const Editor = Module("editor", {
},
pasteClipboard: function () {
if (liberator.has("Win32")) {
if (dactyl.has("Win32")) {
this.executeCommand("cmd_paste");
return;
}
// 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()) {
// readFromClipboard would return 'undefined' if not checked
@@ -139,7 +139,7 @@ const Editor = Module("editor", {
executeCommand: function (cmd, count) {
let controller = Editor.getController();
if (!controller || !controller.supportsCommand(cmd) || !controller.isCommandEnabled(cmd)) {
liberator.beep();
dactyl.beep();
return false;
}
@@ -157,7 +157,7 @@ const Editor = Module("editor", {
}
catch (e) {
if (!didCommand)
liberator.beep();
dactyl.beep();
return false;
}
}
@@ -220,7 +220,7 @@ const Editor = Module("editor", {
break;
default:
liberator.beep();
dactyl.beep();
return false;
}
@@ -240,7 +240,7 @@ const Editor = Module("editor", {
break;
default:
liberator.beep();
dactyl.beep();
return false;
}
return true;
@@ -297,7 +297,7 @@ const Editor = Module("editor", {
return i + 1; // always position the cursor after the char
}
liberator.beep();
dactyl.beep();
return -1;
},
@@ -322,7 +322,7 @@ const Editor = Module("editor", {
return i;
}
liberator.beep();
dactyl.beep();
return -1;
},
@@ -330,10 +330,10 @@ const Editor = Module("editor", {
// TODO: save return value in v:shell_error
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);
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?
@@ -343,7 +343,7 @@ const Editor = Module("editor", {
let textBox = null;
if (!(config.isComposeWindow))
textBox = liberator.focus;
textBox = dactyl.focus;
if (!forceEditing && textBox && textBox.type == "password") {
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
// likely be any more helpful than that given in the
// exception.
liberator.echoerr(e);
dactyl.echoerr(e);
tmpBg = "red";
}
@@ -571,11 +571,11 @@ const Editor = Module("editor", {
let list = this.getAbbreviations(filter, lhs);
if (!list.length)
liberator.echomsg("No this._abbreviations found");
dactyl.echomsg("No this._abbreviations found");
else if (list.length == 1) {
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 {
list = template.tabular(["", "LHS", "RHS"], [], list);
@@ -592,7 +592,7 @@ const Editor = Module("editor", {
*/
removeAbbreviation: function (filter, lhs) {
if (!lhs) {
liberator.echoerr("E474: Invalid argument");
dactyl.echoerr("E474: Invalid argument");
return false;
}
@@ -623,7 +623,7 @@ const Editor = Module("editor", {
}
}
liberator.echoerr("E24: No such abbreviation");
dactyl.echoerr("E24: No such abbreviation");
return false;
},
@@ -640,7 +640,7 @@ const Editor = Module("editor", {
this.removeAbbreviation(filter, lhs);
}
}, {
getEditor: function () liberator.focus,
getEditor: function () dactyl.focus,
getController: function () {
let ed = Editor.getEditor();
@@ -660,7 +660,7 @@ const Editor = Module("editor", {
"Abbreviate a key sequence" + modeDescription,
function (args) {
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;
if (rhs)
@@ -866,7 +866,7 @@ const Editor = Module("editor", {
mappings.add([modes.INSERT],
["<C-t>"], "Edit text field in Vi mode",
function () { liberator.mode = modes.TEXTAREA; });
function () { dactyl.mode = modes.TEXTAREA; });
mappings.add([modes.INSERT],
["<Space>", "<Return>"], "Expand insert mode abbreviation",
@@ -886,7 +886,7 @@ const Editor = Module("editor", {
["u"], "Undo",
function (count) {
editor.executeCommand("cmd_undo", count);
liberator.mode = modes.TEXTAREA;
dactyl.mode = modes.TEXTAREA;
},
{ count: true });
@@ -894,7 +894,7 @@ const Editor = Module("editor", {
["<C-r>"], "Redo",
function (count) {
editor.executeCommand("cmd_redo", count);
liberator.mode = modes.TEXTAREA;
dactyl.mode = modes.TEXTAREA;
},
{ count: true });
@@ -932,7 +932,7 @@ const Editor = Module("editor", {
// visual mode
mappings.add([modes.CARET, modes.TEXTAREA],
["v"], "Start visual mode",
function (count) { modes.set(modes.VISUAL, liberator.mode); });
function (count) { modes.set(modes.VISUAL, dactyl.mode); });
mappings.add([modes.VISUAL],
["v"], "End visual mode",
@@ -949,7 +949,7 @@ const Editor = Module("editor", {
mappings.add([modes.VISUAL],
["c", "s"], "Change selected text",
function (count) {
liberator.assert(modes.extended & modes.TEXTAREA);
dactyl.assert(modes.extended & modes.TEXTAREA);
editor.executeCommand("cmd_cut");
modes.set(modes.INSERT, modes.TEXTAREA);
});
@@ -962,7 +962,7 @@ const Editor = Module("editor", {
modes.set(modes.TEXTAREA);
}
else
liberator.beep();
dactyl.beep();
});
mappings.add([modes.VISUAL],
@@ -974,7 +974,7 @@ const Editor = Module("editor", {
}
else {
let sel = window.content.document.getSelection();
liberator.assert(sel);
dactyl.assert(sel);
util.copyToClipboard(sel, true);
}
});
@@ -982,12 +982,12 @@ const Editor = Module("editor", {
mappings.add([modes.VISUAL, modes.TEXTAREA],
["p"], "Paste clipboard contents",
function (count) {
liberator.assert(!(modes.extended & modes.CARET));
dactyl.assert(!(modes.extended & modes.CARET));
if (!count)
count = 1;
while (count--)
editor.executeCommand("cmd_paste");
liberator.mode = modes.TEXTAREA;
dactyl.mode = modes.TEXTAREA;
});
// finding characters
@@ -996,7 +996,7 @@ const Editor = Module("editor", {
function (count, arg) {
let pos = editor.findCharForward(arg, count);
if (pos >= 0)
editor.moveToPosition(pos, true, liberator.mode == modes.VISUAL);
editor.moveToPosition(pos, true, dactyl.mode == modes.VISUAL);
},
{ arg: true, count: true });
@@ -1005,7 +1005,7 @@ const Editor = Module("editor", {
function (count, arg) {
let pos = editor.findCharBackward(arg, count);
if (pos >= 0)
editor.moveToPosition(pos, false, liberator.mode == modes.VISUAL);
editor.moveToPosition(pos, false, dactyl.mode == modes.VISUAL);
},
{ arg: true, count: true });
@@ -1014,7 +1014,7 @@ const Editor = Module("editor", {
function (count, arg) {
let pos = editor.findCharForward(arg, count);
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 });
@@ -1023,7 +1023,7 @@ const Editor = Module("editor", {
function (count, arg) {
let pos = editor.findCharBackward(arg, count);
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 });
@@ -1039,7 +1039,7 @@ const Editor = Module("editor", {
while (count-- > 0) {
let text = Editor.getEditor().value;
let pos = Editor.getEditor().selectionStart;
liberator.assert(pos < text.length);
dactyl.assert(pos < text.length);
let chr = text[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) {
__liberator_eval_error = e;
__dactyl_eval_error = e;
}
// IMPORTANT: The eval statement *must* remain on the first line
// 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"]
// 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>") { ... }
this._keyTable = {
add: ["Plus", "Add"],
@@ -80,8 +80,8 @@ const Events = Module("events", {
if (dirs.length > 0) {
for (let [, dir] in Iterator(dirs)) {
liberator.echomsg('Searching for "macros/*" in ' + dir.path.quote(), 2);
liberator.log("Sourcing macros directory: " + dir.path + "...", 3);
dactyl.echomsg('Searching for "macros/*" in ' + dir.path.quote(), 2);
dactyl.log("Sourcing macros directory: " + dir.path + "...", 3);
for (let file in dir.iterDirectory()) {
if (file.exists() && !file.isDirectory() && file.isReadable() &&
@@ -89,17 +89,17 @@ const Events = Module("events", {
let name = file.leafName.replace(/\.vimp$/i, "");
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
liberator.log("No user macros directory found", 3);
dactyl.log("No user macros directory found", 3);
}
catch (e) {
// thrown if directory does not exist
liberator.log("Error sourcing macros directory: " + e, 9);
dactyl.log("Error sourcing macros directory: " + e, 9);
}
}, 100);
@@ -118,14 +118,14 @@ const Events = Module("events", {
},
destroy: function () {
liberator.dump("Removing all event listeners");
dactyl.dump("Removing all event listeners");
for (let args in values(this.sessionListeners))
args[0].removeEventListener.apply(args[0], args.slice(1));
},
/**
* 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 {string} event The event to listen for.
@@ -149,10 +149,10 @@ const Events = Module("events", {
}
catch (e) {
if (e.message == "Interrupted")
liberator.echoerr("Interrupted");
dactyl.echoerr("Interrupted");
else
liberator.echoerr("Processing " + event.type + " event: " + (e.echoerr || e));
liberator.reportError(e);
dactyl.echoerr("Processing " + event.type + " event: " + (e.echoerr || e));
dactyl.reportError(e);
}
};
},
@@ -170,7 +170,7 @@ const Events = Module("events", {
*/
startRecording: function (macro) {
// 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 + "'");
modes.isRecording = true;
@@ -195,13 +195,13 @@ const Events = Module("events", {
playMacro: function (macro) {
let res = false;
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;
}
if (macro == "@") { // use lastMacro if it's set
if (!this._lastMacro) {
liberator.echoerr("E748: No previously used register");
dactyl.echoerr("E748: No previously used register");
return false;
}
}
@@ -227,9 +227,9 @@ const Events = Module("events", {
else {
if (this._lastMacro.length == 1)
// TODO: ignore this like Vim?
liberator.echoerr("Exxx: Register '" + this._lastMacro + "' not set");
dactyl.echoerr("Exxx: Register '" + this._lastMacro + "' not set");
else
liberator.echoerr("Exxx: Named macro '" + this._lastMacro + "' not set");
dactyl.echoerr("Exxx: Named macro '" + this._lastMacro + "' not set");
}
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
* strings, you have to feed one parsable string.
*
@@ -288,10 +288,10 @@ const Events = Module("events", {
commandline.quiet = quiet;
try {
liberator.threadYield(1, true);
dactyl.threadYield(1, true);
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);
if (typeof noremap == "object")
@@ -300,10 +300,10 @@ const Events = Module("events", {
else
evt.noremap = !!noremap;
evt.isMacro = true;
// A special hack for liberator-specific key names.
if (evt_obj.liberatorString || evt_obj.liberatorShift) {
evt.liberatorString = evt_obj.liberatorString; // for key-less keypress events e.g. <Nop>
evt.liberatorShift = evt_obj.liberatorShift; // for untypable shift keys e.g. <S-1>
// A special hack for dactyl-specific key names.
if (evt_obj.dactylString || evt_obj.dactylShift) {
evt.dactylString = evt_obj.dactylString; // for key-less keypress events e.g. <Nop>
evt.dactylShift = evt_obj.dactylShift; // for untypable shift keys e.g. <S-1>
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
* real event, but none of the methods.
*
* Also may contain two "special" parameters, .liberatorString and
* .liberatorShift these are set for characters that can never by
* Also may contain two "special" parameters, .dactylString and
* .dactylShift these are set for characters that can never by
* 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.
*
* @param {string} keys The string to parse.
@@ -439,13 +439,13 @@ const Events = Module("events", {
if (evt_obj.shiftKey) {
keyname = keyname.toUpperCase();
if (keyname == keyname.toLowerCase())
evt_obj.liberatorShift = true;
evt_obj.dactylShift = true;
}
evt_obj.charCode = keyname.charCodeAt(0);
}
else if (keyname == "nop") {
evt_obj.liberatorString = "<Nop>";
evt_obj.dactylString = "<Nop>";
}
else if (/mouse$/.test(keyname)) { // mouse events
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.
*
* E.g. pressing ctrl+n would result in the string "<C-n>".
@@ -490,8 +490,8 @@ const Events = Module("events", {
if (!event)
return "[instance events]";
if (event.liberatorString)
return event.liberatorString;
if (event.dactylString)
return event.dactylString;
let key = null;
let modifier = "";
@@ -516,22 +516,22 @@ const Events = Module("events", {
// (i.e., cntrl codes 27--31)
// ---
// For more information, see:
// [*] Vimp FAQ: http://vimperator.org/trac/wiki/Vimperator/FAQ#WhydoesntC-workforEscMacOSX
// [*] Referenced mailing list msg: http://www.mozdev.org/pipermail/vimperator/2008-May/001548.html
// [*] Vimp FAQ: http://vimperator.org/trac/wiki/Pentadactyl/FAQ#WhydoesntC-workforEscMacOSX
// [*] 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 "[ ] _ \"
// 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
// 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
// <C-C-]> if your fancy keyboard permits such things<?>), but
// these <C-control> mappings are probably pathological (<C-Esc>
// certainly is on Windows), and so it is probably
// 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
key = "Esc";
modifier = modifier.replace("C-", "");
@@ -545,7 +545,7 @@ const Events = Module("events", {
if (key in this._key_code) {
// 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-";
key = this._code_key[this._key_code[key]];
@@ -553,7 +553,7 @@ const Events = Module("events", {
else {
// 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
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-";
else if (modifier.length == 0)
return key;
@@ -613,8 +613,8 @@ const Events = Module("events", {
* @returns {boolean}
*/
waitForPageLoad: function () {
//liberator.dump("start waiting in loaded state: " + buffer.loaded);
liberator.threadYield(true); // clear queue
//dactyl.dump("start waiting in loaded state: " + buffer.loaded);
dactyl.threadYield(true); // clear queue
if (buffer.loaded == 1)
return true;
@@ -624,31 +624,31 @@ const Events = Module("events", {
let end = start + (maxWaitTime * 1000); // maximum time to wait - TODO: add option
let now;
while (now = Date.now(), now < end) {
liberator.threadYield();
dactyl.threadYield();
//if ((now - start) % 1000 < 10)
// liberator.dump("waited: " + (now - start) + " ms");
// dactyl.dump("waited: " + (now - start) + " ms");
if (!events.feedingKeys)
return false;
if (buffer.loaded > 0) {
liberator.sleep(250);
dactyl.sleep(250);
break;
}
else
liberator.echo("Waiting for page to load...", commandline.DISALLOW_MULTILINE);
dactyl.echo("Waiting for page to load...", commandline.DISALLOW_MULTILINE);
}
modes.show();
// TODO: allow macros to be continued when page does not fully load with an option
let ret = (buffer.loaded == 1);
if (!ret)
liberator.echoerr("Page did not load completely in " + maxWaitTime + " seconds. Macro stopped.");
//liberator.dump("done waiting: " + ret);
dactyl.echoerr("Page did not load completely in " + maxWaitTime + " seconds. Macro stopped.");
//dactyl.dump("done waiting: " + ret);
// sometimes the input widget had focus when replaying a macro
// maybe this call should be moved somewhere else?
// liberator.focusContent(true);
// dactyl.focusContent(true);
return ret;
},
@@ -675,7 +675,7 @@ const Events = Module("events", {
return;
}
switch (liberator.mode) {
switch (dactyl.mode) {
case modes.NORMAL:
// clear any selection made
let selection = window.content.getSelection();
@@ -689,9 +689,9 @@ const Events = Module("events", {
case modes.VISUAL:
if (modes.extended & modes.TEXTAREA)
liberator.mode = modes.TEXTAREA;
dactyl.mode = modes.TEXTAREA;
else if (modes.extended & modes.CARET)
liberator.mode = modes.CARET;
dactyl.mode = modes.CARET;
break;
case modes.CARET:
@@ -711,20 +711,20 @@ const Events = Module("events", {
// it's a Vi editing mode. Extended modes really need to be
// displayed too. --djk
function isInputField() {
let elem = liberator.focus;
let elem = dactyl.focus;
return ((elem instanceof HTMLInputElement && !/image/.test(elem.type))
|| elem instanceof HTMLIsIndexElement);
}
if (options["insertmode"] || isInputField())
liberator.mode = modes.INSERT;
dactyl.mode = modes.INSERT;
else
modes.reset();
break;
case modes.INSERT:
if ((modes.extended & modes.TEXTAREA))
liberator.mode = modes.TEXTAREA;
dactyl.mode = modes.TEXTAREA;
else
modes.reset();
break;
@@ -752,7 +752,7 @@ const Events = Module("events", {
// Huh? --djk
onFocusChange: function (event) {
// command line has it's own focus change handler
if (liberator.mode == modes.COMMAND_LINE)
if (dactyl.mode == modes.COMMAND_LINE)
return;
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 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;
try {
@@ -769,14 +769,14 @@ const Events = Module("events", {
if ((elem instanceof HTMLInputElement && /^(search|text|password)$/.test(elem.type)) ||
(elem instanceof HTMLSelectElement)) {
liberator.mode = modes.INSERT;
dactyl.mode = modes.INSERT;
if (hasHTMLDocument(win))
buffer.lastInputField = elem;
return;
}
if(isinstance(elem, [HTMLEmbedElement, HTMLEmbedElement])) {
liberator.mode = modes.EMBED;
dactyl.mode = modes.EMBED;
return;
}
@@ -799,9 +799,9 @@ const Events = Module("events", {
let urlbar = document.getElementById("urlbar");
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();
}
finally {
@@ -827,17 +827,17 @@ const Events = Module("events", {
if (modes.isRecording) {
if (key == "q") { // TODO: should not be hardcoded
modes.isRecording = false;
liberator.log("Recorded " + this._currentMacro + ": " + this._macros.get(this._currentMacro), 9);
liberator.echomsg("Recorded macro '" + this._currentMacro + "'");
dactyl.log("Recorded " + this._currentMacro + ": " + this._macros.get(this._currentMacro), 9);
dactyl.echomsg("Recorded macro '" + this._currentMacro + "'");
killEvent();
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);
}
if (key == "<C-c>")
liberator.interrupted = true;
dactyl.interrupted = true;
// feedingKeys needs to be separate from interrupted so
// we can differentiate between a recorded <C-c>
@@ -848,7 +848,7 @@ const Events = Module("events", {
events.feedingKeys = false;
if (modes.isReplaying) {
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
@@ -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
// 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);
throw killEvent();
}
@@ -899,7 +899,7 @@ const Events = Module("events", {
// they are without beeping also fixes key navigation in combo
// boxes, submitting forms, etc.
// 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 = "";
return;
}
@@ -908,7 +908,7 @@ const Events = Module("events", {
if (!isEscapeKey(key)) {
// custom mode...
if (liberator.mode == modes.CUSTOM) {
if (dactyl.mode == modes.CUSTOM) {
plugins.onEvent(event);
throw killEvent();
}
@@ -938,15 +938,15 @@ const Events = Module("events", {
// whatever reason). if that happens to be correct, well..
// XXX: why not just do that as well for HINTS mode actually?
if (liberator.mode == modes.CUSTOM)
if (dactyl.mode == modes.CUSTOM)
return;
let inputStr = this._input.buffer + key;
let countStr = inputStr.match(/^[1-9][0-9]*|/)[0];
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) {
map = this._input.pendingMap;
this._input.pendingMap = null;
@@ -1002,14 +1002,14 @@ const Events = Module("events", {
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.buffer += key;
}
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
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 });
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
stop = false;
if (liberator.mode == modes.COMMAND_LINE) {
if (dactyl.mode == modes.COMMAND_LINE) {
if (!(modes.extended & modes.INPUT_MULTILINE))
liberator.trapErrors(function () {
dactyl.trapErrors(function () {
commandline.onEvent(event); // reroute event in command line mode
});
}
else if (!modes.mainMode.input)
liberator.beep();
dactyl.beep();
}
}
@@ -1037,7 +1037,7 @@ const Events = Module("events", {
}
catch (e) {
if (e !== undefined)
liberator.reportError(e);
dactyl.reportError(e);
}
finally {
let motionMap = (this._input.pendingMotionMap && this._input.pendingMotionMap.names[0]) || "";
@@ -1057,11 +1057,11 @@ const Events = Module("events", {
let elem = event.target;
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
for(; win; win = win != win.parent && win.parent)
win.liberatorFocusAllowed = true;
win.dactylFocusAllowed = true;
},
onPopupShown: function (event) {
if (event.originalTarget.localName == "tooltip" || event.originalTarget.id == "liberator-visualbell")
if (event.originalTarget.localName == "tooltip" || event.originalTarget.id == "dactyl-visualbell")
return;
modes.add(modes.MENU);
},
@@ -1075,7 +1075,7 @@ const Events = Module("events", {
onResize: function (event) {
if (window.fullScreen != this._fullscreen) {
this._fullscreen = window.fullScreen;
liberator.triggerObserver("fullscreen", this._fullscreen);
dactyl.triggerObserver("fullscreen", this._fullscreen);
autocommands.trigger("Fullscreen", { state: this._fullscreen });
}
},
@@ -1086,13 +1086,13 @@ const Events = Module("events", {
if (controller && controller.isCommandEnabled("cmd_copy"))
couldCopy = true;
if (liberator.mode != modes.VISUAL) {
if (dactyl.mode != modes.VISUAL) {
if (couldCopy) {
if ((liberator.mode == modes.TEXTAREA ||
if ((dactyl.mode == modes.TEXTAREA ||
(modes.extended & modes.TEXTAREA))
&& !options["insertmode"])
modes.set(modes.VISUAL, modes.TEXTAREA);
else if (liberator.mode == modes.CARET)
else if (dactyl.mode == modes.CARET)
modes.set(modes.VISUAL, modes.CARET);
}
}
@@ -1100,12 +1100,12 @@ const Events = Module("events", {
// else
// {
// if (!couldCopy && modes.extended & modes.CARET)
// liberator.mode = modes.CARET;
// dactyl.mode = modes.CARET;
// }
}
}, {
isInputElemFocused: function () {
let elem = liberator.focus;
let elem = dactyl.focus;
return ((elem instanceof HTMLInputElement && !/image/.test(elem.type)) ||
elem instanceof HTMLTextAreaElement ||
elem instanceof HTMLIsIndexElement ||
@@ -1117,14 +1117,14 @@ const Events = Module("events", {
commands.add(["delmac[ros]"],
"Delete macros",
function (args) {
liberator.assert(!args.bang || !args.string, "E474: Invalid argument");
dactyl.assert(!args.bang || !args.string, "E474: Invalid argument");
if (args.bang)
events.deleteMacros();
else if (args.string)
events.deleteMacros(args.string);
else
liberator.echoerr("E471: Argument required");
dactyl.echoerr("E471: Argument required");
}, {
bang: true,
completer: function (context) completion.macro(context)

View File

@@ -61,7 +61,7 @@ const RangeFinder = Module("rangefinder", {
find: function (pattern, backwards) {
let str = this.bootstrap(pattern);
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;
},
@@ -70,7 +70,7 @@ const RangeFinder = Module("rangefinder", {
if (!this.rangeFind)
this.find(this.lastSearchPattern);
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) {
// hack needed, because wrapping causes a "scroll" event which clears
// 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"
xmlns="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:str="http://exslt.org/strings"
xmlns:exsl="http://exslt.org/common"
@@ -11,19 +11,19 @@
<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: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:for-each>
</xsl:variable>
<xsl:template name="parse-tags">
<xsl:param name="text"/>
<div liberator:highlight="HelpTags">
<div dactyl:highlight="HelpTags">
<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>
</div>
</xsl:template>

View File

@@ -15,13 +15,13 @@ p.tagline {
font-weight: bold;
}
table.vimperator {
table.pentadactyl {
border-width: 1px;
border-style: dotted;
border-color: gray;
/*margin-bottom: 2em; /* FIXME: just a quick hack until we have proper pages */
}
table.vimperator td {
table.pentadactyl td {
border: none;
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 -->
<xsl:stylesheet version="1.0"
xmlns="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:str="http://exslt.org/strings"
xmlns:exsl="http://exslt.org/common"
@@ -15,21 +15,21 @@
<!-- Variable Definitions {{{1 -->
<xsl:variable name="doc">
<xsl:apply-templates select="/liberator:document" mode="overlay"/>
<xsl:apply-templates select="/dactyl:document" mode="overlay"/>
</xsl:variable>
<xsl:variable name="root" select="exsl:node-set($doc)"/>
<xsl:variable name="tags">
<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:for-each>
</xsl:variable>
<!-- Process Overlays {{{1 -->
<xsl:variable name="overlay" select="concat('liberator://help-overlay/', /liberator:document/@name)"/>
<xsl:variable name="overlaydoc" select="document($overlay)/liberator:overlay"/>
<xsl:variable name="overlay" select="concat('dactyl://help-overlay/', /dactyl:document/@name)"/>
<xsl:variable name="overlaydoc" select="document($overlay)/dactyl:overlay"/>
<xsl:template name="splice-overlays">
<xsl:param name="elem"/>
@@ -54,19 +54,19 @@
</xsl:for-each>
</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:with-param name="tag" select="substring-before(concat(., ' '), ' ')"/>
<xsl:with-param name="elem" select="self::node()"/>
</xsl:call-template>
</xsl:template>
<xsl:template match="*[liberator:tags]" mode="overlay">
<xsl:template match="*[dactyl:tags]" mode="overlay">
<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:call-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:with-param name="tag" select="substring-before(concat(@tag, ' '), ' ')"/>
<xsl:with-param name="elem" select="self::node()"/>
@@ -75,9 +75,9 @@
<!-- Process Inclusions {{{1 -->
<xsl:template match="liberator:include" mode="overlay-2">
<div liberator:highlight="HelpInclude">
<xsl:apply-templates select="document(@href)/liberator:document/node()" mode="overlay"/>
<xsl:template match="dactyl:include" mode="overlay-2">
<div dactyl:highlight="HelpInclude">
<xsl:apply-templates select="document(@href)/dactyl:document/node()" mode="overlay"/>
</div>
</xsl:template>
@@ -93,15 +93,15 @@
<!-- Root {{{1 -->
<xsl:template match="/">
<xsl:for-each select="$root/liberator:document">
<html liberator:highlight="Help">
<xsl:for-each select="$root/dactyl:document">
<html dactyl:highlight="Help">
<head>
<title><xsl:value-of select="@title"/></title>
<script type="text/javascript"
src="chrome://liberator/content/help.js"/>
src="chrome://dactyl/content/help.js"/>
</head>
<body liberator:highlight="HelpBody">
<div liberator:highlight="Logo"/>
<body dactyl:highlight="HelpBody">
<div dactyl:highlight="Logo"/>
<xsl:call-template name="parse-tags">
<xsl:with-param name="text" select="concat(@name, '.html')"/>
</xsl:call-template>
@@ -125,7 +125,7 @@
local-name() = $tag and not(preceding::*[local-name() = $lasttag][position() = 1 and not(.=$context)])]"/>
<xsl:if test="$nodes">
<ol liberator:highlight="HelpOrderedList">
<ol dactyl:highlight="HelpOrderedList">
<xsl:for-each select="$nodes">
<li>
<a>
@@ -144,18 +144,18 @@
</ol>
</xsl:if>
</xsl:template>
<xsl:template match="liberator:toc" mode="pass-2">
<xsl:template match="dactyl:toc" mode="pass-2">
<xsl:variable name="TOC">
<context/>
<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:for-each>
</xsl:variable>
<xsl:variable name="toc" select="exsl:node-set($TOC)"/>
<xsl:if test="//liberator:toc[1 and self::*]">
<div liberator:highlight="HelpTOC">
<xsl:if test="//dactyl:toc[1 and self::*]">
<div dactyl:highlight="HelpTOC">
<h2>Contents</h2>
<xsl:if test="@start">
<xsl:call-template name="toc">
@@ -174,40 +174,40 @@
<!-- Items {{{1 -->
<xsl:template match="liberator:strut" mode="pass-2">
<xsl:template match="dactyl:strut" mode="pass-2">
<div style="clear: both"/>
</xsl:template>
<xsl:template match="liberator:item" mode="pass-2">
<div liberator:highlight="HelpItem">
<xsl:apply-templates select="liberator:tags|liberator:spec|liberator:strut"/>
<xsl:if test="not(liberator:description/@short)">
<xsl:template match="dactyl:item" mode="pass-2">
<div dactyl:highlight="HelpItem">
<xsl:apply-templates select="dactyl:tags|dactyl:spec|dactyl:strut"/>
<xsl:if test="not(dactyl:description/@short)">
<hr style="border: 0; height: 0; margin: 0; width: 100%; float: right;"/>
<div liberator:highlight="HelpOptInfo">
<xsl:apply-templates select="liberator:type|liberator:default"/>
<div dactyl:highlight="HelpOptInfo">
<xsl:apply-templates select="dactyl:type|dactyl:default"/>
<div style="clear: both;"/>
</div>
</xsl:if>
<xsl:apply-templates select="liberator:description"/>
<xsl:apply-templates select="dactyl:description"/>
<div style="clear: both;"/>
</div>
</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 liberator:highlight="HelpSpec">
<div dactyl:highlight="HelpSpec">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="liberator:default[not(@type='plain')]" mode="pass-2">
<xsl:variable name="type" select="preceding-sibling::liberator:type[1] | following-sibling::liberator:type[1]"/>
<span liberator:highlight="HelpDefault">(default:<xsl:text> </xsl:text>
<xsl:template match="dactyl:default[not(@type='plain')]" mode="pass-2">
<xsl:variable name="type" select="preceding-sibling::dactyl:type[1] | following-sibling::dactyl:type[1]"/>
<span dactyl:highlight="HelpDefault">(default:<xsl:text> </xsl:text>
<xsl:choose>
<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:otherwise>
<span>
<xsl:attribute name="liberator:highlight">
<xsl:attribute name="dactyl:highlight">
<xsl:choose>
<xsl:when test="$type = 'boolean'">Boolean</xsl:when>
<xsl:when test="$type = 'number'">Number</xsl:when>
@@ -223,22 +223,22 @@
<!-- Tag Definitions {{{1 -->
<xsl:template match="liberator:tags" mode="pass-2">
<xsl:template match="dactyl:tags" mode="pass-2">
<div style="clear: right"/>
<xsl:call-template name="parse-tags">
<xsl:with-param name="text" select="."/>
</xsl:call-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:with-param name="text" select="."/>
</xsl:call-template>
</xsl:template>
<xsl:template name="parse-tags">
<xsl:param name="text"/>
<div liberator:highlight="HelpTags">
<div dactyl:highlight="HelpTags">
<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>
</div>
</xsl:template>
@@ -248,7 +248,7 @@
<xsl:template name="linkify-tag">
<xsl:param name="contents" select="text()"/>
<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:attribute name="href">#<xsl:value-of select="$tag"/></xsl:attribute>
</xsl:if>
@@ -256,25 +256,25 @@
</a>
</xsl:template>
<xsl:template match="liberator:o" mode="pass-2">
<span liberator:highlight="HelpOption">
<xsl:template match="dactyl:o" mode="pass-2">
<span dactyl:highlight="HelpOption">
<xsl:call-template name="linkify-tag">
<xsl:with-param name="contents" select='concat("&#39;", text(), "&#39;")'/>
</xsl:call-template>
</span>
</xsl:template>
<xsl:template match="liberator:t" mode="pass-2">
<span liberator:highlight="HelpTopic">
<xsl:template match="dactyl:t" mode="pass-2">
<span dactyl:highlight="HelpTopic">
<xsl:call-template name="linkify-tag"/>
</span>
</xsl:template>
<xsl:template match="liberator:k" mode="pass-2">
<span liberator:highlight="HelpKey">
<xsl:template match="dactyl:k" mode="pass-2">
<span dactyl:highlight="HelpKey">
<xsl:call-template name="linkify-tag"/>
</span>
</xsl:template>
<xsl:template match="liberator:k[@name]" mode="pass-2">
<span liberator:highlight="HelpKey">
<xsl:template match="dactyl:k[@name]" mode="pass-2">
<span dactyl:highlight="HelpKey">
<xsl:call-template name="linkify-tag">
<xsl:with-param name="contents" select="concat('&lt;', @name, '>', .)"/>
</xsl:call-template>
@@ -283,76 +283,76 @@
<!-- HTML-ish elements {{{1 -->
<xsl:template match="liberator:dl" mode="pass-2">
<xsl:template match="dactyl:dl" mode="pass-2">
<dl>
<column/>
<column/>
<xsl:for-each select="liberator:dt">
<xsl:for-each select="dactyl:dt">
<tr>
<xsl:apply-templates select="."/>
<xsl:apply-templates select="following-sibling::liberator:dd[1]"/>
<xsl:apply-templates select="following-sibling::dactyl:dd[1]"/>
</tr>
</xsl:for-each>
</dl>
</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>
</xsl:template>
<xsl:template match="liberator:em | liberator:tt | liberator:p |
liberator:dt | liberator:dd |
liberator:ol | liberator:ul | liberator:li |
liberator:h1 | liberator:h2 | liberator:h3"
<xsl:template match="dactyl:em | dactyl:tt | dactyl:p |
dactyl:dt | dactyl:dd |
dactyl:ol | dactyl:ul | dactyl:li |
dactyl:h1 | dactyl:h2 | dactyl:h3"
mode="pass-2">
<xsl:element name="html:{local-name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="liberator:code" mode="pass-2">
<pre liberator:highlight="HelpCode"><xsl:apply-templates select="@*|node()"/></pre>
<xsl:template match="dactyl:code" mode="pass-2">
<pre dactyl:highlight="HelpCode"><xsl:apply-templates select="@*|node()"/></pre>
</xsl:template>
<!-- Help elements {{{1 -->
<xsl:template match="liberator:a" mode="pass-2">
<span liberator:highlight="HelpArg">{<xsl:apply-templates select="@*|node()"/>}</span>
<xsl:template match="dactyl:a" mode="pass-2">
<span dactyl:highlight="HelpArg">{<xsl:apply-templates select="@*|node()"/>}</span>
</xsl:template>
<xsl:template match="liberator:oa" mode="pass-2">
<span liberator:highlight="HelpOptionalArg">[<xsl:apply-templates select="@*|node()"/>]</span>
<xsl:template match="dactyl:oa" mode="pass-2">
<span dactyl:highlight="HelpOptionalArg">[<xsl:apply-templates select="@*|node()"/>]</span>
</xsl:template>
<xsl:template match="liberator:note" mode="pass-2">
<xsl:template match="dactyl:note" mode="pass-2">
<p style="clear: both;">
<xsl:apply-templates select="@*"/>
<div style="clear: both;"/>
<span liberator:highlight="HelpNote">Note:</span>
<span dactyl:highlight="HelpNote">Note:</span>
<xsl:text> </xsl:text>
<xsl:apply-templates select="node()"/>
</p>
</xsl:template>
<xsl:template match="liberator:warning" mode="pass-2">
<xsl:template match="dactyl:warning" mode="pass-2">
<p style="clear: both;">
<xsl:apply-templates select="@*"/>
<div style="clear: both;"/>
<span liberator:highlight="HelpWarning">Warning:</span>
<span dactyl:highlight="HelpWarning">Warning:</span>
<xsl:text> </xsl:text>
<xsl:apply-templates select="node()"/>
</p>
</xsl:template>
<xsl:template match="liberator:default" mode="pass-2">
<span liberator:highlight="HelpDefault">
<xsl:template match="dactyl:default" mode="pass-2">
<span dactyl:highlight="HelpDefault">
(default:<xsl:text> </xsl:text><xsl:apply-templates select="@*|node()"/>)
</span>
</xsl:template>
<!-- HTML-ify other elements {{{1 -->
<xsl:template match="liberator:ex" mode="pass-2">
<span liberator:highlight="HelpEx">
<xsl:template match="dactyl:ex" mode="pass-2">
<span dactyl:highlight="HelpEx">
<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:attribute name="href">#<xsl:value-of select="$tag"/></xsl:attribute>
</xsl:if>
@@ -361,19 +361,19 @@
</span>
</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>
<xsl:if test="self::liberator:description"><xsl:attribute name="liberator: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::liberator:spec"><xsl:attribute name="liberator:highlight">HelpSpec</xsl:attribute></xsl:if>
<xsl:if test="self::dactyl:description"><xsl:attribute name="dactyl:highlight">HelpDescription</xsl:attribute></xsl:if>
<xsl:if test="self::dactyl:example"><xsl:attribute name="dactyl:highlight">HelpExample</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()"/>
</div>
</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>
<xsl:if test="self::liberator:str"><xsl:attribute name="liberator: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::liberator:type"><xsl:attribute name="liberator:highlight">HelpType</xsl:attribute></xsl:if>
<xsl:if test="self::dactyl:str"><xsl:attribute name="dactyl:highlight">HelpString</xsl:attribute></xsl:if>
<xsl:if test="self::dactyl:t"><xsl:attribute name="dactyl:highlight">HelpTopic</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()"/>
</span>
</xsl:template>
@@ -385,11 +385,11 @@
<xsl:param name="link" select="@href"/>
<xsl:param name="nodes" select="node()"/>
<xsl:param name="extra"/>
<div liberator:highlight="HelpInfo">
<div liberator:highlight="HelpInfoLabel">
<div dactyl:highlight="HelpInfo">
<div dactyl:highlight="HelpInfoLabel">
<xsl:value-of select="$label"/>:
</div>
<span liberator:highlight="HelpInfoValue">
<span dactyl:highlight="HelpInfoValue">
<a>
<xsl:if test="$link">
<xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
@@ -400,7 +400,7 @@
</span>
</div>
</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:with-param name="label" select="'Author'"/>
<xsl:with-param name="extra">
@@ -408,17 +408,17 @@
</xsl:with-param>
</xsl:call-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:with-param name="label" select="'Author'"/>
</xsl:call-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:with-param name="label" select="'License'"/>
</xsl:call-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:with-param name="label" select="'Plugin'"/>
<xsl:with-param name="nodes">
@@ -430,15 +430,15 @@
<!-- Special Element Templates {{{1 -->
<xsl:template match="liberator:logo">
<span liberator:highlight="Logo"/>
<xsl:template match="dactyl:logo">
<span dactyl:highlight="Logo"/>
</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"
action="https://www.paypal.com/cgi-bin/webscr" method="post">
<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-----
"/>
</form>

View File

@@ -43,11 +43,11 @@ const Hints = Module("hints", {
s: Mode("Save hint", function (elem) buffer.saveLink(elem, true)),
a: Mode("Save hint with prompt", function (elem) buffer.saveLink(elem, false)),
f: Mode("Focus frame", function (elem) elem.ownerDocument.defaultView.focus(), function () ["body"]),
o: Mode("Follow hint", function (elem) buffer.followLink(elem, liberator.CURRENT_TAB)),
t: Mode("Follow hint in a new tab", function (elem) buffer.followLink(elem, liberator.NEW_TAB)),
b: Mode("Follow hint in a background tab", function (elem) buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB)),
w: Mode("Follow hint in a new window", function (elem) buffer.followLink(elem, liberator.NEW_WINDOW), extended),
F: Mode("Open multiple hints in tabs", function (elem) { buffer.followLink(elem, liberator.NEW_BACKGROUND_TAB); hints.show("F") }),
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, dactyl.NEW_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, dactyl.NEW_WINDOW), extended),
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)),
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)),
@@ -56,8 +56,8 @@ const Hints = Module("hints", {
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),
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 in a new tab", function (elem) liberator.open(elem.src, liberator.NEW_TAB), images)
i: Mode("Show image", function (elem) dactyl.open(elem.src), 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) {
try {
// 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 coordStr = elem.getAttribute("coords");
// Technically it should be only commas, but hey
@@ -357,7 +357,7 @@ const Hints = Module("hints", {
if (!rect)
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.top = (rect.top + offsetY) + "px";
hint.imgSpan.style.width = (rect.right - rect.left) + "px";
@@ -381,7 +381,7 @@ const Hints = Module("hints", {
let css = [];
// FIXME: Broken for imgspans.
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");
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;
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);
for (let i in util.range(start, end + 1)) {
let hint = this._pageHints[i];
@@ -433,7 +433,7 @@ const Hints = Module("hints", {
*/
_processHints: function (followFirst) {
if (this._validHints.length == 0) {
liberator.beep();
dactyl.beep();
return false;
}
@@ -445,7 +445,7 @@ const Hints = Module("hints", {
// OK. return hit. But there's more than one hint, and
// 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) {
@@ -478,7 +478,7 @@ const Hints = Module("hints", {
_checkUnique: function () {
if (this._hintNumber == 0)
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
// 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 "wordstartswith": return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ true);
case "firstletters" : return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ false);
case "custom" : return liberator.plugins.customHintMatcher(hintString);
default : liberator.echoerr("Invalid hintmatching type: " + hintMatching);
case "custom" : return dactyl.plugins.customHintMatcher(hintString);
default : dactyl.echoerr("Invalid hintmatching type: " + hintMatching);
}
return null;
}, //}}}
@@ -713,7 +713,7 @@ const Hints = Module("hints", {
*/
show: function (minor, filter, win) {
this._hintMode = this._hintModes[minor];
liberator.assert(this._hintMode);
dactyl.assert(this._hintMode);
commandline.input(this._hintMode.prompt + ": ", null, { onChange: this.closure._onInput });
modes.extended = modes.HINTS;
@@ -728,13 +728,13 @@ const Hints = Module("hints", {
this._generate(win);
// get all keys from the input queue
liberator.threadYield(true);
dactyl.threadYield(true);
this._canUpdate = true;
this._showHints();
if (this._validHints.length == 0) {
liberator.beep();
dactyl.beep();
modes.reset();
}
else if (this._validHints.length == 1)
@@ -798,7 +798,7 @@ const Hints = Module("hints", {
else {
this._usedTabKey = false;
this._hintNumber = 0;
liberator.beep();
dactyl.beep();
return;
}
break;
@@ -834,7 +834,7 @@ const Hints = Module("hints", {
}
this._showActiveHint(this._hintNumber, oldHintNumber || 1);
liberator.assert(this._hintNumber != 0);
dactyl.assert(this._hintNumber != 0);
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
// gH, except that gF is already taken). --tpp
//
// Likewise, it might be nice to have a liberator.NEW_FOREGROUND_TAB
// and then make liberator.NEW_TAB always do what a Cntrl+Click
// Likewise, it might be nice to have a dactyl.NEW_FOREGROUND_TAB
// and then make dactyl.NEW_TAB always do what a Cntrl+Click
// does. --tpp
mappings.add(myModes, ["F"],
"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."],
["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."],
["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)"]
]
});

View File

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

View File

@@ -170,7 +170,7 @@ const File = Class("File", {
ocstream.writeString(buf);
}
catch (e) {
liberator.dump(e);
dactyl.dump(e);
if (e.result == Cr.NS_ERROR_LOSS_OF_SIGNIFICANT_DATA) {
ocstream = getStream("?".charCodeAt(0));
ocstream.writeString(buf);
@@ -251,7 +251,7 @@ const File = Class("File", {
// Kris reckons we shouldn't replicate this 'bug'. --djk
// TODO: should we be doing this for all paths?
function expand(path) path.replace(
!liberator.has("Win32") ? /\$(\w+)\b|\${(\w+)}/g
!dactyl.has("Win32") ? /\$(\w+)\b|\${(\w+)}/g
: /\$(\w+)\b|\${(\w+)}|%(\w+)%/g,
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");
// Windows has its own idiosyncratic $HOME variables.
if (!home && liberator.has("Win32"))
if (!home && dactyl.has("Win32"))
home = services.get("environment").get("USERPROFILE") ||
services.get("environment").get("HOMEDRIVE") + services.get("environment").get("HOMEPATH");
@@ -340,7 +340,7 @@ const IO = Module("io", {
let file = download.targetFile.path;
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 });
}
},
@@ -426,7 +426,7 @@ const IO = Module("io", {
let dir = File(newDir);
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;
}
@@ -465,7 +465,7 @@ const IO = Module("io", {
let rcFile1 = 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];
if (rcFile1.exists() && rcFile1.isFile())
@@ -509,9 +509,9 @@ const IO = Module("io", {
if (File.isAbsolutePath(program))
file = File(program, true);
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?
if (liberator.has("Win32"))
if (dactyl.has("Win32"))
dirs = [io.getCurrentDirectory().path].concat(dirs);
lookup:
@@ -523,7 +523,7 @@ lookup:
// TODO: couldn't we just palm this off to the start command?
// 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(";");
for (let [, extension] in Iterator(extensions)) {
file = File.joinPaths(dir, program + extension);
@@ -537,7 +537,7 @@ lookup:
}
if (!file || !file.exists()) {
liberator.echoerr("Command not found: " + program);
dactyl.echoerr("Command not found: " + program);
return -1;
}
@@ -564,14 +564,14 @@ lookup:
let dirs = File.getPathsFromPathList(options["runtimepath"]);
let found = false;
liberator.echomsg("Searching for \"" + paths.join(" ") + "\" in \"" + options["runtimepath"] + "\"", 2);
dactyl.echomsg("Searching for \"" + paths.join(" ") + "\" in \"" + options["runtimepath"] + "\"", 2);
outer:
for (let [, dir] in Iterator(dirs)) {
for (let [, path] in Iterator(paths)) {
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()) {
io.source(file.path, false);
@@ -584,7 +584,7 @@ lookup:
}
if (!found)
liberator.echomsg("not found in 'runtimepath': \"" + paths.join(" ") + "\"", 1);
dactyl.echomsg("not found in 'runtimepath': \"" + paths.join(" ") + "\"", 1);
return found;
},
@@ -597,7 +597,7 @@ lookup:
*/
source: function (filename, silent) {
let wasSourcing = this.sourcing;
liberator.dump("sourcing " + filename);
dactyl.dump("sourcing " + filename);
let time = Date.now();
try {
var file = File(filename);
@@ -609,17 +609,17 @@ lookup:
if (!file.exists() || !file.isReadable() || file.isDirectory()) {
if (!silent) {
if (file.exists() && file.isDirectory())
liberator.echomsg("Cannot source a directory: \"" + filename + "\"", 0);
dactyl.echomsg("Cannot source a directory: \"" + filename + "\"", 0);
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;
}
liberator.echomsg("sourcing \"" + filename + "\"", 2);
dactyl.echomsg("sourcing \"" + filename + "\"", 2);
let str = file.read();
let uri = services.get("io").newFileURI(file);
@@ -627,8 +627,8 @@ lookup:
// handle pure JavaScript files specially
if (/\.js$/.test(filename)) {
try {
liberator.loadScript(uri.spec, Script(file));
liberator.helpInitialized = false;
dactyl.loadScript(uri.spec, Script(file));
dactyl.helpInitialized = false;
}
catch (e) {
let err = new Error();
@@ -671,9 +671,9 @@ lookup:
if (!command) {
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);
liberator.echoerr("E492: Not an editor command: " + line);
dactyl.echoerr("E492: Not an editor command: " + line);
}
else {
if (command.name == "finish")
@@ -705,18 +705,18 @@ lookup:
if (this._scriptNames.indexOf(file.path) == -1)
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) {
liberator.reportError(e);
dactyl.reportError(e);
let message = "Sourcing file: " + (e.echoerr || file.path + ": " + e);
if (!silent)
liberator.echoerr(message);
dactyl.echoerr(message);
}
finally {
liberator.dump("done sourcing " + filename + ": " + (Date.now() - time) + "ms");
dactyl.dump("done sourcing " + filename + ": " + (Date.now() - time) + "ms");
this.sourcing = wasSourcing;
}
},
@@ -732,7 +732,7 @@ lookup:
* @returns {string}
*/
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, "\\$&") + '"';
@@ -741,7 +741,7 @@ lookup:
stdin.write(input);
// TODO: implement 'shellredir'
if (liberator.has("Win32")) {
if (dactyl.has("Win32")) {
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);
}
@@ -788,14 +788,14 @@ lookup:
}
}, {
/**
* @property {string} The value of the $VIMPERATOR_RUNTIME environment
* @property {string} The value of the $PENTADACTYL_RUNTIME environment
* variable.
*/
get runtimePath() {
const rtpvar = config.name.toUpperCase() + "_RUNTIME";
let rtp = services.get("environment").get(rtpvar);
if (!rtp) {
rtp = "~/" + (liberator.has("Win32") ? "" : ".") + config.name.toLowerCase();
rtp = "~/" + (dactyl.has("Win32") ? "" : ".") + config.name.toLowerCase();
services.get("environment").set(rtpvar, rtp);
}
return rtp;
@@ -820,7 +820,7 @@ lookup:
if (!arg)
arg = "~";
else if (arg == "-") {
liberator.assert(io._oldcwd, "E186: No previous directory");
dactyl.assert(io._oldcwd, "E186: No previous directory");
arg = io._oldcwd.path;
}
@@ -831,7 +831,7 @@ lookup:
// TODO: handle ../ and ./ paths
if (File.isAbsolutePath(arg)) {
if (io.setCurrentDirectory(arg))
liberator.echomsg(io.getCurrentDirectory().path);
dactyl.echomsg(io.getCurrentDirectory().path);
}
else {
let dirs = File.getPathsFromPathList(options["cdpath"]);
@@ -842,14 +842,14 @@ lookup:
if (dir.exists() && dir.isDirectory() && dir.isReadable()) {
io.setCurrentDirectory(dir.path);
liberator.echomsg(io.getCurrentDirectory().path);
dactyl.echomsg(io.getCurrentDirectory().path);
found = true;
break;
}
}
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");
}
}
@@ -862,32 +862,32 @@ lookup:
// NOTE: this command is only used in :source
commands.add(["fini[sh]"],
"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" });
commands.add(["pw[d]"],
"Print the current directory name",
function () { liberator.echomsg(io.getCurrentDirectory().path); },
function () { dactyl.echomsg(io.getCurrentDirectory().path); },
{ argCount: "0" });
// "mkv[imperatorrc]" or "mkm[uttatorrc]"
commands.add([config.name.toLowerCase().replace(/(.)(.*)/, "mk$1[$2rc]")],
"Write current key mappings and changed options to the config file",
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 file = File(filename);
liberator.assert(!file.exists() || args.bang,
dactyl.assert(!file.exists() || args.bang,
"E189: \"" + filename + "\" exists (add ! to override)");
// TODO: Use a set/specifiable list here:
let lines = [cmd.serial().map(commands.commandToString) for (cmd in commands) if (cmd.serial)];
lines = util.Array.flatten(lines);
// source a user .vimperatorrc file
lines.unshift('"' + liberator.version + "\n");
// source a user .pentadactylrc file
lines.unshift('"' + dactyl.version + "\n");
// For the record, I think that adding this line is absurd. --Kris
// I can't disagree. --djk
@@ -903,8 +903,8 @@ lookup:
file.write(lines.join("\n"));
}
catch (e) {
liberator.echoerr("E190: Cannot open \"" + filename + "\" for writing");
liberator.log("Could not write to " + file.path + ": " + e.message); // XXX
dactyl.echoerr("E190: Cannot open \"" + filename + "\" for writing");
dactyl.log("Could not write to " + file.path + ": " + e.message); // XXX
}
}, {
argCount: "*", // FIXME: should be "?" but kludged for proper error message
@@ -934,7 +934,7 @@ lookup:
"Read Ex commands from a file",
function (args) {
if (args.length > 1)
liberator.echoerr("E172: Only one file name allowed");
dactyl.echoerr("E172: Only one file name allowed");
else
io.source(args[0], args.bang);
}, {
@@ -954,7 +954,7 @@ lookup:
arg = "!" + arg;
// replaceable bang and no previous command?
liberator.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand,
dactyl.assert(!/((^|[^\\])(\\\\)*)!/.test(arg) || io._lastRunCommand,
"E34: No previous command");
// 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)
options.getPref("intl.charsetmenu.browser." + key).split(', '))
).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")]);
};
};
@@ -1003,7 +1003,7 @@ lookup:
};
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");
lines.pop();
@@ -1050,7 +1050,7 @@ lookup:
completion.shellCommand = function shellCommand(context) {
context.title = ["Shell Command", "Path"];
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 = [];
for (let [, dirName] in Iterator(dirNames)) {
@@ -1072,7 +1072,7 @@ lookup:
},
options: function () {
var shell, shellcmdflag;
if (liberator.has("Win32")) {
if (dactyl.has("Win32")) {
shell = "cmd.exe";
// TODO: setting 'shell' to "something containing sh" updates
// 'shellcmdflag' appropriately at startup on Windows in Vim

View File

@@ -123,7 +123,7 @@ const JavaScript = Module("javascript", {
context[JavaScript.EVAL_TMP] = tmp;
try {
return cache[key] = liberator.eval(arg, context);
return cache[key] = dactyl.eval(arg, context);
}
catch (e) {
return null;
@@ -429,7 +429,7 @@ const JavaScript = Module("javascript", {
}
catch (e) {
if (e.message != "Invalid JS")
liberator.reportError(e);
dactyl.reportError(e);
this._lastIdx = 0;
return null;
}
@@ -499,7 +499,7 @@ const JavaScript = Module("javascript", {
obj = obj.slice(0, 1);
try {
var completer = obj[0][0][func].liberatorCompleter;
var completer = obj[0][0][func].dactylCompleter;
}
catch (e) {}
if (!completer)
@@ -566,7 +566,7 @@ const JavaScript = Module("javascript", {
return null;
}
}, {
EVAL_TMP: "__liberator_eval_tmp",
EVAL_TMP: "__dactyl_eval_tmp",
/**
* A map of argument completion functions for named methods. The
@@ -598,7 +598,7 @@ const JavaScript = Module("javascript", {
setCompleter: function (funcs, completers) {
funcs = Array.concat(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];
if (!completer)
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.
mappings.repeat = repeat;
return liberator.trapErrors(repeat);
return dactyl.trapErrors(repeat);
}
});
@@ -179,7 +179,7 @@ const Mappings = Module("mappings", {
/** @property {Iterator(Map)} @private */
__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
* <b>mode</b>.
@@ -295,7 +295,7 @@ const Mappings = Module("mappings", {
*/
// FIXME: property
getMapLeader: function () {
let leaderRef = liberator.variableReference("mapleader");
let leaderRef = dactyl.variableReference("mapleader");
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
if (list.*.length() == list.text().length()) {
liberator.echomsg("No mapping found");
dactyl.echomsg("No mapping found");
return;
}
commandline.echo(list, commandline.HL_NORMAL, commandline.FORCE_MULTILINE);
@@ -460,7 +460,7 @@ const Mappings = Module("mappings", {
}
}
if (!found)
liberator.echoerr("E31: No such mapping");
dactyl.echoerr("E31: No such mapping");
},
{
argCount: "1",

View File

@@ -58,7 +58,7 @@ const Marks = Module("marks", {
return;
if (doc.body instanceof HTMLFrameSetElement) {
if (!silent)
liberator.echoerr("Marks support for frameset pages not implemented yet");
dactyl.echoerr("Marks support for frameset pages not implemented yet");
return;
}
@@ -69,7 +69,7 @@ const Marks = Module("marks", {
if (Marks.isURLMark(mark)) {
this._urlMarks.set(mark, { location: win.location.href, position: position, tab: tabs.getTab() });
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)) {
// 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 };
this._localMarks.get(mark).push(vals);
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);
// NOTE: this obviously won't work on generated pages using
// non-unique URLs :(
liberator.open(slice.location, liberator.NEW_TAB);
dactyl.open(slice.location, dactyl.NEW_TAB);
return;
}
let index = tabs.index(slice.tab);
@@ -137,7 +137,7 @@ const Marks = Module("marks", {
win.location.href = slice.location;
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);
ok = true;
}
@@ -149,7 +149,7 @@ const Marks = Module("marks", {
for (let [, lmark] in Iterator(slice)) {
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);
ok = true;
break;
@@ -158,7 +158,7 @@ const Marks = Module("marks", {
}
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) {
let marks = this.all;
liberator.assert(marks.length > 0, "No marks set");
dactyl.assert(marks.length > 0, "No marks set");
if (filter.length > 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(
@@ -204,7 +204,7 @@ const Marks = Module("marks", {
let win = window.content;
for (let [i, ] in Iterator(localmark)) {
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);
if (localmark.length == 0)
this._localMarks.remove(mark);
@@ -217,7 +217,7 @@ const Marks = Module("marks", {
_removeURLMark: function _removeURLMark(mark) {
let urlmark = this._urlMarks.get(mark);
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);
}
},
@@ -251,7 +251,7 @@ const Marks = Module("marks", {
mappings.add(myModes,
["m"], "Set mark at the cursor position",
function (arg) {
liberator.assert(/^[a-zA-Z]$/.test(arg));
dactyl.assert(/^[a-zA-Z]$/.test(arg));
marks.add(arg);
},
{ arg: true });
@@ -270,19 +270,19 @@ const Marks = Module("marks", {
args = args.string;
// assert(special ^ args)
liberator.assert( special || args, "E471: Argument required");
liberator.assert(!special || !args, "E474: Invalid argument");
dactyl.assert( special || args, "E471: Argument required");
dactyl.assert(!special || !args, "E474: Invalid argument");
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
// deletes any valid marks in the arg list, up to the first
// 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
if ((matches = args.match(/[a-zA-Z0-9]-[a-zA-Z0-9]/g))) {
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],
"E475: Invalid argument: " + args.match(match + ".*")[0]);
}
@@ -298,8 +298,8 @@ const Marks = Module("marks", {
"Mark current location within the web page",
function (args) {
let mark = args[0];
liberator.assert(mark.length <= 1, "E488: Trailing characters");
liberator.assert(/[a-zA-Z]/.test(mark),
dactyl.assert(mark.length <= 1, "E488: Trailing characters");
dactyl.assert(/[a-zA-Z]/.test(mark),
"E191: Argument must be a letter or forward/backward quote");
marks.add(mark);
@@ -312,7 +312,7 @@ const Marks = Module("marks", {
args = args.string;
// 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());
let filter = args.replace(/[^a-zA-Z]/g, "");

View File

@@ -118,7 +118,7 @@ const Modes = Module("modes", {
options.setPref("accessibility.browsewithcaret", false);
statusline.updateUrl();
liberator.focusContent(true);
dactyl.focusContent(true);
}
},
@@ -191,7 +191,7 @@ const Modes = Module("modes", {
if (this._main != oldMain)
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)
this.show();

View File

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

View File

@@ -104,13 +104,13 @@ const Option = Class("Option", {
let values;
if (liberator.has("tabs") && (scope & Option.SCOPE_LOCAL))
if (dactyl.has("tabs") && (scope & Option.SCOPE_LOCAL))
values = tabs.options[this.name];
if ((scope & Option.SCOPE_GLOBAL) && (values == undefined))
values = this.globalValue;
if (this.getter)
return liberator.trapErrors(this.getter, this, values);
return dactyl.trapErrors(this.getter, this, values);
return values;
},
@@ -128,11 +128,11 @@ const Option = Class("Option", {
return;
if (this.setter)
newValues = liberator.trapErrors(this.setter, this, newValues);
newValues = dactyl.trapErrors(this.setter, this, newValues);
if (newValues === undefined)
return;
if (liberator.has("tabs") && (scope & Option.SCOPE_LOCAL))
if (dactyl.has("tabs") && (scope & Option.SCOPE_LOCAL))
tabs.options[this.name] = newValues;
if ((scope & Option.SCOPE_GLOBAL) && !skipGlobal)
this.globalValue = newValues;
@@ -235,7 +235,7 @@ const Option = Class("Option", {
* @property {string} The option's data type. One of:
* "boolean" - Boolean, e.g., true
* "number" - Integer, e.g., 1
* "string" - String, e.g., "Vimperator"
* "string" - String, e.g., "Pentadactyl"
* "charlist" - Character list, e.g., "rb"
* "regexlist" - Regex list, e.g., "^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");
if (!/keypress/.test(popupAllowedEvents)) {
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")
this._storePreference("dom.popup_allowed_events", popupAllowedEvents);
});
@@ -550,7 +550,7 @@ const Options = Module("options", {
switch (data) {
case "accessibility.browsewithcaret":
let value = options.getPref("accessibility.browsewithcaret", false);
liberator.mode = value ? modes.CARET : modes.NORMAL;
dactyl.mode = value ? modes.CARET : modes.NORMAL;
break;
}
}
@@ -579,7 +579,7 @@ const Options = Module("options", {
if (option.name in this._optionHash) {
// 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;
}
@@ -777,7 +777,7 @@ const Options = Module("options", {
*
* @param {string} name The preference name.
* @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) {
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.";
if (message)
msg += " " + message;
liberator.echomsg(msg);
dactyl.echomsg(msg);
}
this._storePreference(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)
this.setPref(name, !this.getPref(name));
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);
}
else if (type == Ci.nsIPrefBranch.PREF_INT)
liberator.echoerr("E521: Number required after =: " + name + "=" + value);
dactyl.echoerr("E521: Number required after =: " + name + "=" + value);
else
liberator.echoerr("E474: Invalid argument: " + name + "=" + value);
dactyl.echoerr("E474: Invalid argument: " + name + "=" + value);
break;
case "number":
if (type == Ci.nsIPrefBranch.PREF_INVALID || type == Ci.nsIPrefBranch.PREF_INT)
services.get("pref").setIntPref(name, value);
else
liberator.echoerr("E474: Invalid argument: " + name + "=" + value);
dactyl.echoerr("E474: Invalid argument: " + name + "=" + value);
break;
case "boolean":
if (type == Ci.nsIPrefBranch.PREF_INVALID || type == Ci.nsIPrefBranch.PREF_BOOL)
services.get("pref").setBoolPref(name, value);
else if (type == Ci.nsIPrefBranch.PREF_INT)
liberator.echoerr("E521: Number required after =: " + name + "=" + value);
dactyl.echoerr("E521: Number required after =: " + name + "=" + value);
else
liberator.echoerr("E474: Invalid argument: " + name + "=" + value);
dactyl.echoerr("E474: Invalid argument: " + name + "=" + value);
break;
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.",
OLD_SAVED: "liberator.saved."
SAVED: "extensions.dactyl.saved.",
OLD_SAVED: "dactyl.saved."
}, {
commandline: function () {
// TODO: maybe reset in .destroy()?
@@ -1020,10 +1020,10 @@ const Options = Module("options", {
}
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;
liberator.assert(option != null || opt.all,
dactyl.assert(option != null || opt.all,
"E518: Unknown option: " + opt.name);
// reset a variable to its default value
@@ -1051,7 +1051,7 @@ const Options = Module("options", {
msg += "\n Last set from " + option.setFrom.path;
// 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
@@ -1059,7 +1059,7 @@ const Options = Module("options", {
option.setFrom = modifiers.setFrom || null;
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;
}
try {
@@ -1069,7 +1069,7 @@ const Options = Module("options", {
res = e;
}
if (res)
liberator.echoerr(res);
dactyl.echoerr(res);
}
}
}
@@ -1138,7 +1138,7 @@ const Options = Module("options", {
let str =
<table>
{
template.map(liberator.globalVariables, function ([i, value]) {
template.map(dactyl.globalVariables, function ([i, value]) {
let prefix = typeof value == "number" ? "#" :
typeof value == "function" ? "*" :
" ";
@@ -1150,9 +1150,9 @@ const Options = Module("options", {
}
</table>;
if (str.*.length())
liberator.echo(str, commandline.FORCE_MULTILINE);
dactyl.echo(str, commandline.FORCE_MULTILINE);
else
liberator.echomsg("No variables found");
dactyl.echomsg("No variables found");
return;
}
@@ -1161,16 +1161,16 @@ const Options = Module("options", {
if (matches) {
let [, type, name, stuff, expr] = matches;
if (!type) {
let reference = liberator.variableReference(name);
liberator.assert(reference[0] || !stuff,
let reference = dactyl.variableReference(name);
dactyl.assert(reference[0] || !stuff,
"E121: Undefined variable: " + name);
expr = liberator.evalExpression(expr);
liberator.assert(expr !== undefined, "E15: Invalid expression: " + expr);
expr = dactyl.evalExpression(expr);
dactyl.assert(expr !== undefined, "E15: Invalid expression: " + expr);
if (!reference[0]) {
if (reference[2] == "g")
reference[0] = liberator.globalVariables;
reference[0] = dactyl.globalVariables;
else
return; // for now
}
@@ -1190,14 +1190,14 @@ const Options = Module("options", {
}
// 1 - name
else if ((matches = args.match(/^\s*([\w:]+)\s*$/))) {
let reference = liberator.variableReference(matches[1]);
liberator.assert(reference[0], "E121: Undefined variable: " + matches[1]);
let reference = dactyl.variableReference(matches[1]);
dactyl.assert(reference[0], "E121: Undefined variable: " + matches[1]);
let value = reference[0][reference[1]];
let prefix = typeof value == "number" ? "#" :
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",
function (args) {
for (let [, name] in args) {
let reference = liberator.variableReference(name);
let reference = dactyl.variableReference(name);
if (!reference[0]) {
if (!args.bang)
liberator.echoerr("E108: No such variable: " + name);
dactyl.echoerr("E108: No such variable: " + name);
return;
}

View File

@@ -4,7 +4,7 @@
<script type="application/javascript;version=1.8">
let uri = Components.classes["@mozilla.org/network/io-service;1"]
.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.
window.close();
</script>

View File

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

View File

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

View File

@@ -22,7 +22,7 @@ const Services = Module("services", {
this.add("browserSearch", "@mozilla.org/browser/search-service;1", Ci.nsIBrowserSearchService);
this.add("cache", "@mozilla.org/network/cache-service;1", Ci.nsICacheService);
this.add("console", "@mozilla.org/consoleservice;1", Ci.nsIConsoleService);
this.add("liberator:", "@mozilla.org/network/protocol;1?name=liberator");
this.add("dactyl:", "@mozilla.org/network/protocol;1?name=dactyl");
this.add("debugger", "@mozilla.org/js/jsd/debugger-service;1", Ci.jsdIDebuggerService);
this.add("directory", "@mozilla.org/file/directory_service;1", Ci.nsIProperties);
this.add("downloadManager", "@mozilla.org/download-manager;1", Ci.nsIDownloadManager);
@@ -64,7 +64,7 @@ const Services = Module("services", {
return res;
}
catch (e) {
// liberator.log() is not defined at this time, so just dump any error
// dactyl.log() is not defined at this time, so just dump any error
dump("Service creation failed for '" + classes + "': " + e + "\n");
return null;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,11 +1,11 @@
<?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
name="all"
title="&liberator.appname; All"
title="&dactyl.appname; All"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<tags>all</tags>

View File

@@ -1,11 +1,11 @@
<?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
name="autocommands"
title="&liberator.appname; Autocommands"
title="&dactyl.appname; Autocommands"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="autocommands">Automatic commands</h1>
@@ -31,7 +31,7 @@
variables.
</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>
<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-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
name="browsing"
title="&liberator.appname; Browsing"
title="&dactyl.appname; Browsing"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="surfing browsing">Browsing</h1>
<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
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:
<item>
@@ -21,7 +21,7 @@ have 2 possibilities:
<spec>CTRL-Z</spec>
<description>
<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
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,
@@ -37,10 +37,10 @@ have 2 possibilities:
<description>
<p>
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;
shortcuts like <k name="C-o"/> which are otherwise hidden in &liberator.appname;. When
&liberator.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.
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 &dactyl.appname;. When
&dactyl.appname; mode is temporarily disabled with <k name="C-z"/>, <k name="C-v"/> will pass
the next key to &dactyl.appname; instead of the web page.
</p>
</description>
</item>
@@ -87,7 +87,7 @@ have 2 possibilities:
opens a Google search for linus torvalds).
</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>
opens OSNews in the current, and Slashdot in a new
background tab).
@@ -441,7 +441,7 @@ have 2 possibilities:
<description>
<p>
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.
</p>
</description>
@@ -453,7 +453,7 @@ have 2 possibilities:
<spec>:quita<oa>ll</oa></spec>
<description>
<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.
</p>
</description>
@@ -484,7 +484,7 @@ have 2 possibilities:
<spec>:xa<oa>ll</oa></spec>
<description>
<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
closes the window instead of just one tab by popular demand. Complain on the
mailing list if you want to change that.
@@ -507,7 +507,7 @@ have 2 possibilities:
<spec>ZZ</spec>
<description>
<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>.
</p>
</description>

View File

@@ -1,17 +1,17 @@
<?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
name="buffer"
title="&liberator.appname; Buffer"
title="&dactyl.appname; Buffer"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="buffer document">Buffer</h1>
<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.
<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
<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
<link topic="http://kb.mozillazine.org/Toolkit.zoomManager.zoomValues">'toolkit.ZoomManager.zoomLevels'</link>
preference.

View File

@@ -1,11 +1,11 @@
<?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
name="cmdline"
title="&liberator.appname; Command-line"
title="&dactyl.appname; Command-line"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<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-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;">
]>
<document
name="developer"
title="&liberator.appname; Developer information"
title="&dactyl.appname; Developer information"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="developer-information">Developer information</h1>
@@ -63,7 +63,7 @@
<p>
If you don't know in which file/section you should put some
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>
<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>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>logo</dt> <dd>&liberator.appname;'s logo. (Logo)</dd>
<dt>logo</dt> <dd>&dactyl.appname;'s logo. (Logo)</dd>
</dl>
<dl>
<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>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;@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>
<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
privileges and have full access to the &liberator.appname; and
&liberator.host; APIs. Each plugin has its own global object,
privileges and have full access to the &dactyl.appname; and
&dactyl.host; APIs. Each plugin has its own global object,
which means that the variables and functions that you create
won't pollute the global <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
JavaScript development. Furthermore, any plugin which is
installed in your <o>runtimepath</o><em>/plugin</em> directory
@@ -186,7 +186,7 @@ var INFO =
xmlns="http://vimperator.org/namespaces/liberator">
<author email="maglione.k@gmail.com">Kris Maglione</author>
<license href="http://opensource.org/licenses/mit-license.php">MIT</license>
<project name="Vimperator" minVersion="2.0"/>
<project name="Pentadactyl" minVersion="2.0"/>
<p>
This plugin provides the same features as the ever popular FlashBlock
Firefox addon. Flash animations are substituted with place holders which
@@ -216,9 +216,9 @@ var INFO =
The inline XML is made possible by
<link topic="https://developer.mozilla.org/en/E4X">E4X</link>.
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
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
full tag completion and cross-referencing support. Although
documentation is not required, we strongly recommend that all

View File

@@ -1,11 +1,11 @@
<?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
name="eval"
title="&liberator.appname; Expression Evaluation"
title="&dactyl.appname; Expression Evaluation"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="expression expr eval">Expression evaluation</h1>
@@ -84,12 +84,12 @@
<p>
The special version <ex>:javascript!</ex> opens the JavaScript console of
&liberator.host;.
&dactyl.host;.
</p>
<p>
<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
side effects.
</p>

View File

@@ -1,18 +1,18 @@
<?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
name="gui"
title="&liberator.appname; GUI"
title="&dactyl.appname; GUI"
xmlns="http://vimperator.org/namespaces/liberator"
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"/>
<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
is required. There are commands for accessing the menu system, standard dialogs
and the sidebar.
@@ -26,7 +26,7 @@
<description>
<p>
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.
E.g. <ex>:emenu File.Open File…</ex>
</p>
@@ -41,10 +41,10 @@
<spec>:addo<oa>ns</oa></spec>
<description>
<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.
Be aware that not all &liberator.host; extensions work, because &liberator.appname; overrides
some key bindings and changes &liberator.host;'s GUI.
Be aware that not all &dactyl.host; extensions work, because &dactyl.appname; overrides
some key bindings and changes &dactyl.host;'s GUI.
</p>
</description>
</item>
@@ -52,13 +52,13 @@
<item>
<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>
<p>Open a &liberator.host; dialog.</p>
<p>Open a &dactyl.host; dialog.</p>
<p>Available dialogs:</p>
<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>addons</dt> <dd>Manage Add-ons</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>pagesource</dt> <dd>View page source</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>printsetup</dt> <dd>Setup the page size and orientation before printing</dd>
<dt>print</dt> <dd>Show print dialog</dd>
@@ -93,7 +93,7 @@
<spec>:downl<oa>oads</oa></spec>
<description>
<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.
</p>
</description>
@@ -191,7 +191,7 @@
<description>
<p>
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.
</p>
</description>
@@ -231,7 +231,7 @@
</li>
<li>
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.
<ul>
<li>black the site's identity is unverified and the connection is unencrypted</li>
@@ -242,7 +242,7 @@
</li>
<li>
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>
</ul>

View File

@@ -1,17 +1,17 @@
<?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
name="hints"
title="&liberator.appname; Hints"
title="&dactyl.appname; Hints"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="quick-hints hints">Hints</h1>
<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
similar amount of minimal effort. This contrasts strongly with the traditional
approaches offered by the mouse, in which you must first find and then aim for
@@ -47,7 +47,7 @@ tedious unless you always visit the first link on a page.
Start QuickHint mode, but open link in a new tab. Like normal QuickHint
mode (activated with <k>f</k>) but opens the link in a new tab. The new
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>
</description>
</item>

View File

@@ -1,11 +1,11 @@
<?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
name="index"
title="&liberator.appname; Index"
title="&dactyl.appname; Index"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<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-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-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>
@@ -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>:delqmarks</ex></dt> <dd>Delete the specified QuickMarks</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>: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>
@@ -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>:help</ex></dt> <dd>Open the 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>: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>
@@ -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>:messages</ex></dt> <dd>Display previously given messages</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>: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>
@@ -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>: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>: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>: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>: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>:reload</ex></dt> <dd>Reload the current web page</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>: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>: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>:styleenable</ex></dt> <dd>Enable 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>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>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>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>

View File

@@ -1,11 +1,11 @@
<?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
name="insert"
title="&liberator.appname; Insert Mode"
title="&dactyl.appname; Insert Mode"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="Insert-mode Insert mode-insert">Insert mode</h1>

View File

@@ -1,11 +1,11 @@
<?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
name="map"
title="&liberator.appname; Key Mappings"
title="&dactyl.appname; Key Mappings"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1>Key mappings, abbreviations, and user-defined commands</h1>
@@ -33,12 +33,12 @@
<li>Normal mode: When browsing normally</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>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>
<warning>
Mappings are NOT saved between sessions, make sure you put them in your
&liberator.name;rc file!
&dactyl.name;rc file!
</warning>
<h3 tag=":map-commands">Map commands</h3>
@@ -279,7 +279,7 @@
<h2 tag="abbreviations">Abbreviations</h2>
<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
words. An abbreviation can be one of three types that are defined by the
types of constituent characters. Whitespace and quotes are non-keyword
@@ -475,7 +475,7 @@
<dt>buffer</dt> <dd>buffers</dd>
<dt>color</dt> <dd>color schemes</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>environment</dt> <dd>environment variables</dd>
<dt>event</dt> <dd>autocommand events</dd>
@@ -486,8 +486,8 @@
<dt>macro</dt> <dd>named macros</dd>
<dt>mapping</dt> <dd>user mappings</dd>
<dt>menu</dt> <dd>menu items</dd>
<dt>option</dt> <dd>&liberator.appname; options</dd>
<dt>preference</dt> <dd>&liberator.host; preferences</dd>
<dt>option</dt> <dd>&dactyl.appname; options</dd>
<dt>preference</dt> <dd>&dactyl.host; preferences</dd>
<dt>search</dt> <dd>search engines and keywords</dd>
<dt>shellcmd</dt> <dd>shell commands</dd>
<dt>sidebar</dt> <dd>sidebar panels</dd>

View File

@@ -1,25 +1,25 @@
<?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
name="marks"
title="&liberator.appname; Marks"
title="&dactyl.appname; Marks"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="different-marks marks">Marks</h1>
<toc start="2"/>
<p>
&liberator.appname; supports a number of different marks:
&dactyl.appname; supports a number of different marks:
</p>
<ul>
<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>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>
<h1 tag="bookmarks">Bookmarks</h1>

View File

@@ -1,11 +1,11 @@
<?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
name="message"
title="&liberator.appname; Messages"
title="&dactyl.appname; Messages"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="messages">Error and informational messages</h1>
@@ -14,7 +14,7 @@
<tags>message-history</tags>
<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
the <o>verbose</o> option. The number of stored messages can be set
with the <o>messages</o> option.

View File

@@ -1,18 +1,18 @@
<?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
name="options"
title="&liberator.appname; Options"
title="&dactyl.appname; Options"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="options">Options</h1>
<toc start="2"/>
<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:
</p>
@@ -227,19 +227,19 @@
character) or <em>$<a>VAR</a></em>. <em>%VAR%</em> is also supported on Windows.
</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>
<tags>:prefs :preferences</tags>
<spec>:pref[erences]</spec>
<description>
<p>
Show the &liberator.host; preferences dialog. You can change the browser
preferences from this dialog. Be aware that not all &liberator.host;
preferences work, because &liberator.appname; overrides some key bindings and
changes &liberator.host;'s GUI.
Show the &dactyl.host; preferences dialog. You can change the browser
preferences from this dialog. Be aware that not all &dactyl.host;
preferences work, because &dactyl.appname; overrides some key bindings and
changes &dactyl.host;'s GUI.
</p>
</description>
</item>
@@ -249,7 +249,7 @@
<spec>:pref[erences]!</spec>
<description>
<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.
</p>
</description>
@@ -260,7 +260,7 @@
<spec>:se[t]! <a>preference</a>=<a>value</a></spec>
<description>
<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
<ex>:set! <a>preference</a>&amp;</ex>.
</p>
@@ -270,7 +270,7 @@
<tags>overridden-preferences</tags>
<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
<ex>:set! <a>preference</a>=<a>value</a></ex>
</p>
@@ -371,7 +371,7 @@
<dl>
<dt>s</dt> <dd>Search engines and keyword URLs</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>h</dt> <dd>History</dd>
<dt>S</dt> <dd>Search engine suggestions</dd>
@@ -410,7 +410,7 @@
</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].
</p>
</description>
@@ -430,7 +430,7 @@
</p>
<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.
</warning>
</description>
@@ -513,7 +513,7 @@
<type>string</type>
<default>UTF-8</default>
<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>
</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>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>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>
</description>
</item>
@@ -756,7 +756,7 @@
<description>
<p>
Use Insert mode as the default for text areas. This is useful if you
want to use the known &liberator.host; interface for editing text areas.
want to use the known &dactyl.host; interface for editing text areas.
Input fields default to this behaviour irrespective of this option's
setting.
</p>
@@ -814,9 +814,9 @@
<description>
<p>
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>
command within the &liberator.name;rc.
command within the &dactyl.name;rc.
</p>
</description>
</item>
@@ -962,7 +962,7 @@
effective.
</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>
</item>
@@ -985,13 +985,13 @@
<item>
<tags>$&liberator.idname;_RUNTIME</tags>
<tags>$&dactyl.idname;_RUNTIME</tags>
<tags>'rtp' 'runtimepath'</tags>
<spec>'runtimepath' 'rtp'</spec>
<type>stringlist</type>
<default type="plain"><str>$&liberator.idname;_RUNTIME</str> or
Unix, Mac: <str>~/.&liberator.name;</str>,
Windows: <str>~/&liberator.name;</str></default>
<default type="plain"><str>$&dactyl.idname;_RUNTIME</str> or
Unix, Mac: <str>~/.&dactyl.name;</str>,
Windows: <str>~/&dactyl.name;</str></default>
<description>
<p>List of directories searched for runtime files:</p>
@@ -1003,17 +1003,17 @@
<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>
This will search for plugins in both
<str>~/my&liberator.name;/plugin</str> and
<str>~/.&liberator.name;/plugin</str>
<str>~/my&dactyl.name;/plugin</str> and
<str>~/.&dactyl.name;/plugin</str>
</p>
<p>
On startup, if the environment variable <em>$&liberator.idname;_RUNTIME</em> does not
exist, &liberator.appname; will set it to match this value.
On startup, if the environment variable <em>$&dactyl.idname;_RUNTIME</em> does not
exist, &dactyl.appname; will set it to match this value.
</p>
</description>
</item>
@@ -1212,15 +1212,15 @@
<tags>'titlestring'</tags>
<spec>'titlestring'</spec>
<type>string</type>
<default>&liberator.appname;</default>
<default>&dactyl.appname;</default>
<description>
<p>
Change the title of the browser window. &liberator.appname; changes the
browser title from <str>Title of web page - Mozilla &liberator.host;</str>
to <str>Title of web page - &liberator.appname;</str>. If you don't like
Change the title of the browser window. &dactyl.appname; changes the
browser title from <str>Title of web page - Mozilla &dactyl.host;</str>
to <str>Title of web page - &dactyl.appname;</str>. If you don't like
that, you can restore it with:
</p>
<code><ex>:set titlestring=<str>Mozilla &liberator.host;</str></ex></code>
<code><ex>:set titlestring=<str>Mozilla &dactyl.host;</str></ex></code>
</description>
</item>
@@ -1266,7 +1266,7 @@
<description>
<p>
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
value is 15, being the most verbose mode.
</p>

View File

@@ -1,20 +1,20 @@
<?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
name="pattern"
title="&liberator.appname; Patterns"
title="&dactyl.appname; Patterns"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="text-search-commands">Text search commands</h1>
<toc start="2"/>
<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
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.
</p>

View File

@@ -1,11 +1,11 @@
<?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
name="print"
title="&liberator.appname; Printing"
title="&dactyl.appname; Printing"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="printing">Printing</h1>
@@ -34,7 +34,7 @@
</item>
<h2 tag="&liberator.host;-print-dialogs">&liberator.host; printing dialogs</h2>
<h2 tag="&dactyl.host;-print-dialogs">&dactyl.host; printing dialogs</h2>
<p>
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-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
name="repeat"
title="&liberator.appname; Repeating Commands"
title="&dactyl.appname; Repeating Commands"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="repeating">Repeating commands</h1>
<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>
@@ -21,7 +21,7 @@
<description>
<p>
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.
</p>
</description>
@@ -139,8 +139,8 @@ function hello2() {
<p>are only available within the scope of the script.</p>
<p>
The <tt>.&liberator.name;rc</tt> file in your home directory and any
files in <tt>~/.&liberator.name;/plugin/</tt> are always
The <tt>.&dactyl.name;rc</tt> file in your home directory and any
files in <tt>~/.&dactyl.name;/plugin/</tt> are always
sourced at startup. <tt>~</tt> is supported as a
shortcut for the <tt>$HOME</tt> directory. If <oa>!</oa> is
specified, errors are not printed.
@@ -155,10 +155,10 @@ function hello2() {
<description>
<p>
Load all unloaded plugins immediately. Because plugins are automatically
loaded after &liberator.name;rc is sourced, this command must be placed early
in the &liberator.name;rc file if &liberator.name;rc also includes commands that are
loaded after &dactyl.name;rc is sourced, this command must be placed early
in the &dactyl.name;rc file if &dactyl.name;rc also includes commands that are
implemented by plugins. Additionally, this command allows for sourcing
new plugins without restarting &liberator.appname;.
new plugins without restarting &dactyl.appname;.
</p>
</description>
</item>
@@ -194,7 +194,7 @@ function hello2() {
<spec>:fini<oa>sh</oa></spec>
<description>
<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.
</p>
</description>
@@ -213,7 +213,7 @@ function hello2() {
which might be slow, so take the results with a grain of salt.
</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>
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-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
name="starting"
title="&liberator.appname; Starting"
title="&dactyl.appname; Starting"
xmlns="http://vimperator.org/namespaces/liberator"
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"/>
<tags>startup-options</tags>
<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.
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>
<item>
@@ -72,24 +72,24 @@
<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>
<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,
and no further locations are tried.
<ol>
<li tag="$&liberator.idname;_INIT">
<em>$&liberator.idname;_INIT</em> — May contain a single Ex command (e.g.,
<li tag="$&dactyl.idname;_INIT">
<em>$&dactyl.idname;_INIT</em> — May contain a single Ex command (e.g.,
"<ex>:source <a>file</a></ex>").
</li>
<li tag="$MY_&liberator.idname;RC">
<em>~/&liberator.name;rc</em> — Windows only. If this file exists, its contents
are executed and <em>$MY_&liberator.idname;RC</em> set to its path.
<li tag="$MY_&dactyl.idname;RC">
<em>~/&dactyl.name;rc</em> — Windows only. If this file exists, its contents
are executed and <em>$MY_&dactyl.idname;RC</em> set to its path.
</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>
</ol>
</li>
@@ -121,7 +121,7 @@ The user's ~ (i.e., "home") directory is determined as follows:
<ul>
<li>On Unix and Mac, the environment variable <em>$HOME</em> is used.</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>%HOMEDRIVE%%HOMEPATH%</em>. It uses the first one it
finds.
@@ -131,13 +131,13 @@ The user's ~ (i.e., "home") directory is determined as follows:
<h2 tag="save-settings">Saving settings</h2>
<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>
<description>
<p>
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
already exists. The special version <ex>:mk&liberator.name;rc!</ex> will overwrite
<oa>file</oa> is specified then <em>~/.&dactyl.name;rc</em> is written unless this file
already exists. The special version <ex>:mk&dactyl.name;rc!</ex> will overwrite
<oa>file</oa> if it exists.
</p>
@@ -155,7 +155,7 @@ The user's ~ (i.e., "home") directory is determined as follows:
<tags>:res :restart</tags>
<spec>:res<oa>tart</oa></spec>
<description>
<p>Force &liberator.host; to restart. Useful when installing extensions.</p>
<p>Force &dactyl.host; to restart. Useful when installing extensions.</p>
</description>
</item>

View File

@@ -1,20 +1,20 @@
<?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
name="styling"
title="&liberator.appname; Styling"
title="&dactyl.appname; Styling"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1 tag="styling">Styling the GUI and web pages</h1>
<toc start="2"/>
<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
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.
</p>
@@ -43,7 +43,7 @@
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
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
restrict the match to matching elements.
</p>
@@ -51,7 +51,7 @@
<p>Valid groups are:</p>
<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>CmdLine</dt> <dd>The command line</dd>
<dt>CmdOutput</dt> <dd></dd>

View File

@@ -1,11 +1,11 @@
<?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
name="tabs"
title="&liberator.appname; Tabs"
title="&dactyl.appname; Tabs"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<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>
<description>
<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.
</p>
</description>

View File

@@ -1,11 +1,11 @@
<?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
name="various"
title="&liberator.appname; Other"
title="&dactyl.appname; Other"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<h1>Other help</h1>
@@ -78,7 +78,7 @@
<p>
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>).
</p>
</description>
@@ -147,7 +147,7 @@
<spec>:ve<oa>rsion</oa><oa>!</oa></spec>
<description>
<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>.
</p>
</description>

View File

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

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

View File

@@ -7,5 +7,5 @@ Inactive/former developers:
Patches:
* Christian Dietrich (too many to list)
A lot of people contributed to Vimperator, which is the basis of Muttator, so please refer
A lot of people contributed to Pentadactyl, which is the basis of Muttator, so please refer
to that AUTHOR file for more contributors.

View File

@@ -59,6 +59,6 @@
2008-04-29:
* version 0.1
* first public release, straight port from Vimperator with many basic mappings
* first public release, straight port from Pentadactyl with many basic mappings
// vim: set filetype=asciidoc:

View File

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

View File

@@ -62,9 +62,9 @@ const Addressbook = Module("addressbook", {
if (addresses.length < 1) {
if (!filter)
liberator.echoerr("Exxx: No contacts", commandline.FORCE_SINGLELINE);
dactyl.echoerr("Exxx: No contacts", commandline.FORCE_SINGLELINE);
else
liberator.echoerr("Exxx: No contacts matching string '" + filter + "'", commandline.FORCE_SINGLELINE);
dactyl.echoerr("Exxx: No contacts matching string '" + filter + "'", commandline.FORCE_SINGLELINE);
return false;
}
@@ -99,9 +99,9 @@ const Addressbook = Module("addressbook", {
displayName = this.generateDisplayName(firstName, lastName);
if (addressbook.add(mailAddr, firstName, lastName, displayName))
liberator.echomsg("Added address: " + displayName + " <" + mailAddr + ">", 1, commandline.FORCE_SINGLELINE);
dactyl.echomsg("Added address: " + displayName + " <" + mailAddr + ">", 1, commandline.FORCE_SINGLELINE);
else
liberator.echoerr("Exxx: Could not add contact `" + mailAddr + "'", commandline.FORCE_SINGLELINE);
dactyl.echoerr("Exxx: Could not add contact `" + mailAddr + "'", commandline.FORCE_SINGLELINE);
},
{
@@ -126,7 +126,7 @@ const Addressbook = Module("addressbook", {
var to = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor;
}
catch (e) {
liberator.beep();
dactyl.beep();
}
if (!to)

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 ***/
name: "Muttator",
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",
@@ -94,11 +94,11 @@ const Config = Module("config", ConfigBase, {
focusChange: function (win) {
// 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)
modes.set(modes.INSERT, modes.TEXTAREA);
else if (liberator.mode != modes.MESSAGE)
liberator.mode = modes.MESSAGE;
else if (dactyl.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) {
let folders = mail.getFolders(destinationFolder);
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)
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;
if (!count)
return void liberator.beep();
return void dactyl.beep();
(copy ? MsgCopyMessage : MsgMoveMessage)(folders[0]);
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);
},
@@ -115,7 +115,7 @@ const Mail = Module("mail", {
i += direction;
}
if (!folder || count > 0)
liberator.beep();
dactyl.beep();
else
gFolderTreeView.selection.timedSelect(c + folder, 500);
},
@@ -169,7 +169,7 @@ const Mail = Module("mail", {
let url = args.attachments.pop();
let file = io.getFile(url);
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.url = "file://" + file.path;
@@ -354,7 +354,7 @@ const Mail = Module("mail", {
}
catch (e) {
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;
}
@@ -376,7 +376,7 @@ const Mail = Module("mail", {
// TODO: finally for the "rest" of the current folder
liberator.beep();
dactyl.beep();
},
setHTML: function (value) {
@@ -403,8 +403,8 @@ const Mail = Module("mail", {
let folder = mail.getFolders(arg, true, true)[count];
if (!folder)
liberator.echoerr("Exxx: Folder \"" + arg + "\" does not exist");
else if (liberator.forceNewTab)
dactyl.echoerr("Exxx: Folder \"" + arg + "\" does not exist");
else if (dactyl.forceNewTab)
MsgOpenNewTabForFolder(folder.URI);
else
SelectFolder(folder.URI);
@@ -435,7 +435,7 @@ const Mail = Module("mail", {
// TODO: is there a better way to check for validity?
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);
},
@@ -499,7 +499,7 @@ const Mail = Module("mail", {
"Open the message in new tab",
function () {
if (gDBView && gDBView.selection.count < 1)
return void liberator.beep();
return void dactyl.beep();
MsgOpenNewTabForMessage();
});
@@ -558,7 +558,7 @@ const Mail = Module("mail", {
let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, false, count);
}
catch (e) { liberator.beep(); }
catch (e) { dactyl.beep(); }
},
{ count: true });
@@ -569,7 +569,7 @@ const Mail = Module("mail", {
let author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
mail.selectMessage(function (msg) msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0, true, true, true, count);
}
catch (e) { liberator.beep(); }
catch (e) { dactyl.beep(); }
},
{ count: true });
@@ -586,7 +586,7 @@ const Mail = Module("mail", {
commandline.open(":", "mail " + to + " -subject=", modes.EX);
}
catch (e) {
liberator.beep();
dactyl.beep();
}
});
@@ -634,7 +634,7 @@ const Mail = Module("mail", {
if (messenger.canUndo())
messenger.undo(msgWindow);
else
liberator.beep();
dactyl.beep();
});
mappings.add(myModes, ["<C-r>"],
"Redo",
@@ -642,7 +642,7 @@ const Mail = Module("mail", {
if (messenger.canRedo())
messenger.redo(msgWindow);
else
liberator.beep();
dactyl.beep();
});
// GETTING MAIL
@@ -699,7 +699,7 @@ const Mail = Module("mail", {
if (folder)
SelectFolder(folder.URI);
else
liberator.beep();
dactyl.beep();
},
{ count: true });
@@ -789,7 +789,7 @@ const Mail = Module("mail", {
"Label message",
function (arg) {
if (!GetSelectedMessages())
return void liberator.beep();
return void dactyl.beep();
switch (arg) {
case "r": MsgMarkMsgAsRead(); break;
@@ -799,7 +799,7 @@ const Mail = Module("mail", {
case "p": ToggleMessageTagKey(3); break; // Personal
case "t": ToggleMessageTagKey(4); break; // TODO
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",
function () {
if (mail.currentFolder.isServer)
return liberator.beep();
return dactyl.beep();
mail.currentFolder.markAllMessagesRead(msgWindow);
});
@@ -846,7 +846,7 @@ const Mail = Module("mail", {
let subject = gDBView.hdrForFirstSelectedMessage.mime2DecodedSubject;
util.copyToClipboard(subject, true);
}
catch (e) { liberator.beep(); }
catch (e) { dactyl.beep(); }
});
mappings.add(myModes, ["y"],
@@ -858,7 +858,7 @@ const Mail = Module("mail", {
else
util.copyToClipboard(gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor, true);
}
catch (e) { liberator.beep(); }
catch (e) { dactyl.beep(); }
});
// RSS specific mappings
@@ -871,7 +871,7 @@ const Mail = Module("mail", {
// TODO: what to do for non-rss message?
}
catch (e) {
liberator.beep();
dactyl.beep();
}
});
},

View File

@@ -14,10 +14,10 @@
sodipodi:version="0.32"
inkscape:version="0.46"
version="1.0"
sodipodi:docbase="/home/maxauthority/code/vimperator"
sodipodi:docbase="/home/maxauthority/code/pentadactyl"
sodipodi:docname="muttator.svg"
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-ydpi="90">
<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>
" 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")
finish

View File

@@ -9,9 +9,9 @@
<em:creator>Martin Stubenschrott</em:creator>
<em:homepageURL>http://vimperator.org/</em:homepageURL>
<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>
<Description about="urn:mozilla:extension:file:vimperator.jar">
<Description about="urn:mozilla:extension:file:pentadactyl.jar">
<em:package>content/muttator/</em:package>
</Description>
</em:file>

View File

@@ -1,7 +1,7 @@
<?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
xmlns="http://vimperator.org/namespaces/liberator"

View File

@@ -1,7 +1,7 @@
<?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
xmlns="http://vimperator.org/namespaces/liberator"
@@ -16,11 +16,11 @@
<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>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>&liberator.appname;LeavePre</dt><dd>Triggered before exiting &liberator.host;, just before destroying each module</dd>
<dt>&liberator.appname;Leave</dt> <dd>Triggered before exiting &liberator.host;</dd>
<dt>&dactyl.appname;Enter</dt> <dd>Triggered after &dactyl.host; starts</dd>
<dt>&dactyl.appname;LeavePre</dt><dd>Triggered before exiting &dactyl.host;, just before destroying each module</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 tag="autocommand-args" replace="autocommand-args">

View File

@@ -1,14 +1,14 @@
<?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
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<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>addressbook</dt> <dd>Address book</dd>
<dt>checkupdates</dt> <dd>Check for updates</dd>
@@ -18,7 +18,7 @@
<dt>openfile</dt> <dd>Open the file selector dialog</dd>
<dt>pageinfo</dt> <dd>Show information about the current page</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>print</dt> <dd>Show print dialog</dd>
<dt>saveframe</dt> <dd>Save frame to disk</dd>

View File

@@ -1,38 +1,32 @@
<?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
name="intro"
title="&liberator.appname; Introduction"
title="&dactyl.appname; Introduction"
xmlns="http://vimperator.org/namespaces/liberator"
xmlns:html="http://www.w3.org/1999/xhtml">
<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>
<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
<link topic="http://www.vim.org">Vim</link>
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.
<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>
<p>If you really need them, type: <ex>:set guioptions+=mT</ex> to get them back.</p>
<p>
If you don't like &liberator.appname; at all, you can uninstall it by typing
<ex>:extdelete &liberator.appname;</ex> or <ex>:extdisable &liberator.appname;</ex> to disable it.
If you don't like &dactyl.appname; at all, you can uninstall it by typing
<ex>:extdelete &dactyl.appname;</ex> or <ex>:extdisable &dactyl.appname;</ex> to disable it.
</p>
<p>
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>
<p>
&liberator.appname; was initially written by
&dactyl.appname; was initially written by
<link topic="mailto:stubenschrott@vimperator.org">Martin
Stubenschrott</link> but has found many other
<link topic="http://vimperator.org/trac/wiki/&liberator.appname;/Authors">contributors</link>
in the meanwhile. If you appreciate the work on &liberator.appname; and want to
<link topic="http://vimperator.org/trac/wiki/&dactyl.appname;/Authors">contributors</link>
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
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>
who already did):
</p>
<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="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-----"/>
</html:form>
@@ -64,7 +58,7 @@ web browser, as key bindings differ according to which mode you are in.
us by buying some cool
<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
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 :)
</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.
</li>
<li>
<link topic="starting">Starting &liberator.appname;</link>:
How &liberator.appname; starts up, where it reads the config file…
<link topic="starting">Starting &dactyl.appname;</link>:
How &dactyl.appname; starts up, where it reads the config file…
</li>
<li>
<link topic="browsing">Browsing</link>:
@@ -137,12 +131,12 @@ web browser, as key bindings differ according to which mode you are in.
Printing pages.
</li>
<li>
<link topic="gui">&liberator.appname;'s GUI</link>:
Accessing &liberator.host; menus, dialogs and the sidebar.
<link topic="gui">&dactyl.appname;'s GUI</link>:
Accessing &dactyl.host; menus, dialogs and the sidebar.
</li>
<li>
<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>
<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>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>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>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>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 &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>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>
@@ -197,10 +191,10 @@ or <ex>:help :set</ex>.
<p>
Please send comments/bug reports/patches to the mailing list, where we will
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
<link topic="http://vimperator.org/trac/wiki/&liberator.appname;/Wiki">Wiki</link> for
<link topic="http://vimperator.org/trac/wiki/&liberator.appname;/FAQ">
<link topic="http://vimperator.org/trac/wiki/&dactyl.appname;/Wiki">Wiki</link> for
<link topic="http://vimperator.org/trac/wiki/&dactyl.appname;/FAQ">
frequently asked questions (FAQ)
</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.
@@ -216,41 +210,41 @@ mutt.
<h2 tag="intro">Introduction</h2>
http://vimperator.org/muttator[&liberator.appname;] is a free browser add-on for
&liberator.hostapp;, which makes it look and behave like the http://www.vim.org[Vim]
http://vimperator.org/muttator[&dactyl.appname;] is a free browser add-on for
&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
client, as key bindings differ according to which mode you are in.
|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 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. +
If you like it, but can't remember the shortcuts, press <k>F1</k> or
<ex>:help</ex> to get this help window back.
|author| |donation| +
&liberator.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
&dactyl.appname; was written by mailto:stubenschrott@vimperator.org[Martin Stubenschrott].
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:
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).
<pan><handle/></pan>
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 :)
<h2 tag="overview">Help topics</h2>
<ol>
<li>
<link topic="starting">Starting &liberator.appname;</link>:
How &liberator.appname; starts up, where it reads the config file…
<link topic="starting">Starting &dactyl.appname;</link>:
How &dactyl.appname; starts up, where it reads the config file…
</li>
<li>
<link topic="browsing">Browsing</link>:
@@ -310,12 +304,12 @@ it, recommend it and like it :)
Printing pages.
</li>
<li>
<link topic="gui">&liberator.appname;'s GUI</link>:
Accessing &liberator.host; menus, dialogs and the sidebar.
<link topic="gui">&dactyl.appname;'s GUI</link>:
Accessing &dactyl.host; menus, dialogs and the sidebar.
</li>
<li>
<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>
<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
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
@@ -364,13 +358,13 @@ You can also jump directly to the help of a specific command with
<li>
Ability to <ex>:source</ex> JavaScript files, and to use a
[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>Count supported for many commands (<em>3</em><key name="C-o"/> will go back 3 messages)</li>
<li>Beep on errors</li>
<li><ex>:map</ex> support (and feedkeys() for script writers)</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>
</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
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
<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
<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>.
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
time for it or receive patches.

View File

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

View File

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

View File

@@ -14,7 +14,7 @@
2009-10-28:
* 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.
* IMPORTANT: Map.flags has been replaced with individual properties.
Mappings defined in plugins with mappings.add will need to be updated.
@@ -51,7 +51,7 @@
autocommand
* add *-description* option to [c]:command[c]
* 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 [j]all.html[j] to show all help sections in a single page - available via
[c]:helpall[c]
@@ -64,7 +64,7 @@
* IMPORTANT: Default value of 'complete' has been changed from "sfl" to "slf"
* massively speed up [c]:open[c] completions
* 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.
* add [c]:frameonly[c]
* add [c]:stopall[c]
@@ -72,7 +72,7 @@
* add 'encoding'
* add 'hintinputs'
* add [c]:silent[c]
* add [j]$MY_VIMPERATORRC[j]
* add [j]$MY_PENTADACTYLRC[j]
* add ' and " local marks
* 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]
@@ -95,19 +95,19 @@
not using the args parser explicitly. The old string value is now
available via args.string.
* 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
special versions for the old behavior.
* IMPORTANT: renamed Startup and Quit autocmd events to *VimperatorEnter* and
*VimperatorLeave* respectively.
* IMPORTANT: renamed Startup and Quit autocmd events to *PentadactylEnter* and
*PentadactylLeave* respectively.
* 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
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.
* add ~/.vimperator/info/{profile}/, similar to viminfo
* add [j]$VIMPERATOR_RUNTIME[j], [j]$VIMPERATOR_INIT[j]
* add ~/.pentadactyl/info/{profile}/, similar to viminfo
* add [j]$PENTADACTYL_RUNTIME[j], [j]$PENTADACTYL_INIT[j]
* [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 "r", "l", and "b" to 'guioptions' to toggle the scrollbars.
@@ -154,7 +154,7 @@
* add 'helpfile' option
* add 'wildignore' option
* add [c]:finish[c] command
* new events *BookmarkAdd*, *ShellCmdPost*, *VimperatorLeavePre*, *DownloadPost*
* new events *BookmarkAdd*, *ShellCmdPost*, *PentadactylLeavePre*, *DownloadPost*
* add 'cdpath' option
* allow [c]:dialog[c] to open the cookies manager
* add 'loadplugins' option
@@ -178,8 +178,8 @@
:command AlertMe :js alert(<args>)
...................................
* 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
about hitting [m]<C-q>[m] twice and exiting Vimperator
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 Pentadactyl
* IMPORTANT: removed old [c]:buffers![c] buffer window, as it was ugly and slightly broken
use [m]B[m] or [c]:buffers[c] instead
* IMPORTANT: input fields are not blured anymore by default after a page has loaded
@@ -293,11 +293,11 @@
2007-12-21:
* version 0.5.3
* 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
* 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)
* 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
* [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,
@@ -340,10 +340,10 @@
highlighted text strings when 'hlsearch' is set
* added 'linksearch' option to restrict page searches to link text - *\L*
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
* 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
* many small bug fixes and enhancments
@@ -351,8 +351,8 @@
* version 0.5.1
* 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 Windows default RC file is now ~/_vimperatorrc and the plugin
directory is ~/vimperator/plugin
* the Windows default RC file is now ~/_pentadactylrc and the plugin
directory is ~/pentadactyl/plugin
* command-line history now works properly on Windows
* filename completion now works on Windows
* 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
* new [c]:normal[c] command
* 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
'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)
* 'activate' option implemented
* search engines which use POST instead of GET work now
@@ -398,8 +398,8 @@
* [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 secure sites -> green, broken sites -> red in the statusbar
* Vimperator now sets the window title, so it's "vimperator.mozdev.org -
Vimperator" instead of "vimperator.mozdev.org - Mozilla Firefox"
* Pentadactyl now sets the window title, so it's "pentadactyl.mozdev.org -
Pentadactyl" instead of "pentadactyl.mozdev.org - Mozilla Firefox"
Use [c]:set titlestring=...[c] to change it back (help from Hannes Rist)
* [c]:tabmove[c] command (by Doug Kearns)
* '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])
* [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 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
* many small bug fixes and enhancements
@@ -424,8 +424,8 @@
2007-05-01:
* version 0.4
* extension GUID was changed to \'vimperator@mozdev.net' -> YOU WILL HAVE
TO UNINSTALL ANY OLD VIMPERATOR INSTALLATION BEFORE INSTALLING THIS VERSION
* extension GUID was changed to \'pentadactyl@mozdev.net' -> YOU WILL HAVE
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 'wildmode' completion setting with support for matching the
longest common substring. Also new 'wildoptions' setting.
@@ -442,7 +442,7 @@
* newly designed help page
* [c]:help section[c] supported, [c]:help :set[c] will show help for the [c]:set[c] command
(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
also changed [c]:exec[c] to behave more Vim like
* fixed saving of session
@@ -466,7 +466,7 @@
* 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
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
* 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

View File

@@ -42,10 +42,10 @@ BUGS:
FEATURES:
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.
8 change the extension ID to vimperator@vimperator.org rather than
vimperator@mozdev.org
8 change the extension ID to pentadactyl@vimperator.org rather than
pentadactyl@mozdev.org
8 finish :help TODOs
8 fix local options
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 Command :tags for getting a list of used tags
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
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
@@ -100,5 +100,5 @@ FEATURES:
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]
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:
"use strict";
const Name = "Vimperator";
const Name = "Pentadactyl";
/*
* We can't load our modules here, so the following code is sadly
* duplicated: .w !sh

View File

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

View File

@@ -5,21 +5,21 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>About:Vimperator</title>
<link rel="stylesheet" href="chrome://vimperator/skin/about.css" type="text/css" />
<link rel="icon" href="chrome://vimperator/skin/icon.png" type="image/png" />
<title>About:Pentadactyl</title>
<link rel="stylesheet" href="chrome://pentadactyl/skin/about.css" type="text/css" />
<link rel="icon" href="chrome://pentadactyl/skin/icon.png" type="image/png" />
</head>
<body>
<div id="main-container">
<div id="img-container">
<div id="text-container">
<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###
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 :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 ***/
name: "Vimperator",
name: "Pentadactyl",
hostApplication: "Firefox",
/*** optional options, there are checked for existence and a fallback provided ***/
@@ -19,7 +19,7 @@ const Config = Module("config", ConfigBase, {
complete: "slf",
guioptions: "rb",
showtabline: 2,
titlestring: "Vimperator"
titlestring: "Pentadactyl"
},
guioptions: {
@@ -42,9 +42,9 @@ const Config = Module("config", ConfigBase, {
["PrivateMode", "Triggered when private mode is activated or deactivated"],
["Sanitize", "Triggered when a sanitizeable item is cleared"],
["ShellCmdPost", "Triggered after executing a shell command with :!cmd"],
["VimperatorEnter", "Triggered after Firefox starts"],
["VimperatorLeavePre", "Triggered before exiting Firefox, just before destroying each module"],
["VimperatorLeave", "Triggered before exiting Firefox"]],
["PentadactylEnter", "Triggered after Firefox starts"],
["PentadactylLeavePre","Triggered before exiting Firefox, just before destroying each module"],
["PentadactylLeave", "Triggered before exiting Firefox"]],
dialogs: {
about: ["About Firefox",
@@ -66,7 +66,7 @@ const Config = Module("config", ConfigBase, {
customizetoolbar: ["Customize the Toolbar",
function () { window.BrowserCustomizeToolbar(); }],
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",
function () { window.toOpenWindowByType("Download:Manager", "chrome://mozapps/content/downloads/downloads.xul", "chrome,dialog=no,resizable"); }],
history: ["List your history",
@@ -128,7 +128,7 @@ const Config = Module("config", ConfigBase, {
commands.add(["winon[ly]"],
"Close all other windows",
function () {
liberator.windows.forEach(function (win) {
dactyl.windows.forEach(function (win) {
if (win != window)
win.close();
});
@@ -139,9 +139,9 @@ const Config = Module("config", ConfigBase, {
"Show " + config.hostApplication + " preferences",
function (args) {
if (args.bang) { // open Firefox settings GUI dialog
liberator.open("about:config",
dactyl.open("about:config",
(options["newtab"] && options.get("newtab").has("all", "prefs"))
? liberator.NEW_TAB : liberator.CURRENT_TAB);
? dactyl.NEW_TAB : dactyl.CURRENT_TAB);
}
else
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",
@@ -194,9 +194,9 @@ const Config = Module("config", ConfigBase, {
commands.add(["wind[ow]"],
"Execute a command and tell it to output in a new window",
function (args) {
liberator.forceNewWindow = true;
liberator.execute(args.string, null, true);
liberator.forceNewWindow = false;
dactyl.forceNewWindow = true;
dactyl.execute(args.string, null, true);
dactyl.forceNewWindow = false;
},
{
argCount: "+",
@@ -215,9 +215,9 @@ const Config = Module("config", ConfigBase, {
args = args.string;
if (args)
liberator.open(args, liberator.NEW_WINDOW);
dactyl.open(args, dactyl.NEW_WINDOW);
else
liberator.open("about:blank", liberator.NEW_WINDOW);
dactyl.open("about:blank", dactyl.NEW_WINDOW);
},
{
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