summaryrefslogtreecommitdiff
path: root/common/content
diff options
context:
space:
mode:
authorDoug Kearns <dougkearns@gmail.com>2011-03-19 15:00:46 +1100
committerDoug Kearns <dougkearns@gmail.com>2011-03-19 15:00:46 +1100
commitaf550c3839eafa7902ebd50dc7805e40dbadeee1 (patch)
tree86a0a8496ec97557da7eb24ba81ad0f897e3a645 /common/content
parent57dbc1b91328c47396e566cf7a85b1adfe6441a1 (diff)
downloadpentadactyl-af550c3839eafa7902ebd50dc7805e40dbadeee1.tar.gz
Run style bot.
--HG-- extra : rebase_source : 3661ea16c48258e44239734cdad6bc18abc70b5f
Diffstat (limited to 'common/content')
-rw-r--r--common/content/bookmarks.js4
-rw-r--r--common/content/buffer.js16
-rw-r--r--common/content/commandline.js2
-rw-r--r--common/content/dactyl.js88
-rw-r--r--common/content/editor.js8
-rw-r--r--common/content/hints.js2
-rw-r--r--common/content/statusline.js8
7 files changed, 64 insertions, 64 deletions
diff --git a/common/content/bookmarks.js b/common/content/bookmarks.js
index 4e7ded7f..a7e9bbad 100644
--- a/common/content/bookmarks.js
+++ b/common/content/bookmarks.js
@@ -403,7 +403,7 @@ var Bookmarks = Module("bookmarks", {
completer: function title(context, args) {
let frames = buffer.allFrames();
if (!args.bang)
- return [
+ return [
[win.document.title, frames.length == 1 ? "Current Location" : "Frame: " + win.location.href]
for ([, win] in Iterator(frames))];
context.keys.text = "title";
@@ -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) });
diff --git a/common/content/buffer.js b/common/content/buffer.js
index 6c18ef0a..7ea61625 100644
--- a/common/content/buffer.js
+++ b/common/content/buffer.js
@@ -742,7 +742,7 @@ var Buffer = Module("buffer", {
* Shifts the focus to another frame within the buffer. Each buffer
* contains at least one frame.
*
- * @param {number} count The number of frames to skip through. A negative
+ * @param {number} count The number of frames to skip through. A negative
* count skips backwards.
*/
shiftFrameFocus: function shiftFrameFocus(count) {
@@ -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)
diff --git a/common/content/commandline.js b/common/content/commandline.js
index 5685c9da..c64df4c2 100644
--- a/common/content/commandline.js
+++ b/common/content/commandline.js
@@ -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;
},
diff --git a/common/content/dactyl.js b/common/content/dactyl.js
index 7a8ac25a..7f0a4930 100644
--- a/common/content/dactyl.js
+++ b/common/content/dactyl.js
@@ -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) {
@@ -853,51 +853,51 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
.split(" "));
function fix(node) {
switch(node.nodeType) {
- case Node.ELEMENT_NODE:
- if (isinstance(node, [HTMLBaseElement]))
- return;
-
- data.push("<"); data.push(node.localName);
- if (node instanceof HTMLHtmlElement)
- data.push(" xmlns=" + XHTML.uri.quote());
-
- for (let { name, value } in array.iterValues(node.attributes)) {
- if (name == "dactyl:highlight") {
- set.add(styles, value);
- name = "class";
- value = "hl-" + value;
- }
- if (name == "href") {
- value = node.href || value;
- if (value.indexOf("dactyl://help-tag/") == 0) {
- let uri = services.io.newChannel(value, null, null).originalURI;
- value = uri.spec == value ? "javascript:;" : uri.path.substr(1);
- }
- if (!/^#|[\/](#|$)|^[a-z]+:/.test(value))
- value = value.replace(/(#|$)/, ".xhtml$1");
- }
- if (name == "src" && value.indexOf(":") > 0) {
- chromeFiles[value] = value.replace(/.*\//, "");
- value = value.replace(/.*\//, "");
+ case Node.ELEMENT_NODE:
+ if (isinstance(node, [HTMLBaseElement]))
+ return;
+
+ data.push("<"); data.push(node.localName);
+ if (node instanceof HTMLHtmlElement)
+ data.push(" xmlns=" + XHTML.uri.quote());
+
+ for (let { name, value } in array.iterValues(node.attributes)) {
+ if (name == "dactyl:highlight") {
+ set.add(styles, value);
+ name = "class";
+ value = "hl-" + value;
+ }
+ if (name == "href") {
+ value = node.href || value;
+ if (value.indexOf("dactyl://help-tag/") == 0) {
+ let uri = services.io.newChannel(value, null, null).originalURI;
+ value = uri.spec == value ? "javascript:;" : uri.path.substr(1);
}
- data.push(" ");
- data.push(name);
- data.push('="');
- data.push(<>{value}</>.toXMLString().replace(/"/g, "&quot;"));
- data.push('"');
+ if (!/^#|[\/](#|$)|^[a-z]+:/.test(value))
+ value = value.replace(/(#|$)/, ".xhtml$1");
}
- if (node.localName in empty)
- data.push(" />");
- else {
- data.push(">");
- if (node instanceof HTMLHeadElement)
- data.push(<link rel="stylesheet" type="text/css" href="help.css"/>.toXMLString());
- Array.map(node.childNodes, fix);
- data.push("</"); data.push(node.localName); data.push(">");
+ if (name == "src" && value.indexOf(":") > 0) {
+ chromeFiles[value] = value.replace(/.*\//, "");
+ value = value.replace(/.*\//, "");
}
- break;
- case Node.TEXT_NODE:
- data.push(<>{node.textContent}</>.toXMLString());
+ data.push(" ");
+ data.push(name);
+ data.push('="');
+ data.push(<>{value}</>.toXMLString().replace(/"/g, "&quot;"));
+ data.push('"');
+ }
+ if (node.localName in empty)
+ data.push(" />");
+ else {
+ data.push(">");
+ if (node instanceof HTMLHeadElement)
+ data.push(<link rel="stylesheet" type="text/css" href="help.css"/>.toXMLString());
+ Array.map(node.childNodes, fix);
+ data.push("</"); data.push(node.localName); data.push(">");
+ }
+ break;
+ case Node.TEXT_NODE:
+ data.push(<>{node.textContent}</>.toXMLString());
}
}
@@ -1811,7 +1811,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
bang: true,
keepQuotes: true,
serialGroup: 10,
- serialize: function () [
+ serialize: function () [
{
command: this.name,
literalArg: options["loadplugins"].join(" ")
diff --git a/common/content/editor.js b/common/content/editor.js
index ae88a8f9..6e9069ef 100644
--- a/common/content/editor.js
+++ b/common/content/editor.js
@@ -230,11 +230,11 @@ 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.
+ * until the editor exits.
*/
editFileExternally: function (args, blocking) {
if (!isObject(args) || args instanceof File)
diff --git a/common/content/hints.js b/common/content/hints.js
index 1459198f..53582cf9 100644
--- a/common/content/hints.js
+++ b/common/content/hints.js
@@ -837,7 +837,7 @@ var Hints = Module("hints", {
* returns true if each set of characters typed can be found, in any
* order, in the link.
*
- * @param {string} hintString The string typed by the user.
+ * @param {string} hintString The string typed by the user.
* @returns {function(String):boolean} A function that takes the text
* of a hint and returns true if all the (space-delimited) sets of
* characters typed by the user can be found in it.
diff --git a/common/content/statusline.js b/common/content/statusline.js
index 062c6c65..a4b3280c 100644
--- a/common/content/statusline.js
+++ b/common/content/statusline.js
@@ -26,13 +26,13 @@ var StatusLine = Module("statusline", {
util.overlayWindow(window, { append: <><statusbar id="status-bar" ordinal="0"/></> });
highlight.loadCSS(util.compileMacro(<![CDATA[
- !AddonBar;#addon-bar {
+ !AddonBar;#addon-bar {
padding-left: 0 !important;
min-height: 18px !important;
-moz-appearance: none !important;
<padding>
}
- !AddonButton;#addon-bar xul|toolbarbutton {
+ !AddonButton;#addon-bar xul|toolbarbutton {
-moz-appearance: none !important;
padding: 0 !important;
border-width: 0px !important;
@@ -149,7 +149,7 @@ var StatusLine = Module("statusline", {
this.timeout(function () {
this.status = message || buffer.uri;
});
- },
+ }
},
/**
@@ -300,7 +300,7 @@ var StatusLine = Module("statusline", {
*/
progress: Modes.boundProperty({
get: function progress() this._progress,
- set: function progress(progress) {
+ set: function progress(progress) {
this._progress = progress || "";
if (typeof progress == "string")