mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-13 06:15:53 +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:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user