mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-19 23:57:59 +01:00
Run style bot.
--HG-- extra : rebase_source : 3661ea16c48258e44239734cdad6bc18abc70b5f
This commit is contained in:
9
HACKING
9
HACKING
@@ -87,7 +87,7 @@ In general: Just look at the existing source code!
|
||||
https://developer.mozilla.org/en/New_in_JavaScript_1.7#Block_scope_with_let
|
||||
|
||||
* Reuse common local variable names E.g. "elem" is generally used for element,
|
||||
"win" for windows, "func" for functions, "ret" for return values etc.
|
||||
"win" for windows, "func" for functions, "res" for return values etc.
|
||||
|
||||
* Prefer // over /* */ comments (exceptions for big comments are usually OK)
|
||||
Right: if (HACK) // TODO: remove hack
|
||||
@@ -138,12 +138,7 @@ In general: Just look at the existing source code!
|
||||
Functional tests are implemented using the Mozmill automated testing framework
|
||||
-- https://developer.mozilla.org/en/Mozmill_Tests.
|
||||
|
||||
A fresh profile is created for the duration of the test run, however, passing
|
||||
arguments to the host application won't be supported until Mozmill 1.5.2, the
|
||||
next release, so any user RC and plugin files should be temporarily disabled.
|
||||
This can be done by adding the following to the head of the RC file:
|
||||
set loadplugins=
|
||||
finish
|
||||
A fresh profile is created for the duration of the test run.
|
||||
|
||||
The host application binary tested can be overridden via the HOSTAPP_PATH
|
||||
makefile variable. E.g.,
|
||||
|
||||
1
common/bootstrap.js
vendored
1
common/bootstrap.js
vendored
@@ -41,7 +41,6 @@ if (!JSMLoader && "@mozilla.org/fuel/application;1" in Components.classes)
|
||||
.getService(Components.interfaces.extIApplication)
|
||||
.storage.get("dactyl.JSMLoader", null);
|
||||
|
||||
|
||||
function reportError(e) {
|
||||
dump("\ndactyl: bootstrap: " + e + "\n" + (e.stack || Error().stack) + "\n");
|
||||
Cu.reportError(e);
|
||||
|
||||
@@ -521,7 +521,7 @@ var Bookmarks = Module("bookmarks", {
|
||||
let context = CompletionContext(args.join(" "));
|
||||
context.fork("bookmark", 0, completion, "bookmark",
|
||||
args["-tags"], { keyword: args["-keyword"], title: args["-title"] });
|
||||
var deletedCount = bookmarks.remove(context.allItems.items.map(function (item) item.item.id));
|
||||
deletedCount = bookmarks.remove(context.allItems.items.map(function (item) item.item.id));
|
||||
}
|
||||
|
||||
dactyl.echomsg({ message: _("bookmark.deleted", deletedCount) });
|
||||
|
||||
@@ -1006,14 +1006,14 @@ var Buffer = Module("buffer", {
|
||||
* Adjusts the page zoom of the current buffer relative to the
|
||||
* current zoom level.
|
||||
*
|
||||
* @param {number} steps The integral number of natural fractions by
|
||||
* which to adjust the current page zoom. If positive, the zoom
|
||||
* level is increased, if negative it is decreased.
|
||||
* @param {number} steps The integral number of natural fractions by which
|
||||
* to adjust the current page zoom. If positive, the zoom level is
|
||||
* increased, if negative it is decreased.
|
||||
* @param {boolean} fullZoom If true, zoom all content of the page,
|
||||
* including raster images. If false, zoom only text. If omitted,
|
||||
* use the current zoom function. @optional
|
||||
* @throws {FailedAssertion} if the buffer's zoom level is already
|
||||
* at its extreme in the given direction.
|
||||
* including raster images. If false, zoom only text. If omitted, use
|
||||
* the current zoom function. @optional
|
||||
* @throws {FailedAssertion} if the buffer's zoom level is already at its
|
||||
* extreme in the given direction.
|
||||
*/
|
||||
bumpZoomLevel: function bumpZoomLevel(steps, fullZoom) {
|
||||
if (fullZoom === undefined)
|
||||
|
||||
@@ -175,7 +175,7 @@ var CommandWidgets = Class("CommandWidgets", {
|
||||
if (obj.value != null)
|
||||
return [obj.value[0],
|
||||
obj.get ? obj.get.call(this, elem) : elem.value]
|
||||
.concat(obj.value.slice(2))
|
||||
.concat(obj.value.slice(2));
|
||||
return null;
|
||||
},
|
||||
|
||||
|
||||
@@ -732,7 +732,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
if (!list)
|
||||
res += list = <ul/>;
|
||||
let li = <li/>;
|
||||
li.* += rec(match.content.replace(RegExp("^" + match.space, "gm"), ""), level + 1, li)
|
||||
li.* += rec(match.content.replace(RegExp("^" + match.space, "gm"), ""), level + 1, li);
|
||||
list.* += li;
|
||||
}
|
||||
else if (match.par) {
|
||||
|
||||
@@ -230,9 +230,9 @@ var Editor = Module("editor", {
|
||||
* Edits the given file in the external editor as specified by the
|
||||
* 'editor' option.
|
||||
*
|
||||
* @param {object|File|string} args An object specifying the file,
|
||||
* line, and column to edit. If a non-object is specified, it is
|
||||
* treated as the file parameter of the object.
|
||||
* @param {object|File|string} args An object specifying the file, line,
|
||||
* and column to edit. If a non-object is specified, it is treated as
|
||||
* the file parameter of the object.
|
||||
* @param {boolean} blocking If true, this function does not return
|
||||
* until the editor exits.
|
||||
*/
|
||||
|
||||
@@ -149,7 +149,7 @@ var StatusLine = Module("statusline", {
|
||||
this.timeout(function () {
|
||||
this.status = message || buffer.uri;
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user