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

whitespace fixes

This commit is contained in:
Doug Kearns
2008-06-06 13:47:51 +00:00
parent d79224b4cd
commit 5beaa4ca6c
6 changed files with 42 additions and 38 deletions

View File

@@ -82,7 +82,7 @@ liberator.Addressbook = function () //{{{
{
to = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor;
}
catch (e) { liberator.beep();}
catch (e) { liberator.beep(); }
if (!to)
return;
@@ -151,7 +151,7 @@ liberator.Addressbook = function () //{{{
return {
add: function(address, firstname, lastname, displayName)
add: function (address, firstname, lastname, displayName)
{
var directory = getDirectoryFromURI(kPersonalAddressbookURI);
var card = Components.classes["@mozilla.org/addressbook/cardproperty;1"]
@@ -169,7 +169,7 @@ liberator.Addressbook = function () //{{{
},
// TODO: add telephone number support
list: function(filter, newMail)
list: function (filter, newMail)
{
var addresses = [];
var dirs = abManager.directories;
@@ -179,7 +179,7 @@ liberator.Addressbook = function () //{{{
{
var addrbook = dirs.getNext().QueryInterface(Components.interfaces.nsIAbDirectory);
var cards = addrbook.childCards;
while(cards.hasMoreElements())
while (cards.hasMoreElements())
{
var card = cards.getNext().QueryInterface(Components.interfaces.nsIAbCard);
var mail = card.primaryEmail || "";
@@ -202,7 +202,7 @@ liberator.Addressbook = function () //{{{
{
// Now we have to create a new message
var args = new Object();
args.to = addresses.map(function(address)
args.to = addresses.map(function (address)
{
return "\"" + address[0].replace(/"/g, "") + " <" + address[1] + ">\"";
}).join(", ");

View File

@@ -181,7 +181,7 @@ liberator.Completion = function () //{{{
searchEngineSuggest: function (filter, engineAliases)
{
if (!filter)
return [0,null];
return [0, null];
var engineList = (engineAliases || liberator.options["suggestengines"]).split(",");
var responseType = "application/x-suggestions+json";
@@ -218,7 +218,7 @@ liberator.Completion = function () //{{{
// make sure we receive strings, otherwise a man-in-the-middle attack
// could return objects which toString() method could be called to
// execute untrusted code
if(typeof(item) != "string")
if (typeof item != "string")
return;
completions.push([(matches ? matches[1] : "") + item, engine.name + " suggestion"]);

View File

@@ -433,7 +433,8 @@ liberator.Hints = function () //{{{
}
// the current word matches same characters as the previous word
if (wcIdx > 0) {
if (wcIdx > 0)
{
var prevCharIdx = charIdx;
// now check if it matches additional characters
for (; wcIdx < word.length && charIdx < chars.length; wcIdx++, charIdx++)
@@ -458,7 +459,8 @@ liberator.Hints = function () //{{{
}
// the current word doesn't match same characters as the previous word, just
// try to match the next characters
else {
else
{
var prevCharIdx = charIdx;
for (var i = 0; i < word.length && charIdx < chars.length; i++, charIdx++)
{
@@ -466,7 +468,8 @@ liberator.Hints = function () //{{{
break;
}
if (prevCharIdx == charIdx) {
if (prevCharIdx == charIdx)
{
if (! allowWordOverleaping)
return false;
}
@@ -502,7 +505,8 @@ liberator.Hints = function () //{{{
return true;
}
for (; strIdx < strings.length; strIdx++) {
for (; strIdx < strings.length; strIdx++)
{
if (strings[strIdx].length != 0)
return false;
}

View File

@@ -70,7 +70,7 @@ liberator.IO = function () //{{{
});
// mkv[imperatorrc] or mkm[uttatorrc]
liberator.commands.add(["mk" + extname.substr(0,1) + "[" + extname.substr(1) + "rc]"],
liberator.commands.add(["mk" + extname.substr(0, 1) + "[" + extname.substr(1) + "rc]"],
"Write current key mappings and changed options to the config file",
function (args, special)
{

View File

@@ -626,7 +626,7 @@ liberator.Mail = function () //{{{
addresses = addresses.concat(mailargs.cc);
// TODO: is there a better way to check for validity?
if (addresses.some(function(recipient) { return !(/\S@\S+\.\S/.test(recipient)); }))
if (addresses.some(function (recipient) { return !(/\S@\S+\.\S/.test(recipient)); }))
{
liberator.echoerr("Exxx: Invalid e-mail address");
return;

View File

@@ -34,18 +34,18 @@ liberator.Tabs = function () //{{{
////////////////////// PRIVATE SECTION /////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
var tabmail;
var getBrowser = (function(){
var getBrowser = (function () {
if (liberator.config.hostApplication == "Thunderbird")
{
return function()
return function ()
{
if (!tabmail)
{
tabmail = document.getElementById('tabmail');
tabmail.__defineGetter__('mTabContainer',function(){ return this.tabContainer; });
tabmail.__defineGetter__('mTabs',function(){ return this.tabContainer.childNodes; });
tabmail.__defineGetter__('mCurrentTab',function(){ return this.tabContainer.selectedItem; });
tabmail.__defineGetter__('mStrip',function(){ return this.tabStrip; });
tabmail.__defineGetter__('mTabContainer', function () { return this.tabContainer; });
tabmail.__defineGetter__('mTabs', function () { return this.tabContainer.childNodes; });
tabmail.__defineGetter__('mCurrentTab', function () { return this.tabContainer.selectedItem; });
tabmail.__defineGetter__('mStrip', function () { return this.tabStrip; });
}
return tabmail;
};
@@ -605,7 +605,7 @@ liberator.Tabs = function () //{{{
liberator.beep();
};
}
return function() { return null; };
return function () { return null; };
})();
if (typeof count != "number" || count < 1)