1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-29 14:35:46 +01:00

whitespace formatting fixes

This commit is contained in:
Doug Kearns
2007-11-11 03:21:27 +00:00
parent 9427e2cc5d
commit 1bd4543ea3
16 changed files with 514 additions and 511 deletions

View File

@@ -27,7 +27,7 @@ the terms of any one of the MPL, the GPL or the LGPL.
}}} ***** END LICENSE BLOCK *****/
// also includes methods for dealing with keywords and search engines
vimperator.Bookmarks = function() //{{{
vimperator.Bookmarks = function () //{{{
{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
@@ -42,7 +42,7 @@ vimperator.Bookmarks = function() //{{{
var keywords = null;
if (vimperator.options["preload"])
setTimeout(function() { load(); } , 100);
setTimeout(function () { load(); } , 100);
function load()
{
@@ -78,7 +78,7 @@ vimperator.Bookmarks = function() //{{{
// FIXME: add filtering here rather than having to calling
// get_bookmark_completions()
this.get = function()
this.get = function ()
{
if (!bookmarks)
load();
@@ -105,7 +105,7 @@ vimperator.Bookmarks = function() //{{{
// NOTE: no idea what it does, it Just Works (TM)
// returns number of deleted bookmarks
this.remove = function(url)
this.remove = function (url)
{
var deleted = 0;
if (!url)
@@ -157,7 +157,7 @@ vimperator.Bookmarks = function() //{{{
}
// also ensures that each search engine has a Vimperator-friendly alias
this.getSearchEngines = function()
this.getSearchEngines = function ()
{
var search_engines = [];
var firefox_engines = search_service.getVisibleEngines({ });
@@ -173,7 +173,7 @@ vimperator.Bookmarks = function() //{{{
var newalias = alias;
for (var j = 1; j <= 10; j++) // <=10 is intentional
{
if (!search_engines.some(function(item) { return (item[0] == newalias); }))
if (!search_engines.some(function (item) { return (item[0] == newalias); }))
break;
newalias = alias + j;
@@ -190,7 +190,7 @@ vimperator.Bookmarks = function() //{{{
// format of returned array:
// [keyword, helptext, url]
this.getKeywords = function()
this.getKeywords = function ()
{
if (!keywords)
load();
@@ -201,7 +201,7 @@ vimperator.Bookmarks = function() //{{{
// if @param engine_name is null, it uses the default search engine
// @returns the url for the search string
// if the search also requires a postdata, [url, postdata] is returned
this.getSearchURL = function(text, engine_name)
this.getSearchURL = function (text, engine_name)
{
var url = null;
var postdata = null;
@@ -249,7 +249,7 @@ vimperator.Bookmarks = function() //{{{
return url; // can be null
}
this.list = function(filter, fullmode)
this.list = function (filter, fullmode)
{
if (fullmode)
{
@@ -290,7 +290,7 @@ vimperator.Bookmarks = function() //{{{
// res.title is the title or "" if no one was given
// res.url is the url as a string
// returns null, if parsing failed
this.parseBookmarkString = function(str)
this.parseBookmarkString = function (str)
{
var res = {};
res.tags = [];
@@ -356,7 +356,7 @@ vimperator.Bookmarks = function() //{{{
//}}}
} //}}}
vimperator.History = function() //{{{
vimperator.History = function () //{{{
{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
@@ -370,7 +370,7 @@ vimperator.History = function() //{{{
var history = null;
if (vimperator.options["preload"])
setTimeout(function() { load(); } , 100);
setTimeout(function () { load(); } , 100);
function load()
{
@@ -418,7 +418,7 @@ vimperator.History = function() //{{{
// FIXME: add filtering here rather than having to call
// get_bookmark_completions()
this.get = function()
this.get = function ()
{
if (!history)
load();
@@ -431,7 +431,7 @@ vimperator.History = function() //{{{
if (!history)
load();
history = history.filter(function(elem) {
history = history.filter(function (elem) {
return elem[0] != url;
});
@@ -441,7 +441,7 @@ vimperator.History = function() //{{{
// TODO: better names?
// and move to vimperator.buffer.?
this.stepTo = function(steps)
this.stepTo = function (steps)
{
var index = getWebNavigation().sessionHistory.index + steps;
@@ -455,7 +455,7 @@ vimperator.History = function() //{{{
}
}
this.goToStart = function()
this.goToStart = function ()
{
var index = getWebNavigation().sessionHistory.index;
@@ -468,7 +468,7 @@ vimperator.History = function() //{{{
getWebNavigation().gotoIndex(0);
}
this.goToEnd = function()
this.goToEnd = function ()
{
var index = getWebNavigation().sessionHistory.index;
var max = getWebNavigation().sessionHistory.count - 1;
@@ -482,7 +482,7 @@ vimperator.History = function() //{{{
getWebNavigation().gotoIndex(max);
}
this.list = function(filter, fullmode)
this.list = function (filter, fullmode)
{
if (fullmode)
{
@@ -519,7 +519,7 @@ vimperator.History = function() //{{{
//}}}
} //}}}
vimperator.Marks = function() //{{{
vimperator.Marks = function () //{{{
{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
@@ -608,7 +608,7 @@ vimperator.Marks = function() //{{{
umarks.push([mark, url_marks[mark]]);
// FIXME: why does umarks.sort() cause a "Component is not available =
// NS_ERROR_NOT_AVAILABLE" exception when used here?
umarks.sort(function(a, b) {
umarks.sort(function (a, b) {
if (a[0] < b[0])
return -1;
else if (a[0] > b[0])
@@ -625,7 +625,7 @@ vimperator.Marks = function() //{{{
/////////////////////////////////////////////////////////////////////////////{{{
// TODO: add support for frameset pages
this.add = function(mark)
this.add = function (mark)
{
var win = window.content;
@@ -655,7 +655,7 @@ vimperator.Marks = function() //{{{
}
}
this.remove = function(filter, special)
this.remove = function (filter, special)
{
if (special)
{
@@ -679,7 +679,7 @@ vimperator.Marks = function() //{{{
}
}
this.jumpTo = function(mark)
this.jumpTo = function (mark)
{
var ok = false;
@@ -733,7 +733,7 @@ vimperator.Marks = function() //{{{
vimperator.echoerr("E20: Mark not set"); // FIXME: move up?
}
this.list = function(filter)
this.list = function (filter)
{
var marks = getSortedMarks();
@@ -745,7 +745,7 @@ vimperator.Marks = function() //{{{
if (filter.length > 0)
{
marks = marks.filter(function(mark) {
marks = marks.filter(function (mark) {
if (filter.indexOf(mark[0]) > -1)
return mark;
});
@@ -774,7 +774,7 @@ vimperator.Marks = function() //{{{
//}}}
} //}}}
vimperator.QuickMarks = function() //{{{
vimperator.QuickMarks = function () //{{{
{
////////////////////////////////////////////////////////////////////////////////
////////////////////// PRIVATE SECTION /////////////////////////////////////////
@@ -793,12 +793,12 @@ vimperator.QuickMarks = function() //{{{
////////////////////// PUBLIC SECTION //////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
this.add = function(qmark, location)
this.add = function (qmark, location)
{
qmarks[qmark] = location;
}
this.remove = function(filter)
this.remove = function (filter)
{
var pattern = new RegExp("[" + filter.replace(/\s+/g, "") + "]");
@@ -809,12 +809,12 @@ vimperator.QuickMarks = function() //{{{
}
}
this.removeAll = function()
this.removeAll = function ()
{
qmarks = {};
}
this.jumpTo = function(qmark, where)
this.jumpTo = function (qmark, where)
{
var url = qmarks[qmark];
@@ -824,7 +824,7 @@ vimperator.QuickMarks = function() //{{{
vimperator.echoerr("E20: QuickMark not set");
}
this.list = function(filter)
this.list = function (filter)
{
var marks = [];
@@ -841,7 +841,7 @@ vimperator.QuickMarks = function() //{{{
if (filter.length > 0)
{
marks = marks.filter(function(mark) {
marks = marks.filter(function (mark) {
if (filter.indexOf(mark[0]) > -1)
return mark;
});
@@ -864,7 +864,7 @@ vimperator.QuickMarks = function() //{{{
vimperator.commandline.echo(list, vimperator.commandline.HL_NORMAL, vimperator.commandline.FORCE_MULTILINE);
}
this.destroy = function()
this.destroy = function ()
{
// save the quickmarks
var saved_qmarks = "";