1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 23:47:58 +01:00

Formatting fixes.

This commit is contained in:
Doug Kearns
2009-08-26 23:09:13 +10:00
parent bc1163c0c7
commit b6a898a5fa
9 changed files with 17 additions and 15 deletions

View File

@@ -1207,7 +1207,7 @@ function QuickMarks() //{{{
{
let pattern = RegExp("[" + filter.replace(/\s+/g, "") + "]");
for (let [qmark,] in qmarks)
for (let [qmark, ] in qmarks)
{
if (pattern.test(qmark))
qmarks.remove(qmark);

View File

@@ -1667,7 +1667,7 @@ function Marks() //{{{
if (localmark)
{
let win = window.content;
for (let [i,] in Iterator(localmark))
for (let [i, ] in Iterator(localmark))
{
if (localmark[i].location == win.location.href)
{
@@ -1903,17 +1903,17 @@ function Marks() //{{{
if (special)
{
// :delmarks! only deletes a-z marks
for (let [mark,] in localMarks)
for (let [mark, ] in localMarks)
removeLocalMark(mark);
}
else
{
for (let [mark,] in urlMarks)
for (let [mark, ] in urlMarks)
{
if (filter.indexOf(mark) >= 0)
removeURLMark(mark);
}
for (let [mark,] in localMarks)
for (let [mark, ] in localMarks)
{
if (filter.indexOf(mark) >= 0)
removeLocalMark(mark);

View File

@@ -471,13 +471,13 @@ CompletionContext.prototype = {
let filter = fixCase(this.filter);
if (this.anchored)
{
function compare (text, s) text.substr(0, s.length) == s;
function compare(text, s) text.substr(0, s.length) == s;
substrings = util.map(util.range(filter.length, text.length + 1),
function (end) text.substring(0, end));
}
else
{
function compare (text, s) text.indexOf(s) >= 0;
function compare(text, s) text.indexOf(s) >= 0;
substrings = [];
let start = 0;
let idx;

View File

@@ -842,7 +842,7 @@ function Events() //{{{
{
let re = RegExp(filter);
for (let [item,] in macros)
for (let [item, ] in macros)
{
if (re.test(item) || !filter)
macros.remove(item);

View File

@@ -449,7 +449,7 @@ function Hints() //{{{
{
let css = [];
// FIXME: Broken for imgspans.
for (let [,{ doc: doc }] in Iterator(docs))
for (let [, { doc: doc }] in Iterator(docs))
{
for (let elem in buffer.evaluateXPath("//*[@liberator:highlight and @number]", doc))
{
@@ -560,7 +560,7 @@ function Hints() //{{{
*
* @param {Event} event The keypress event.
*/
function onInput (event)
function onInput(event)
{
prevInput = "text";

View File

@@ -1072,7 +1072,7 @@ function Tabs() //{{{
let lowerBuffer = buffer.toLowerCase();
let first = tabs.index() + (reverse ? 0 : 1);
let nbrowsers = getBrowser().browsers.length;
for (let [i,] in tabs.browsers)
for (let [i, ] in tabs.browsers)
{
let index = (i + first) % nbrowsers;
let url = getBrowser().getBrowserAtIndex(index).contentDocument.location.href;

View File

@@ -2085,7 +2085,8 @@ function StatusLine() //{{{
var value = aURI.spec;
// Try to decode as UTF-8 if there's no encoding sequence that we would break.
if (!/%25(?:3B|2F|3F|3A|40|26|3D|2B|24|2C|23)/i.test(value))
try {
try
{
value = decodeURI(value)
// 1. decodeURI decodes %25 to %, which creates unintended
// encoding sequences. Re-encode it, unless it's part of
@@ -2096,7 +2097,8 @@ function StatusLine() //{{{
// by the location bar (bug 410726).
.replace(/%(?!3B|2F|3F|3A|40|26|3D|2B|24|2C|23)|[\r\n\t]/ig,
encodeURIComponent);
} catch (e) {}
}
catch (e) {}
// Encode invisible characters (soft hyphen, zero-width space, BOM,
// line and paragraph separator, word joiner, invisible times,

View File

@@ -150,7 +150,7 @@ commands.addUserCommand(["regr[essions]"],
commandline.updateOutputHeight = updateOutputHeight;
}
function run ()
function run()
{
let now = Date.now();
let totalTests = tests.length + functions.length;

View File

@@ -609,7 +609,7 @@ function Player() // {{{
return tracksList;
},
searchView: function searchView (args)
searchView: function searchView(args)
{
let currentView = _SBGetCurrentView();
let mediaItemList = currentView.mediaList;