mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 07:58:00 +01:00
whitespace fixes
This commit is contained in:
@@ -484,8 +484,8 @@ liberator.History = function () //{{{
|
|||||||
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
const historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"]
|
const historyService = Components.classes["@mozilla.org/browser/nav-history-service;1"]
|
||||||
.getService(Components.interfaces.nsINavHistoryService);
|
.getService(Components.interfaces.nsINavHistoryService);
|
||||||
|
|
||||||
var history = null;
|
var history = null;
|
||||||
|
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ liberator.Buffer = function () //{{{
|
|||||||
|
|
||||||
liberator.mappings.add(modes, ["gg", "<Home>"],
|
liberator.mappings.add(modes, ["gg", "<Home>"],
|
||||||
"Goto the top of the document",
|
"Goto the top of the document",
|
||||||
function (count) { liberator.buffer.scrollToPercentile(count > 0 ? count : 0); },
|
function (count) { liberator.buffer.scrollToPercentile(count > 0 ? count : 0); },
|
||||||
{ flags: liberator.Mappings.flags.COUNT });
|
{ flags: liberator.Mappings.flags.COUNT });
|
||||||
|
|
||||||
liberator.mappings.add(modes, ["G", "<End>"],
|
liberator.mappings.add(modes, ["G", "<End>"],
|
||||||
@@ -671,7 +671,7 @@ liberator.Buffer = function () //{{{
|
|||||||
saveLink: function (elem, skipPrompt)
|
saveLink: function (elem, skipPrompt)
|
||||||
{
|
{
|
||||||
var doc = elem.ownerDocument;
|
var doc = elem.ownerDocument;
|
||||||
var url = makeURLAbsolute(elem.baseURI, elem.href);
|
var url = makeURLAbsolute(elem.baseURI, elem.href);
|
||||||
var text = elem.textContent;
|
var text = elem.textContent;
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -1084,7 +1084,7 @@ liberator.Buffer = function () //{{{
|
|||||||
}
|
}
|
||||||
|
|
||||||
pageGeneral.push(["Mime-Type", content.document.contentType]);
|
pageGeneral.push(["Mime-Type", content.document.contentType]);
|
||||||
pageGeneral.push(["Encoding", content.document.characterSet]);
|
pageGeneral.push(["Encoding", content.document.characterSet]);
|
||||||
pageGeneral.push(["Compatibility", content.document.compatMode == "BackCompat" ? "Quirks Mode" : "Full/Almost Standards Mode"]);
|
pageGeneral.push(["Compatibility", content.document.compatMode == "BackCompat" ? "Quirks Mode" : "Full/Almost Standards Mode"]);
|
||||||
if (lastModVerbose)
|
if (lastModVerbose)
|
||||||
pageGeneral.push(["Last Modified", lastModVerbose]);
|
pageGeneral.push(["Last Modified", lastModVerbose]);
|
||||||
|
|||||||
@@ -503,7 +503,7 @@ liberator.Editor = function () //{{{
|
|||||||
var tempStr1 = elt.value.substring(0, rangeStart);
|
var tempStr1 = elt.value.substring(0, rangeStart);
|
||||||
var tempStr2 = liberator.util.readFromClipboard();
|
var tempStr2 = liberator.util.readFromClipboard();
|
||||||
var tempStr3 = elt.value.substring(rangeEnd);
|
var tempStr3 = elt.value.substring(rangeEnd);
|
||||||
elt.value = tempStr1 + tempStr2 + tempStr3;
|
elt.value = tempStr1 + tempStr2 + tempStr3;
|
||||||
elt.selectionStart = rangeStart + tempStr2.length;
|
elt.selectionStart = rangeStart + tempStr2.length;
|
||||||
elt.selectionEnd = elt.selectionStart;
|
elt.selectionEnd = elt.selectionStart;
|
||||||
}
|
}
|
||||||
@@ -1012,7 +1012,7 @@ liberator.Editor = function () //{{{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // two abbrev's exists ( 'i' or 'c' (filter as well))
|
else // two abbrev's exists ( 'i' or 'c' (filter as well))
|
||||||
{
|
{
|
||||||
if (abbrev[lhs][0][0] == "c" && filter == "c")
|
if (abbrev[lhs][0][0] == "c" && filter == "c")
|
||||||
abbrev[lhs][0] = abbrev[lhs][1];
|
abbrev[lhs][0] = abbrev[lhs][1];
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ liberator.AutoCommands = function () //{{{
|
|||||||
{
|
{
|
||||||
for (var item in autoCommands)
|
for (var item in autoCommands)
|
||||||
for (var i = 0; i < autoCommands[item].length; i++)
|
for (var i = 0; i < autoCommands[item].length; i++)
|
||||||
yield item + " " + autoCommands[item][i][0] + " " + autoCommands[item][i][1];
|
yield item + " " + autoCommands[item][i][0] + " " + autoCommands[item][i][1];
|
||||||
throw StopIteration;
|
throw StopIteration;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ liberator.AutoCommands = function () //{{{
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// (?: ) means don't store; (....)? <-> exclamation marks makes the group optional
|
// (?: ) means don't store; (....)? <-> exclamation marks makes the group optional
|
||||||
var [all, asterix, auEvent, regex, cmds] = args.match(/^(\*)?(?:\s+)?(\S+)(?:\s+)?(\S+)?(?:\s+)?(.+)?$/);
|
var [all, asterix, auEvent, regex, cmds] = args.match(/^(\*)?(?:\s+)?(\S+)(?:\s+)?(\S+)?(?:\s+)?(.+)?$/);
|
||||||
|
|
||||||
if (cmds)
|
if (cmds)
|
||||||
{
|
{
|
||||||
@@ -238,17 +238,17 @@ liberator.Events = function () //{{{
|
|||||||
var tabcontainer = getBrowser().mTabContainer;
|
var tabcontainer = getBrowser().mTabContainer;
|
||||||
if (tabcontainer) // not every VIM-like extension has a tab container
|
if (tabcontainer) // not every VIM-like extension has a tab container
|
||||||
{
|
{
|
||||||
tabcontainer.addEventListener("TabMove", function (event)
|
tabcontainer.addEventListener("TabMove", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
liberator.buffer.updateBufferList();
|
||||||
}, false);
|
}, false);
|
||||||
tabcontainer.addEventListener("TabOpen", function (event)
|
tabcontainer.addEventListener("TabOpen", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
liberator.buffer.updateBufferList();
|
||||||
}, false);
|
}, false);
|
||||||
tabcontainer.addEventListener("TabClose", function (event)
|
tabcontainer.addEventListener("TabClose", function (event)
|
||||||
{
|
{
|
||||||
liberator.statusline.updateTabCount();
|
liberator.statusline.updateTabCount();
|
||||||
liberator.buffer.updateBufferList();
|
liberator.buffer.updateBufferList();
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ lookup:
|
|||||||
var extensions = environmentService.get("PATHEXT").split(";");
|
var extensions = environmentService.get("PATHEXT").split(";");
|
||||||
for (let j = 0; j < extensions.length; j++)
|
for (let j = 0; j < extensions.length; j++)
|
||||||
{
|
{
|
||||||
path = dirs[i] + "\\" + program + extensions[j];
|
path = dirs[i] + "\\" + program + extensions[j];
|
||||||
file.initWithPath(path);
|
file.initWithPath(path);
|
||||||
if (file.exists())
|
if (file.exists())
|
||||||
break lookup;
|
break lookup;
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ const liberator = (function () //{{{
|
|||||||
|
|
||||||
triggerCallback: function (type, mode, data)
|
triggerCallback: function (type, mode, data)
|
||||||
{
|
{
|
||||||
// dump("type: " + type + " mode: " + mode + "data: " + data + "\n");
|
// dump("type: " + type + " mode: " + mode + "data: " + data + "\n");
|
||||||
for (var i in callbacks)
|
for (var i in callbacks)
|
||||||
{
|
{
|
||||||
var [thistype, thismode, thisfunc] = callbacks[i];
|
var [thistype, thismode, thisfunc] = callbacks[i];
|
||||||
@@ -698,7 +698,7 @@ const liberator = (function () //{{{
|
|||||||
else if (!where || !liberator.has("tabs"))
|
else if (!where || !liberator.has("tabs"))
|
||||||
where = liberator.CURRENT_TAB;
|
where = liberator.CURRENT_TAB;
|
||||||
|
|
||||||
var url = typeof urls[0] == "string" ? urls[0] : urls[0][0];
|
var url = typeof urls[0] == "string" ? urls[0] : urls[0][0];
|
||||||
var postdata = typeof urls[0] == "string" ? null : urls[0][1];
|
var postdata = typeof urls[0] == "string" ? null : urls[0][1];
|
||||||
var whichwindow = window;
|
var whichwindow = window;
|
||||||
|
|
||||||
@@ -738,7 +738,7 @@ const liberator = (function () //{{{
|
|||||||
// all other URLs are always loaded in background
|
// all other URLs are always loaded in background
|
||||||
for (var i = 1; i < urls.length; i++)
|
for (var i = 1; i < urls.length; i++)
|
||||||
{
|
{
|
||||||
url = typeof urls[i] == "string" ? urls[i] : urls[i][0];
|
url = typeof urls[i] == "string" ? urls[i] : urls[i][0];
|
||||||
postdata = typeof urls[i] == "string" ? null : urls[i][1];
|
postdata = typeof urls[i] == "string" ? null : urls[i][1];
|
||||||
whichwindow.getBrowser().addTab(url, null, null, postdata);
|
whichwindow.getBrowser().addTab(url, null, null, postdata);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,12 +119,12 @@ liberator.Mail = function () //{{{
|
|||||||
if (copy)
|
if (copy)
|
||||||
{
|
{
|
||||||
MsgCopyMessage(folders[0].URI);
|
MsgCopyMessage(folders[0].URI);
|
||||||
setTimeout(function () { liberator.echo(count + " message(s) copied to " + folders[0].prettyName); }, 100);
|
setTimeout(function () { liberator.echo(count + " message(s) copied to " + folders[0].prettyName); }, 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MsgMoveMessage(folders[0].URI);
|
MsgMoveMessage(folders[0].URI);
|
||||||
setTimeout(function () { liberator.echo(count + " message(s) moved to " + folders[0].prettyName); }, 100);
|
setTimeout(function () { liberator.echo(count + " message(s) moved to " + folders[0].prettyName); }, 100);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -879,7 +879,7 @@ liberator.Mail = function () //{{{
|
|||||||
var thread = gDBView.db.GetThreadContainingMsgHdr(msg);
|
var thread = gDBView.db.GetThreadContainingMsgHdr(msg);
|
||||||
var originalCount = count;
|
var originalCount = count;
|
||||||
|
|
||||||
for (let j = (i == gDBView.selection.currentIndex && !reverse) ? 1 : (reverse ? thread.numChildren - 1 : 0);
|
for (let j = (i == gDBView.selection.currentIndex && !reverse) ? 1 : (reverse ? thread.numChildren - 1 : 0);
|
||||||
reverse ? (j >= 0) : (j < thread.numChildren);
|
reverse ? (j >= 0) : (j < thread.numChildren);
|
||||||
reverse ? j-- : j++)
|
reverse ? j-- : j++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user