1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:07:59 +01:00

Whitespace and semicolon fixes.

This commit is contained in:
Doug Kearns
2009-08-10 02:15:23 +10:00
parent a8001baa03
commit 77458e5b8a
16 changed files with 66 additions and 61 deletions

4
common/content/bookmarks.js Normal file → Executable file
View File

@@ -970,7 +970,7 @@ function History() //{{{
completion.history = function _history(context, maxItems) { completion.history = function _history(context, maxItems) {
context.format = history.format; context.format = history.format;
context.title = ["History"] context.title = ["History"];
context.compare = CompletionContext.Sort.unsorted; context.compare = CompletionContext.Sort.unsorted;
//context.background = true; //context.background = true;
if (context.maxItems == null) if (context.maxItems == null)
@@ -1027,7 +1027,7 @@ function History() //{{{
let sh = window.getWebNavigation().sessionHistory; let sh = window.getWebNavigation().sessionHistory;
let obj = []; let obj = [];
obj.index = sh.index; obj.index = sh.index;
obj.__iterator__ = function() util.Array.iteritems(this) obj.__iterator__ = function () util.Array.iteritems(this);
for (let i in util.range(0, sh.count)) for (let i in util.range(0, sh.count))
{ {
obj[i] = { index: i, __proto__: sh.getEntryAtIndex(i, false) }; obj[i] = { index: i, __proto__: sh.getEntryAtIndex(i, false) };

15
common/content/browser.js Normal file → Executable file
View File

@@ -71,7 +71,7 @@ function Browser() //{{{
// Stolen from browser.jar/content/browser/browser.js, more or less. // Stolen from browser.jar/content/browser/browser.js, more or less.
try try
{ {
var docCharset = getBrowser().docShell.QueryInterface(Ci.nsIDocCharset).charset = val var docCharset = getBrowser().docShell.QueryInterface(Ci.nsIDocCharset).charset = val;
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val); PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE); getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
} }
@@ -95,19 +95,24 @@ function Browser() //{{{
let services = modules.services; // Storage objects are global to all windows, 'modules' isn't. let services = modules.services; // Storage objects are global to all windows, 'modules' isn't.
storage.newObject("private-mode", function () { storage.newObject("private-mode", function () {
({ ({
init: function () { init: function ()
{
services.get("observer").addObserver(this, "private-browsing", false); services.get("observer").addObserver(this, "private-browsing", false);
services.get("observer").addObserver(this, "quit-application", false); services.get("observer").addObserver(this, "quit-application", false);
this.private = services.get("privateBrowsing").privateBrowsingEnabled; this.private = services.get("privateBrowsing").privateBrowsingEnabled;
}, },
observe: function (subject, topic, data) { observe: function (subject, topic, data)
if (topic == "private-browsing") { {
if (topic == "private-browsing")
{
if (data == "enter") if (data == "enter")
storage.privateMode = true; storage.privateMode = true;
else if (data == "exit") else if (data == "exit")
storage.privateMode = false; storage.privateMode = false;
storage.fireEvent("private-mode", "change", storage.privateMode); storage.fireEvent("private-mode", "change", storage.privateMode);
} else if (topic == "quit-application") { }
else if (topic == "quit-application")
{
services.get("observer").removeObserver(this, "quit-application"); services.get("observer").removeObserver(this, "quit-application");
services.get("observer").removeObserver(this, "private-browsing"); services.get("observer").removeObserver(this, "private-browsing");
} }

2
common/content/commands.js Normal file → Executable file
View File

@@ -1171,7 +1171,7 @@ function Commands() //{{{
// then get completions of the command name // then get completions of the command name
let [count, cmd, bang, args] = commands.parseCommand(context.filter); let [count, cmd, bang, args] = commands.parseCommand(context.filter);
let [, prefix, junk] = context.filter.match(/^(:*\d*)\w*(.?)/) || []; let [, prefix, junk] = context.filter.match(/^(:*\d*)\w*(.?)/) || [];
context.advance(prefix.length) context.advance(prefix.length);
if (!junk) if (!junk)
return context.fork("", 0, this, "command"); return context.fork("", 0, this, "command");

42
common/content/completion.js Normal file → Executable file
View File

@@ -128,7 +128,7 @@ function CompletionContext(editor, name, offset) //{{{
return this.filters. return this.filters.
reduce(function (res, filter) res.filter(function (item) filter.call(self, item)), reduce(function (res, filter) res.filter(function (item) filter.call(self, item)),
items); items);
} };
/** /**
* @property {Array} An array of predicates on which to filter the * @property {Array} An array of predicates on which to filter the
* results. * results.
@@ -256,12 +256,12 @@ CompletionContext.prototype = {
let prefix = self.value.substring(minStart, context.offset); let prefix = self.value.substring(minStart, context.offset);
return context.items.map(function makeItem(item) ({ text: prefix + item.text, item: item.item })); return context.items.map(function makeItem(item) ({ text: prefix + item.text, item: item.item }));
}); });
return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring } return { start: minStart, items: util.Array.flatten(items), longestSubstring: this.longestAllSubstring };
} }
catch (e) catch (e)
{ {
liberator.reportError(e); liberator.reportError(e);
return { start: 0, items: [], longestAllSubstring: "" } return { start: 0, items: [], longestAllSubstring: "" };
} }
}, },
// Temporary // Temporary
@@ -306,7 +306,7 @@ CompletionContext.prototype = {
this._completions = items; this._completions = items;
let self = this; let self = this;
if (this.updateAsync && !this.noUpdate) if (this.updateAsync && !this.noUpdate)
liberator.callInMainThread(function () { self.onUpdate.call(self) }); liberator.callInMainThread(function () { self.onUpdate.call(self); });
}, },
get createRow() this._createRow || template.completionRow, // XXX get createRow() this._createRow || template.completionRow, // XXX
@@ -319,7 +319,7 @@ CompletionContext.prototype = {
set filter(val) set filter(val)
{ {
delete this._ignoreCase; delete this._ignoreCase;
return this._filter = val return this._filter = val;
}, },
get format() ({ get format() ({
@@ -347,7 +347,7 @@ CompletionContext.prototype = {
let [k, v] = i; let [k, v] = i;
let _k = "_" + k; let _k = "_" + k;
if (typeof v == "string" && /^[.[]/.test(v)) if (typeof v == "string" && /^[.[]/.test(v))
v = eval("(function (i) i" + v + ")") v = eval("(function (i) i" + v + ")");
if (typeof v == "function") if (typeof v == "function")
res.__defineGetter__(k, function () _k in this ? this[_k] : (this[_k] = v(this.item))); res.__defineGetter__(k, function () _k in this ? this[_k] : (this[_k] = v(this.item)));
else else
@@ -358,7 +358,7 @@ CompletionContext.prototype = {
}, },
get regenerate() this._generate && (!this.completions || !this.itemCache[this.key] || this.cache.offset != this.offset), get regenerate() this._generate && (!this.completions || !this.itemCache[this.key] || this.cache.offset != this.offset),
set regenerate(val) { if (val) delete this.itemCache[this.key] }, set regenerate(val) { if (val) delete this.itemCache[this.key]; },
get generate() !this._generate ? null : function () get generate() !this._generate ? null : function ()
{ {
@@ -438,7 +438,7 @@ CompletionContext.prototype = {
filtered.forEach(function (item) { filtered.forEach(function (item) {
item.unquoted = item.text; item.unquoted = item.text;
item.text = quote[0] + quote[1](item.text) + quote[2]; item.text = quote[0] + quote[1](item.text) + quote[2];
}) });
return this.cache.filtered = filtered; return this.cache.filtered = filtered;
}, },
@@ -573,7 +573,7 @@ CompletionContext.prototype = {
fork: function fork(name, offset, self, completer) fork: function fork(name, offset, self, completer)
{ {
if (typeof completer == "string") if (typeof completer == "string")
completer = self[completer] completer = self[completer];
let context = new CompletionContext(this, name, offset); let context = new CompletionContext(this, name, offset);
this.contextList.push(context); this.contextList.push(context);
if (completer) if (completer)
@@ -762,7 +762,7 @@ function Completion() //{{{
} }
catch (e) {} catch (e) {}
return iterator; return iterator;
} };
// Search the object for strings starting with @key. // Search the object for strings starting with @key.
// If @last is defined, key is a quoted string, it's // If @last is defined, key is a quoted string, it's
@@ -812,7 +812,7 @@ function Completion() //{{{
}); });
return compl; return compl;
} };
this.eval = function eval(arg, key, tmp) this.eval = function eval(arg, key, tmp)
{ {
@@ -837,7 +837,7 @@ function Completion() //{{{
{ {
delete context[EVAL_TMP]; delete context[EVAL_TMP];
} }
} };
// Get an element from the stack. If @n is negative, // Get an element from the stack. If @n is negative,
// count from the top of the stack, otherwise, the bottom. // count from the top of the stack, otherwise, the bottom.
@@ -851,7 +851,7 @@ function Completion() //{{{
if (m == null) if (m == null)
return a; return a;
return a[a.length - m - 1]; return a[a.length - m - 1];
} };
function buildStack(filter) function buildStack(filter)
{ {
@@ -862,7 +862,7 @@ function Completion() //{{{
top = [i, arg, [i], [], [], [], []]; top = [i, arg, [i], [], [], [], []];
last = top[CHAR]; last = top[CHAR];
stack.push(top); stack.push(top);
} };
let pop = function pop(arg) let pop = function pop(arg)
{ {
if (top[CHAR] != arg) if (top[CHAR] != arg)
@@ -882,7 +882,7 @@ function Completion() //{{{
last = top[CHAR]; last = top[CHAR];
let ret = stack.pop(); let ret = stack.pop();
return ret; return ret;
} };
let i = 0, c = ""; // Current index and character, respectively. let i = 0, c = ""; // Current index and character, respectively.
@@ -1056,7 +1056,7 @@ function Completion() //{{{
prev = dot + 1; prev = dot + 1;
obj = self.eval(s, cacheKey, obj); obj = self.eval(s, cacheKey, obj);
} }
return [[obj, cacheKey]] return [[obj, cacheKey]];
} }
function getObjKey(frame) function getObjKey(frame)
@@ -1113,13 +1113,13 @@ function Completion() //{{{
if (!isnan(a.item.key) && !isnan(b.item.key)) if (!isnan(a.item.key) && !isnan(b.item.key))
return a.item.key - b.item.key; return a.item.key - b.item.key;
return isnan(b.item.key) - isnan(a.item.key) || compare(a, b); return isnan(b.item.key) - isnan(a.item.key) || compare(a, b);
} };
if (!context.anchored) // We've already listed anchored matches, so don't list them again here. if (!context.anchored) // We've already listed anchored matches, so don't list them again here.
context.filters.push(function (item) util.compareIgnoreCase(item.text.substr(0, this.filter.length), this.filter)); context.filters.push(function (item) util.compareIgnoreCase(item.text.substr(0, this.filter.length), this.filter));
if (obj == cache.evalContext) if (obj == cache.evalContext)
context.regenerate = true; context.regenerate = true;
context.generate = function () self.objectKeys(obj); context.generate = function () self.objectKeys(obj);
} };
} }
// TODO: Make this a generic completion helper function. // TODO: Make this a generic completion helper function.
let filter = key + (string || ""); let filter = key + (string || "");
@@ -1226,7 +1226,7 @@ function Completion() //{{{
let res = completer.call(self, context, func, obj, args); let res = completer.call(self, context, func, obj, args);
if (res) if (res)
context.completions = res; context.completions = res;
} };
obj[0][1] += "." + func + "(... [" + args.length + "]"; obj[0][1] += "." + func + "(... [" + args.length + "]";
return complete.call(this, obj, key, compl, string, last); return complete.call(this, obj, key, compl, string, last);
@@ -1346,7 +1346,7 @@ function Completion() //{{{
let numLocationCompletions = 0; // how many async completions did we already return to the caller? let numLocationCompletions = 0; // how many async completions did we already return to the caller?
let start = 0; let start = 0;
let skip = 0; let skip = 0;
if (options["urlseparator"]) if (options["urlseparator"])
skip = context.filter.match("^.*" + options["urlseparator"]); // start after the last 'urlseparator' skip = context.filter.match("^.*" + options["urlseparator"]); // start after the last 'urlseparator'
@@ -1372,7 +1372,7 @@ function Completion() //{{{
urls: function (context, tags) urls: function (context, tags)
{ {
let compare = String.localeCompare; let compare = String.localeCompare;
let contains = String.indexOf let contains = String.indexOf;
if (context.ignoreCase) if (context.ignoreCase)
{ {
compare = util.compareIgnoreCase; compare = util.compareIgnoreCase;

18
common/content/events.js Normal file → Executable file
View File

@@ -97,7 +97,7 @@ function AutoCommands() //{{{
if (args.bang) if (args.bang)
autocommands.remove(event, regex); autocommands.remove(event, regex);
if (args["-javascript"]) if (args["-javascript"])
cmd = eval("(function(args) { with(args) {" + cmd + "} })"); cmd = eval("(function (args) { with(args) {" + cmd + "} })");
autocommands.add(events, regex, cmd); autocommands.add(events, regex, cmd);
} }
else else
@@ -351,7 +351,7 @@ function Events() //{{{
pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command pendingMotionMap: null, // e.g. "d{motion}" if we wait for a motion of the "d" command
pendingArgMap: null, // pending map storage for commands like m{a-z} pendingArgMap: null, // pending map storage for commands like m{a-z}
count: -1 // parsed count from the input buffer count: -1 // parsed count from the input buffer
} };
var fullscreen = window.fullScreen; var fullscreen = window.fullScreen;
@@ -471,9 +471,9 @@ function Events() //{{{
.replace(/^NUMPAD/, "k")]; .replace(/^NUMPAD/, "k")];
if (k in keyTable) if (k in keyTable)
names = keyTable[k]; names = keyTable[k];
code_key[v] = names[0] code_key[v] = names[0];
for (let [,name] in Iterator(names)) for (let [,name] in Iterator(names))
key_code[name.toLowerCase()] = v key_code[name.toLowerCase()] = v;
} }
// HACK: as Gecko does not include an event for <, we must add this in manually. // HACK: as Gecko does not include an event for <, we must add this in manually.
@@ -1013,7 +1013,7 @@ function Events() //{{{
*/ */
fromString: function (input) fromString: function (input)
{ {
let out = [] let out = [];
let re = RegExp("<.*?>?>|[^<]|<(?!.*>)", "g"); let re = RegExp("<.*?>?>|[^<]|<(?!.*>)", "g");
let match; let match;
@@ -1042,7 +1042,7 @@ function Events() //{{{
{ {
if (evt_obj.shiftKey) if (evt_obj.shiftKey)
{ {
keyname = keyname.toUpperCase() keyname = keyname.toUpperCase();
if (keyname == keyname.toLowerCase()) if (keyname == keyname.toLowerCase())
evt_obj.liberatorShift = true; evt_obj.liberatorShift = true;
} }
@@ -1062,7 +1062,7 @@ function Events() //{{{
} }
else // spaces, control characters, and < else // spaces, control characters, and <
{ {
evt_obj.keyCode = key_code[keyname] evt_obj.keyCode = key_code[keyname];
evt_obj.charCode = 0; evt_obj.charCode = 0;
} }
} }
@@ -1079,7 +1079,7 @@ function Events() //{{{
if (evt_obj.keyCode == 32 || evt_obj.charCode == 32) if (evt_obj.keyCode == 32 || evt_obj.charCode == 32)
evt_obj.charCode = evt_obj.keyCode = 32; // <Space> evt_obj.charCode = evt_obj.keyCode = 32; // <Space>
if (evt_obj.keyCode == 60 || evt_obj.charCode == 60) if (evt_obj.keyCode == 60 || evt_obj.charCode == 60)
evt_obj.charCode = evt_obj.keyCode = 60 // <lt> evt_obj.charCode = evt_obj.keyCode = 60; // <lt>
out.push(evt_obj); out.push(evt_obj);
} }
@@ -1321,7 +1321,7 @@ function Events() //{{{
if (config.focusChange) if (config.focusChange)
return void config.focusChange(win); return void config.focusChange(win);
urlbar = document.getElementById("urlbar"); let urlbar = document.getElementById("urlbar");
if (elem == null && urlbar && urlbar.inputField == lastFocus) if (elem == null && urlbar && urlbar.inputField == lastFocus)
liberator.threadYield(true); liberator.threadYield(true);

2
common/content/hints.js Normal file → Executable file
View File

@@ -818,7 +818,7 @@ function Hints() //{{{
["contains", "The typed characters are split on whitespace. The resulting groups must all appear in the hint."], ["contains", "The typed characters are split on whitespace. The resulting groups must all appear in the hint."],
["wordstartswith", "The typed characters are split on whitespace. The resulting groups must all match the beginings of words, in order."], ["wordstartswith", "The typed characters are split on whitespace. The resulting groups must all match the beginings of words, in order."],
["firstletters", "Behaves like wordstartswith, but all groups much match a sequence of words."], ["firstletters", "Behaves like wordstartswith, but all groups much match a sequence of words."],
["custom", "Delegate to a custom function: liberator.plugins.customHintMatcher(hintString)"], ["custom", "Delegate to a custom function: liberator.plugins.customHintMatcher(hintString)"]
], ],
validator: Option.validateCompleter validator: Option.validateCompleter
}); });

2
common/content/io.js Normal file → Executable file
View File

@@ -478,7 +478,7 @@ function IO() //{{{
} }
return util.Array.flatten(commands); return util.Array.flatten(commands);
} };
}; };
completion.addUrlCompleter("f", "Local files", completion.file); completion.addUrlCompleter("f", "Local files", completion.file);

8
common/content/liberator.js Normal file → Executable file
View File

@@ -489,7 +489,7 @@ const liberator = (function () //{{{
bang: true, bang: true,
completer: function (context) completer: function (context)
{ {
completion.extension(context) completion.extension(context);
if (command.filter) if (command.filter)
context.filters.push(command.filter); context.filters.push(command.filter);
}, },
@@ -852,7 +852,7 @@ const liberator = (function () //{{{
function (elem) [elem.textContent, file]); function (elem) [elem.textContent, file]);
}); });
return util.Array.flatten(res); return util.Array.flatten(res);
} };
}; };
completion.menuItem = function menuItem(context) { completion.menuItem = function menuItem(context) {
@@ -866,7 +866,7 @@ const liberator = (function () //{{{
context.title = ["Toolbar"]; context.title = ["Toolbar"];
context.keys = { text: function (item) item.getAttribute("toolbarname"), description: function () "" }; context.keys = { text: function (item) item.getAttribute("toolbarname"), description: function () "" };
context.completions = buffer.evaluateXPath("./*[@toolbarname]", document, toolbox); context.completions = buffer.evaluateXPath("./*[@toolbarname]", document, toolbox);
} };
}); });
/////////////////////////////////////////////////////////////////////////////}}} /////////////////////////////////////////////////////////////////////////////}}}
@@ -913,7 +913,7 @@ const liberator = (function () //{{{
} }
//const Extension = new Struct("id", "name", "description", "icon", "enabled", "version"); //const Extension = new Struct("id", "name", "description", "icon", "enabled", "version");
return extensions.map(function(e) ({ return extensions.map(function (e) ({
id: e.id, id: e.id,
name: e.name, name: e.name,
description: getRdfProperty(e, "description"), description: getRdfProperty(e, "description"),

2
common/content/mappings.js Normal file → Executable file
View File

@@ -266,7 +266,7 @@ function Mappings() //{{{
} }
for (map in mappingsIterator(modes, user)) for (map in mappingsIterator(modes, user))
if (map.rhs && map.noremap == noremap) if (map.rhs && map.noremap == noremap)
] ];
} }
}; };

2
common/content/modes.js Normal file → Executable file
View File

@@ -259,7 +259,7 @@ const modes = (function () //{{{
set main(value) { this.set(value); }, set main(value) { this.set(value); },
get extended() extended, get extended() extended,
set extended(value) { this.set(null, value) } set extended(value) { this.set(null, value); }
}; };

2
common/content/options.js Normal file → Executable file
View File

@@ -762,7 +762,7 @@ function Options() //{{{
return <tr> return <tr>
<td style="width: 200px;">{i}</td> <td style="width: 200px;">{i}</td>
<td>{prefix}{value}</td> <td>{prefix}{value}</td>
</tr> </tr>;
}) })
} }
</table>; </table>;

4
common/content/style.js Normal file → Executable file
View File

@@ -306,7 +306,7 @@ function Styles(name, store)
{ {
this.registerSheet(cssUri(wrapCSS(sheet))); this.registerSheet(cssUri(wrapCSS(sheet)));
if (sheet.agent) if (sheet.agent)
this.registerAgentSheet(cssUri(wrapCSS(sheet))) this.registerAgentSheet(cssUri(wrapCSS(sheet)));
} }
catch (e) catch (e)
{ {
@@ -335,7 +335,7 @@ function Styles(name, store)
let names = system ? systemNames : userNames; let names = system ? systemNames : userNames;
if (typeof sheet === "number") if (typeof sheet === "number")
return sheets[sheet]; return sheets[sheet];
return names[sheet] return names[sheet];
}; };
/** /**

4
common/content/ui.js Normal file → Executable file
View File

@@ -363,7 +363,7 @@ function CommandLine() //{{{
{ {
case this.UP: case this.UP:
if (this.selected == null) if (this.selected == null)
idx = -2 idx = -2;
else else
idx = this.selected - 1; idx = this.selected - 1;
break; break;
@@ -2126,7 +2126,7 @@ function StatusLine() //{{{
value = value.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g, value = value.replace(/[\u200e\u200f\u202a\u202b\u202c\u202d\u202e]/g,
encodeURIComponent); encodeURIComponent);
return value; return value;
} };
if (url == null) if (url == null)
// TODO: this probably needs a more general solution. // TODO: this probably needs a more general solution.

8
common/content/util.js Normal file → Executable file
View File

@@ -524,7 +524,7 @@ const util = { //{{{
value = template.highlight(value, true, 150); value = template.highlight(value, true, 150);
// FIXME: Inline style. // FIXME: Inline style.
key = <span style="font-weight: bold;">{i}</span>; let key = <span style="font-weight: bold;">{i}</span>;
if (!isNaN(i)) if (!isNaN(i))
i = parseInt(i); i = parseInt(i);
else if (/^[A-Z_]+$/.test(i)) else if (/^[A-Z_]+$/.test(i))
@@ -649,7 +649,7 @@ const util = { //{{{
if (options["urlseparator"]) if (options["urlseparator"])
urls = util.splitLiteral(str, RegExp("\\s*" + options["urlseparator"] + "\\s*")); urls = util.splitLiteral(str, RegExp("\\s*" + options["urlseparator"] + "\\s*"));
else else
urls = [str] urls = [str];
return urls.map(function (url) { return urls.map(function (url) {
try try
@@ -741,8 +741,8 @@ util.Array = function Array_(ary) {
return util.Array(res); return util.Array(res);
return res; return res;
}, },
concat: function() [].concat.apply(this.__proto__, arguments), concat: function () [].concat.apply(this.__proto__, arguments),
map: function() this.__noSuchMethod__("map", Array.slice(arguments)), map: function () this.__noSuchMethod__("map", Array.slice(arguments)),
}; };
return obj; return obj;
} }

6
muttator/content/mail.js Normal file → Executable file
View File

@@ -251,7 +251,7 @@ function Mail() //{{{
function () function ()
{ {
if (gDBView && gDBView.selection.count < 1) if (gDBView && gDBView.selection.count < 1)
return liberator.beep(); return void liberator.beep();
MsgOpenNewTabForMessage(); MsgOpenNewTabForMessage();
}); });
@@ -558,7 +558,7 @@ function Mail() //{{{
function (arg) function (arg)
{ {
if (!GetSelectedMessages()) if (!GetSelectedMessages())
return liberator.beep(); return void liberator.beep();
switch (arg) switch (arg)
{ {
@@ -664,7 +664,7 @@ function Mail() //{{{
"Select a folder", "Select a folder",
function (args) function (args)
{ {
let count = Math.max(0, args.count - 1) let count = Math.max(0, args.count - 1);
let arg = args.literalArg || "Inbox"; let arg = args.literalArg || "Inbox";
let folder = mail.getFolders(arg, true, true)[count]; let folder = mail.getFolders(arg, true, true)[count];

6
xulmus/content/player.js Normal file → Executable file
View File

@@ -193,7 +193,7 @@ function Player() // {{{
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["<C-" + rating + ">"], "Rate the current media item " + rating, ["<C-" + rating + ">"], "Rate the current media item " + rating,
function () { player.rateMediaItem(rating); }); function () { player.rateMediaItem(rating); });
} };
} }
////////////////// ///////////////////////////////////////////////////////////}}} ////////////////// ///////////////////////////////////////////////////////////}}}
@@ -306,9 +306,9 @@ function Player() // {{{
} }
if (/^[-+]/.test(arg)) if (/^[-+]/.test(arg))
arg[0] == "-" ? player.seekBackward(value) : player.seekForward(value) arg[0] == "-" ? player.seekBackward(value) : player.seekForward(value);
else else
player.seekTo(value) player.seekTo(value);
}, },
{ argCount: "1" }); { argCount: "1" });