mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 06:07:59 +01:00
Clean up some crufty comments.
This commit is contained in:
@@ -13,7 +13,6 @@
|
|||||||
*/
|
*/
|
||||||
const Browser = Module("browser", {
|
const Browser = Module("browser", {
|
||||||
}, {
|
}, {
|
||||||
// TODO: support 'nrformats'? -> probably not worth it --mst
|
|
||||||
incrementURL: function (count) {
|
incrementURL: function (count) {
|
||||||
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
|
let matches = buffer.URL.match(/(.*?)(\d+)(\D*)$/);
|
||||||
dactyl.assert(matches);
|
dactyl.assert(matches);
|
||||||
@@ -122,10 +121,8 @@ const Browser = Module("browser", {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (count < 1)
|
count = Math.max(count, 1);
|
||||||
count = 1;
|
|
||||||
|
|
||||||
// XXX
|
|
||||||
let url = buffer.URL;
|
let url = buffer.URL;
|
||||||
for (let i = 0; i < count; i++) {
|
for (let i = 0; i < count; i++) {
|
||||||
if (isDirectory(url))
|
if (isDirectory(url))
|
||||||
|
|||||||
@@ -548,7 +548,6 @@ const CommandLine = Module("commandline", {
|
|||||||
* @param {string} str
|
* @param {string} str
|
||||||
* @param {string} highlightGroup
|
* @param {string} highlightGroup
|
||||||
*/
|
*/
|
||||||
// TODO: resize upon a window resize
|
|
||||||
_echoMultiline: function echoMultiline(str, highlightGroup) {
|
_echoMultiline: function echoMultiline(str, highlightGroup) {
|
||||||
let doc = this.widgets.multilineOutput.contentDocument;
|
let doc = this.widgets.multilineOutput.contentDocument;
|
||||||
let win = this.widgets.multilineOutput.contentWindow;
|
let win = this.widgets.multilineOutput.contentWindow;
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ CommandOption.defaultValue("description", function () "");
|
|||||||
CommandOption.defaultValue("type", function () CommandOption.NOARG);
|
CommandOption.defaultValue("type", function () CommandOption.NOARG);
|
||||||
CommandOption.defaultValue("multiple", function () false);
|
CommandOption.defaultValue("multiple", function () false);
|
||||||
update(CommandOption, {
|
update(CommandOption, {
|
||||||
// FIXME: remove later, when our option handler is better
|
|
||||||
/**
|
/**
|
||||||
* @property {number} The option argument is unspecified. Any argument
|
* @property {number} The option argument is unspecified. Any argument
|
||||||
* is accepted and caller is responsible for parsing the return
|
* is accepted and caller is responsible for parsing the return
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ const ConfigBase = Class(ModuleBase, {
|
|||||||
* @property {Object} A map between key names for key events should be ignored,
|
* @property {Object} A map between key names for key events should be ignored,
|
||||||
* and a mask of the modes in which they should be ignored.
|
* and a mask of the modes in which they should be ignored.
|
||||||
*/
|
*/
|
||||||
ignoreKeys: {}, // XXX: be aware you can't put useful values in here, as "modes.NORMAL" etc. are not defined at this time
|
ignoreKeys: {}, // NOTE: be aware you can't put useful values in here, as "modes.NORMAL" etc. are not defined at this time
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @property {string} The ID of the application's main XUL window.
|
* @property {string} The ID of the application's main XUL window.
|
||||||
|
|||||||
@@ -121,7 +121,6 @@ const RangeFinder = Module("rangefinder", {
|
|||||||
// Called when the search is canceled - for example if someone presses
|
// Called when the search is canceled - for example if someone presses
|
||||||
// escape while typing a search
|
// escape while typing a search
|
||||||
onCancel: function () {
|
onCancel: function () {
|
||||||
// TODO: code to reposition the document to the place before search started
|
|
||||||
if (this.rangeFind)
|
if (this.rangeFind)
|
||||||
this.rangeFind.cancel();
|
this.rangeFind.cancel();
|
||||||
},
|
},
|
||||||
@@ -154,11 +153,9 @@ const RangeFinder = Module("rangefinder", {
|
|||||||
modes.addMode("FIND_BACKWARD", true);
|
modes.addMode("FIND_BACKWARD", true);
|
||||||
},
|
},
|
||||||
commandline: function () {
|
commandline: function () {
|
||||||
// Event handlers for search - closure is needed
|
|
||||||
commandline.registerCallback("change", modes.FIND_FORWARD, this.closure.onKeyPress);
|
commandline.registerCallback("change", modes.FIND_FORWARD, this.closure.onKeyPress);
|
||||||
commandline.registerCallback("submit", modes.FIND_FORWARD, this.closure.onSubmit);
|
commandline.registerCallback("submit", modes.FIND_FORWARD, this.closure.onSubmit);
|
||||||
commandline.registerCallback("cancel", modes.FIND_FORWARD, this.closure.onCancel);
|
commandline.registerCallback("cancel", modes.FIND_FORWARD, this.closure.onCancel);
|
||||||
// TODO: allow advanced myModes in register/triggerCallback
|
|
||||||
commandline.registerCallback("change", modes.FIND_BACKWARD, this.closure.onKeyPress);
|
commandline.registerCallback("change", modes.FIND_BACKWARD, this.closure.onKeyPress);
|
||||||
commandline.registerCallback("submit", modes.FIND_BACKWARD, this.closure.onSubmit);
|
commandline.registerCallback("submit", modes.FIND_BACKWARD, this.closure.onSubmit);
|
||||||
commandline.registerCallback("cancel", modes.FIND_BACKWARD, this.closure.onCancel);
|
commandline.registerCallback("cancel", modes.FIND_BACKWARD, this.closure.onCancel);
|
||||||
|
|||||||
@@ -914,18 +914,6 @@ const Hints = Module("hints", {
|
|||||||
this._processHints(followFirst);
|
this._processHints(followFirst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: add resize support
|
|
||||||
// window.addEventListener("resize", onResize, null);
|
|
||||||
|
|
||||||
// function onResize(event)
|
|
||||||
// {
|
|
||||||
// if (event)
|
|
||||||
// doc = event.originalTarget;
|
|
||||||
// else
|
|
||||||
// doc = window.content.document;
|
|
||||||
// }
|
|
||||||
|
|
||||||
//}}}
|
//}}}
|
||||||
}, {
|
}, {
|
||||||
translitTable: Class.memoize(function () {
|
translitTable: Class.memoize(function () {
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ const History = Module("history", {
|
|||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|
||||||
// TODO: better names
|
|
||||||
stepTo: function stepTo(steps) {
|
stepTo: function stepTo(steps) {
|
||||||
let start = 0;
|
let start = 0;
|
||||||
let end = window.getWebNavigation().sessionHistory.count - 1;
|
let end = window.getWebNavigation().sessionHistory.count - 1;
|
||||||
|
|||||||
@@ -1150,7 +1150,6 @@ const Options = Module("options", {
|
|||||||
if (options["verbose"] > 0 && option.setFrom)
|
if (options["verbose"] > 0 && option.setFrom)
|
||||||
msg += "\n Last set from " + option.setFrom.path;
|
msg += "\n Last set from " + option.setFrom.path;
|
||||||
|
|
||||||
// FIXME: Message highlight group wrapping messes up the indent up for multi-arg verbose :set queries
|
|
||||||
dactyl.echo(<span highlight="CmdOutput">{msg}</span>);
|
dactyl.echo(<span highlight="CmdOutput">{msg}</span>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user