mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 16:37: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:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user