mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 07:08:00 +01:00
whitespace fixes
This commit is contained in:
@@ -200,7 +200,7 @@ liberator.Buffer = function () //{{{
|
||||
|
||||
liberator.mappings.add(modes, ["<C-c>"],
|
||||
"Stop loading",
|
||||
function() { BrowserStop(); });
|
||||
function () { BrowserStop(); });
|
||||
|
||||
// scrolling
|
||||
liberator.mappings.add(modes, ["j", "<Down>", "<C-e>"],
|
||||
|
||||
@@ -445,8 +445,8 @@ liberator.Commands = function () //{{{
|
||||
// Idea: If v.commands.add() specifies args or opts in extraInfo, don't call the function
|
||||
// with args as a string, but already pass an object like:
|
||||
// args = { -option: value, -anotheroption: true, arguments: [] }
|
||||
getOption: function(opts, option, def) { return getOption(opts, option, def); },
|
||||
parseArgs: function(str, options) { return parseArgs(str, options); },
|
||||
getOption: function (opts, option, def) { return getOption(opts, option, def); },
|
||||
parseArgs: function (str, options) { return parseArgs(str, options); },
|
||||
|
||||
OPTION_ANY: 0, // can be given no argument or an argument of any type,
|
||||
// caller is responsible for parsing the return value
|
||||
|
||||
@@ -178,7 +178,7 @@ liberator.Completion = function () //{{{
|
||||
return [0, buildLongestCommonSubstring(mapped, filter)];
|
||||
},
|
||||
|
||||
searchEngineSuggest: function(filter, engineAliases)
|
||||
searchEngineSuggest: function (filter, engineAliases)
|
||||
{
|
||||
if (!filter)
|
||||
return [0,null];
|
||||
@@ -189,7 +189,7 @@ liberator.Completion = function () //{{{
|
||||
.getService(Components.interfaces.nsIBrowserSearchService);
|
||||
|
||||
var completions = [];
|
||||
engineList.forEach (function(name)
|
||||
engineList.forEach (function (name)
|
||||
{
|
||||
var query = filter;
|
||||
var queryURI;
|
||||
@@ -211,7 +211,7 @@ liberator.Completion = function () //{{{
|
||||
if (!results)
|
||||
return;
|
||||
|
||||
results.forEach(function(item)
|
||||
results.forEach(function (item)
|
||||
{
|
||||
completions.push([(matches ? matches[1] : "") + item, name + " suggestion"]);
|
||||
});
|
||||
@@ -407,7 +407,7 @@ liberator.Completion = function () //{{{
|
||||
{
|
||||
var prefs = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
var prefArray = prefs.getChildList("", {value: 0});
|
||||
var prefArray = prefs.getChildList("", { value: 0 });
|
||||
prefArray.sort();
|
||||
|
||||
if (filter.length > 0 && filter.lastIndexOf("=") == filter.length - 1)
|
||||
|
||||
@@ -408,7 +408,7 @@ liberator.Editor = function () //{{{
|
||||
if (pos >= 0)
|
||||
liberator.editor.moveToPosition(pos, true, liberator.mode == liberator.modes.VISUAL);
|
||||
},
|
||||
{ flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT});
|
||||
{ flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add([liberator.modes.TEXTAREA, liberator.modes.VISUAL],
|
||||
["F"], "Move to a charater on the current line before the cursor",
|
||||
@@ -418,7 +418,7 @@ liberator.Editor = function () //{{{
|
||||
if (pos >= 0)
|
||||
liberator.editor.moveToPosition(pos, false, liberator.mode == liberator.modes.VISUAL);
|
||||
},
|
||||
{ flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT});
|
||||
{ flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add([liberator.modes.TEXTAREA, liberator.modes.VISUAL],
|
||||
["t"], "Move before a character on the current line",
|
||||
@@ -428,7 +428,7 @@ liberator.Editor = function () //{{{
|
||||
if (pos >= 0)
|
||||
liberator.editor.moveToPosition(pos - 1, true, liberator.mode == liberator.modes.VISUAL);
|
||||
},
|
||||
{ flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT});
|
||||
{ flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add([liberator.modes.TEXTAREA, liberator.modes.VISUAL],
|
||||
["T"], "Move before a character on the current line, backwards",
|
||||
@@ -438,7 +438,7 @@ liberator.Editor = function () //{{{
|
||||
if (pos >= 0)
|
||||
liberator.editor.moveToPosition(pos + 1, false, liberator.mode == liberator.modes.VISUAL);
|
||||
},
|
||||
{ flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT});
|
||||
{ flags: liberator.Mappings.flags.ARGUMENT | liberator.Mappings.flags.COUNT });
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
////////////////////// COMMANDS ////////////////////////////////////////////////
|
||||
@@ -801,7 +801,7 @@ liberator.Editor = function () //{{{
|
||||
editor.selection.addRange(wholeDocRange);
|
||||
editor.selection.deleteFromDocument();
|
||||
editor.insertText(val);
|
||||
//setTimeout(function() {
|
||||
//setTimeout(function () {
|
||||
// document.getElementById("content-frame").contentDocument.designMode = "off";
|
||||
//}, 100);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ the provisions above, a recipient may use your version of this file under
|
||||
the terms of any one of the MPL, the GPL or the LGPL.
|
||||
}}} ***** END LICENSE BLOCK *****/
|
||||
|
||||
liberator.AutoCommands = function() //{{{
|
||||
liberator.AutoCommands = function () //{{{
|
||||
{
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
////////////////////// PRIVATE SECTION /////////////////////////////////////////
|
||||
@@ -503,7 +503,7 @@ liberator.Events = function () //{{{
|
||||
|
||||
// load all macros inside ~/.vimperator/macros/
|
||||
// setTimeout needed since liberator.io. is loaded after liberator.events.
|
||||
setTimeout (function() {
|
||||
setTimeout (function () {
|
||||
try
|
||||
{
|
||||
var files = liberator.io.readDirectory(liberator.io.getSpecialDirectory("macros"));
|
||||
@@ -959,7 +959,7 @@ liberator.Events = function () //{{{
|
||||
{
|
||||
dump("Compose editor got focus\n");
|
||||
liberator.modes.set(liberator.modes.INSERT, liberator.modes.TEXTAREA);
|
||||
//setTimeout(function(){liberator.editor.editWithExternalEditor();}, 100);
|
||||
//setTimeout(function (){ liberator.editor.editWithExternalEditor(); }, 100);
|
||||
win.blur();
|
||||
//liberator.editor.editWithExternalEditor();
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ liberator.Hints = function () //{{{
|
||||
}
|
||||
|
||||
doc.body.appendChild(fragment);
|
||||
docs.push({ doc: doc, start: start, end: hints.length - 1});
|
||||
docs.push({ doc: doc, start: start, end: hints.length - 1 });
|
||||
|
||||
// also generate hints for frames
|
||||
for (var i = 0; i < win.frames.length; i++)
|
||||
@@ -338,8 +338,8 @@ liberator.Hints = function () //{{{
|
||||
case "V": liberator.buffer.viewSource(loc, true); break;
|
||||
case "w": liberator.buffer.followLink(elem, liberator.NEW_WINDOW); break;
|
||||
case "W": liberator.commandline.open(":", "winopen " + loc, liberator.modes.EX); break;
|
||||
case "y": setTimeout(function(){liberator.util.copyToClipboard(loc, true)}, timeout + 50); break;
|
||||
case "Y": setTimeout(function(){liberator.util.copyToClipboard(elem.textContent || "", true)}, timeout + 50); break;
|
||||
case "y": setTimeout(function () { liberator.util.copyToClipboard(loc, true) }, timeout + 50); break;
|
||||
case "Y": setTimeout(function () { liberator.util.copyToClipboard(elem.textContent || "", true) }, timeout + 50); break;
|
||||
default:
|
||||
liberator.echoerr("INTERNAL ERROR: unknown submode: " + submode);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ const liberator = (function () //{{{
|
||||
var guioptions = liberator.config.guioptions || {};
|
||||
for (let option in guioptions)
|
||||
{
|
||||
guioptions[option].forEach( function(elem)
|
||||
guioptions[option].forEach(function (elem)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -385,7 +385,7 @@ const liberator = (function () //{{{
|
||||
var guioptions = liberator.config.guioptions || {};
|
||||
for (let option in guioptions)
|
||||
{
|
||||
guioptions[option].forEach( function(elem)
|
||||
guioptions[option].forEach(function (elem)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -612,10 +612,10 @@ const liberator = (function () //{{{
|
||||
has: function (feature)
|
||||
{
|
||||
var features = liberator.config.features || [];
|
||||
return features.some (function(feat) { return feat == feature; });
|
||||
return features.some (function (feat) { return feat == feature; });
|
||||
},
|
||||
|
||||
help: function(topic)
|
||||
help: function (topic)
|
||||
{
|
||||
var where = (liberator.options.newtab && (liberator.options.newtab == "all" || liberator.options.newtab.split(",").indexOf("help") != -1)) ?
|
||||
liberator.NEW_TAB : liberator.CURRENT_TAB;
|
||||
@@ -623,7 +623,7 @@ const liberator = (function () //{{{
|
||||
function jumpToTag(file, tag)
|
||||
{
|
||||
liberator.open("chrome://" + liberator.config.name.toLowerCase() + "/locale/" + file, where);
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
var elem = liberator.buffer.getElement('@class="tag" and text()="' + tag + '"');
|
||||
if (elem)
|
||||
window.content.scrollTo(0, elem.getBoundingClientRect().top - 10); // 10px context
|
||||
|
||||
@@ -38,15 +38,15 @@ liberator.Mail = function () //{{{
|
||||
var selectMessageReverse = false;
|
||||
|
||||
var folderListener = {
|
||||
OnItemAdded: function(parentItem, item) { },
|
||||
OnItemRemoved: function(parentItem, item) { },
|
||||
OnItemPropertyChanged: function(item, property, oldValue, newValue) { },
|
||||
OnItemIntPropertyChanged: function(item, property, oldValue, newValue) { },
|
||||
OnItemBoolPropertyChanged: function(item, property, oldValue, newValue) { },
|
||||
OnItemUnicharPropertyChanged: function(item, property, oldValue, newValue) { },
|
||||
OnItemPropertyFlagChanged: function(item, property, oldFlag, newFlag) { },
|
||||
OnItemAdded: function (parentItem, item) { },
|
||||
OnItemRemoved: function (parentItem, item) { },
|
||||
OnItemPropertyChanged: function (item, property, oldValue, newValue) { },
|
||||
OnItemIntPropertyChanged: function (item, property, oldValue, newValue) { },
|
||||
OnItemBoolPropertyChanged: function (item, property, oldValue, newValue) { },
|
||||
OnItemUnicharPropertyChanged: function (item, property, oldValue, newValue) { },
|
||||
OnItemPropertyFlagChanged: function (item, property, oldFlag, newFlag) { },
|
||||
|
||||
OnItemEvent: function(folder, event)
|
||||
OnItemEvent: function (folder, event)
|
||||
{
|
||||
var eventType = event.toString();
|
||||
if (eventType == "FolderLoaded")
|
||||
@@ -119,12 +119,12 @@ liberator.Mail = function () //{{{
|
||||
if (copy)
|
||||
{
|
||||
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
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -296,7 +296,7 @@ liberator.Mail = function () //{{{
|
||||
try
|
||||
{
|
||||
var author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
|
||||
liberator.mail.selectMessage(function(msg) { return msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0; }, true, true, false, count);
|
||||
liberator.mail.selectMessage(function (msg) { return msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0; }, true, true, false, count);
|
||||
}
|
||||
catch (e) { liberator.beep(); }
|
||||
},
|
||||
@@ -309,7 +309,7 @@ liberator.Mail = function () //{{{
|
||||
try
|
||||
{
|
||||
var author = gDBView.hdrForFirstSelectedMessage.mime2DecodedAuthor.toLowerCase();
|
||||
liberator.mail.selectMessage(function(msg) { return msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0; }, true, true, true, count);
|
||||
liberator.mail.selectMessage(function (msg) { return msg.mime2DecodedAuthor.toLowerCase().indexOf(author) == 0; }, true, true, true, count);
|
||||
}
|
||||
catch (e) { liberator.beep(); }
|
||||
},
|
||||
@@ -415,22 +415,22 @@ liberator.Mail = function () //{{{
|
||||
|
||||
liberator.mappings.add(modes, ["]s"],
|
||||
"Select next starred message",
|
||||
function (count) { liberator.mail.selectMessage(function(msg) { return msg.isFlagged; }, true, true, false, count); },
|
||||
function (count) { liberator.mail.selectMessage(function (msg) { return msg.isFlagged; }, true, true, false, count); },
|
||||
{ flags: liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add(modes, ["[s"],
|
||||
"Select previous starred message",
|
||||
function (count) { liberator.mail.selectMessage(function(msg) { return msg.isFlagged; }, true, true, true, count); },
|
||||
function (count) { liberator.mail.selectMessage(function (msg) { return msg.isFlagged; }, true, true, true, count); },
|
||||
{ flags: liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add(modes, ["]a"],
|
||||
"Select next message with an attachment",
|
||||
function (count) { liberator.mail.selectMessage(function(msg) { return gDBView.db.HasAttachments(msg.messageKey); }, true, true, false, count); },
|
||||
function (count) { liberator.mail.selectMessage(function (msg) { return gDBView.db.HasAttachments(msg.messageKey); }, true, true, false, count); },
|
||||
{ flags: liberator.Mappings.flags.COUNT });
|
||||
|
||||
liberator.mappings.add(modes, ["[a"],
|
||||
"Select previous message with an attachment",
|
||||
function (count) { liberator.mail.selectMessage(function(msg) { return gDBView.db.HasAttachments(msg.messageKey); }, true, true, true, count); },
|
||||
function (count) { liberator.mail.selectMessage(function (msg) { return gDBView.db.HasAttachments(msg.messageKey); }, true, true, true, count); },
|
||||
{ flags: liberator.Mappings.flags.COUNT });
|
||||
|
||||
// FOLDER SWITCHING
|
||||
@@ -587,7 +587,7 @@ liberator.Mail = function () //{{{
|
||||
"Mark all messages as read",
|
||||
function ()
|
||||
{
|
||||
liberator.mail.getFolders("", false).forEach(function(folder) {
|
||||
liberator.mail.getFolders("", false).forEach(function (folder) {
|
||||
folder.markAllMessagesRead();
|
||||
});
|
||||
});
|
||||
@@ -667,7 +667,7 @@ liberator.Mail = function () //{{{
|
||||
QueryInterface(Components.interfaces.nsIMsgFolder);
|
||||
},
|
||||
|
||||
getFolders: function(filter, includeServers, includeMsgFolders)
|
||||
getFolders: function (filter, includeServers, includeMsgFolders)
|
||||
{
|
||||
var folders = [];
|
||||
if (!filter)
|
||||
@@ -695,15 +695,15 @@ liberator.Mail = function () //{{{
|
||||
return folders;
|
||||
},
|
||||
|
||||
getNewMessages: function(currentAccountOnly)
|
||||
getNewMessages: function (currentAccountOnly)
|
||||
{
|
||||
var accounts = currentAccountOnly ? [this.currentAccount]
|
||||
: this.getFolders("", true, false);
|
||||
|
||||
accounts.forEach( function(account) { account.getNewMessages(msgWindow, null); });
|
||||
accounts.forEach(function (account) { account.getNewMessages(msgWindow, null); });
|
||||
},
|
||||
|
||||
getStatistics: function(currentAccountOnly)
|
||||
getStatistics: function (currentAccountOnly)
|
||||
{
|
||||
var accounts = currentAccountOnly ? [this.currentAccount]
|
||||
: this.getFolders("", true, false);
|
||||
@@ -720,7 +720,7 @@ liberator.Mail = function () //{{{
|
||||
return { numUnread: unreadCount, numTotal: totalCount, numNew: newCount }
|
||||
},
|
||||
|
||||
collapseThread: function()
|
||||
collapseThread: function ()
|
||||
{
|
||||
var tree = GetThreadTree();
|
||||
if (tree)
|
||||
@@ -736,7 +736,7 @@ liberator.Mail = function () //{{{
|
||||
return false;
|
||||
},
|
||||
|
||||
expandThread: function()
|
||||
expandThread: function ()
|
||||
{
|
||||
var tree = GetThreadTree();
|
||||
if (tree)
|
||||
@@ -755,7 +755,7 @@ liberator.Mail = function () //{{{
|
||||
* @param openThreads: should we open closed threads?
|
||||
* @param reverse: change direction of searching
|
||||
*/
|
||||
selectMessage: function(validatorFunc, canWrap, openThreads, reverse, count)
|
||||
selectMessage: function (validatorFunc, canWrap, openThreads, reverse, count)
|
||||
{
|
||||
function closedThread(index)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ liberator.Map = function (modes, cmds, description, action, extraInfo) //{{{
|
||||
|
||||
this.modes = modes;
|
||||
// only store keysyms with uppercase modifier strings
|
||||
this.names = cmds.map(function (cmd) { return cmd.replace(/[casm]-/g, function (name) { return name.toUpperCase(); });});
|
||||
this.names = cmds.map(function (cmd) { return cmd.replace(/[casm]-/g, function (name) { return name.toUpperCase(); }); });
|
||||
this.action = action;
|
||||
|
||||
this.flags = extraInfo.flags || 0;
|
||||
|
||||
@@ -46,48 +46,48 @@ liberator.config = {
|
||||
|
||||
dialogs: [
|
||||
["about", "About Thunderbird", //XXX: Shredder ?
|
||||
function() { openAboutDialog(); }],
|
||||
function () { openAboutDialog(); }],
|
||||
["addons", "Manage Add-ons",
|
||||
function() { openAddonsMgr(); }],
|
||||
function () { openAddonsMgr(); }],
|
||||
["checkupdates", "Check for updates",
|
||||
function() { checkForUpdates(); }],
|
||||
function () { checkForUpdates(); }],
|
||||
/*["cleardata", "Clear private data",
|
||||
function() { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }],*/
|
||||
function () { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }],*/
|
||||
["console", "JavaScript console",
|
||||
function() { toJavaScriptConsole(); }],
|
||||
function () { toJavaScriptConsole(); }],
|
||||
/*["customizetoolbar", "Customize the Toolbar",
|
||||
function() { BrowserCustomizeToolbar(); }],*/
|
||||
function () { BrowserCustomizeToolbar(); }],*/
|
||||
["dominspector", "DOM Inspector",
|
||||
function() { inspectDOMDocument(content.document); }],
|
||||
function () { inspectDOMDocument(content.document); }],
|
||||
["downloads", "Manage Downloads",
|
||||
function() { toOpenWindowByType('Download:Manager', 'chrome://mozapps/content/downloads/downloads.xul', 'chrome,dialog=no,resizable'); }],
|
||||
function () { toOpenWindowByType('Download:Manager', 'chrome://mozapps/content/downloads/downloads.xul', 'chrome,dialog=no,resizable'); }],
|
||||
/*["import", "Import Preferences, Bookmarks, History, etc. from other browsers",
|
||||
function() { BrowserImport(); }],
|
||||
function () { BrowserImport(); }],
|
||||
["openfile", "Open the file selector dialog",
|
||||
function() { BrowserOpenFileWindow(); }],
|
||||
function () { BrowserOpenFileWindow(); }],
|
||||
["pageinfo", "Show information about the current page",
|
||||
function() { BrowserPageInfo(); }],
|
||||
function () { BrowserPageInfo(); }],
|
||||
["pagesource", "View page source",
|
||||
function() { BrowserViewSourceOfDocument(content.document); }],
|
||||
function () { BrowserViewSourceOfDocument(content.document); }],
|
||||
["preferences", "Show Firefox preferences dialog",
|
||||
function() { openPreferences(); }],
|
||||
function () { openPreferences(); }],
|
||||
["printpreview", "Preview the page before printing",
|
||||
function() { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],*/
|
||||
function () { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],*/
|
||||
["printsetup", "Setup the page size and orientation before printing",
|
||||
function() { PrintUtils.showPageSetup(); }],
|
||||
function () { PrintUtils.showPageSetup(); }],
|
||||
["print", "Show print dialog",
|
||||
function() { PrintUtils.print(); }],
|
||||
function () { PrintUtils.print(); }],
|
||||
["saveframe", "Save frame to disk",
|
||||
function() { saveFrameDocument(); }],
|
||||
function () { saveFrameDocument(); }],
|
||||
["savepage", "Save page to disk",
|
||||
function() { saveDocument(window.content.document); }],
|
||||
function () { saveDocument(window.content.document); }],
|
||||
/*["searchengines", "Manage installed search engines",
|
||||
function() { openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
function () { openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
["selectionsource", "View selection source",
|
||||
function() { liberator.buffer.viewSelectionSource(); }]*/
|
||||
function () { liberator.buffer.viewSelectionSource(); }]*/
|
||||
],
|
||||
|
||||
init: function()
|
||||
init: function ()
|
||||
{
|
||||
liberator.mappings.add([liberator.modes.NORMAL],
|
||||
["o"], "Open a message",
|
||||
@@ -112,20 +112,20 @@ liberator.config = {
|
||||
|
||||
if (this.isComposeWindow)
|
||||
{
|
||||
/*setTimeout(function() {
|
||||
/*setTimeout(function () {
|
||||
document.getElementById("content-frame").contentDocument.designMode = "off";
|
||||
document.getElementById("content-frame").focus();
|
||||
}, 500);*/
|
||||
//document.getElementById("content-frame").contentWindow.addEventListener("load", function() {
|
||||
/*window.addEventListener("load", function() {
|
||||
//document.getElementById("content-frame").contentWindow.addEventListener("load", function () {
|
||||
/*window.addEventListener("load", function () {
|
||||
alert("load");
|
||||
if (! liberator.editor.editWithExternalEditor())
|
||||
liberator.echoerr("Editing with external editor failed. Be sure to :set editor correctly");
|
||||
}, true);
|
||||
document.getElementById("content-frame").contentDocument.addEventListener("load", function() {
|
||||
document.getElementById("content-frame").contentDocument.addEventListener("load", function () {
|
||||
alert("load1");
|
||||
}, true);*/
|
||||
/*document.getElementById("content-frame").addEventListener("DOMContentLoaded", function() {
|
||||
/*document.getElementById("content-frame").addEventListener("DOMContentLoaded", function () {
|
||||
alert("load2");
|
||||
}, true);*/
|
||||
}
|
||||
|
||||
@@ -684,7 +684,7 @@ liberator.Options = function () //{{{
|
||||
if (!filter)
|
||||
filter = "";
|
||||
|
||||
var prefArray = prefService.getChildList("", {value: 0});
|
||||
var prefArray = prefService.getChildList("", { value: 0 });
|
||||
prefArray.sort();
|
||||
var list = ":" + liberator.util.escapeHTML(liberator.commandline.getCommand()) + "<br/>" +
|
||||
"<table><tr align=\"left\" class=\"hl-Title\"><th>--- " + liberator.config.hostApplication +
|
||||
|
||||
@@ -92,7 +92,7 @@ liberator.Tabs = function () //{{{
|
||||
"Define which commands should output in a new tab by default",
|
||||
"stringlist", "",
|
||||
{
|
||||
validator: function(value)
|
||||
validator: function (value)
|
||||
{
|
||||
return value == "all" || value.split(",").every(function (item) { return /^(addons|downloads|help|javascript|prefs|)$/.test(item); });
|
||||
}
|
||||
@@ -639,7 +639,7 @@ liberator.Tabs = function () //{{{
|
||||
|
||||
// "buffer" is a string which matches the URL or title of a buffer, if it
|
||||
// is null, the last used string is used again
|
||||
switchTo: function(buffer, allowNonUnique, count, reverse)
|
||||
switchTo: function (buffer, allowNonUnique, count, reverse)
|
||||
{
|
||||
if (buffer == "")
|
||||
{
|
||||
|
||||
@@ -247,7 +247,7 @@ liberator.util = { //{{{
|
||||
},
|
||||
|
||||
// same as Firefox's readFromClipboard function, but needed for apps like Thunderbird
|
||||
readFromClipboard: function()
|
||||
readFromClipboard: function ()
|
||||
{
|
||||
var url;
|
||||
try
|
||||
|
||||
@@ -37,56 +37,56 @@ liberator.config = { //{{{
|
||||
|
||||
dialogs: [
|
||||
["about", "About Firefox",
|
||||
function() { openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
function () { openDialog("chrome://browser/content/aboutDialog.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
["addbookmark", "Add bookmark for the current page",
|
||||
function() { PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksRootId); }],
|
||||
function () { PlacesCommandHook.bookmarkCurrentPage(true, PlacesUtils.bookmarksRootId); }],
|
||||
["addons", "Manage Add-ons",
|
||||
function() { BrowserOpenAddonsMgr(); }],
|
||||
function () { BrowserOpenAddonsMgr(); }],
|
||||
["bookmarks", "List your bookmarks",
|
||||
function() { openDialog("chrome://browser/content/bookmarks/bookmarksPanel.xul", "Bookmarks", "dialog,centerscreen,width=600,height=600"); }],
|
||||
function () { openDialog("chrome://browser/content/bookmarks/bookmarksPanel.xul", "Bookmarks", "dialog,centerscreen,width=600,height=600"); }],
|
||||
["checkupdates", "Check for updates",
|
||||
function() { checkForUpdates(); }],
|
||||
function () { checkForUpdates(); }],
|
||||
["cleardata", "Clear private data",
|
||||
function() { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }],
|
||||
function () { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }],
|
||||
["console", "JavaScript console",
|
||||
function() { toJavaScriptConsole(); }],
|
||||
function () { toJavaScriptConsole(); }],
|
||||
["customizetoolbar", "Customize the Toolbar",
|
||||
function() { BrowserCustomizeToolbar(); }],
|
||||
function () { BrowserCustomizeToolbar(); }],
|
||||
["dominspector", "DOM Inspector",
|
||||
function() { inspectDOMDocument(content.document); }],
|
||||
function () { inspectDOMDocument(content.document); }],
|
||||
["downloads", "Manage Downloads",
|
||||
function() { toOpenWindowByType('Download:Manager', 'chrome://mozapps/content/downloads/downloads.xul', 'chrome,dialog=no,resizable'); }],
|
||||
function () { toOpenWindowByType('Download:Manager', 'chrome://mozapps/content/downloads/downloads.xul', 'chrome,dialog=no,resizable'); }],
|
||||
["history", "List your history",
|
||||
function() { openDialog("chrome://browser/content/history/history-panel.xul", "History", "dialog,centerscreen,width=600,height=600"); }],
|
||||
function () { openDialog("chrome://browser/content/history/history-panel.xul", "History", "dialog,centerscreen,width=600,height=600"); }],
|
||||
["import", "Import Preferences, Bookmarks, History, etc. from other browsers",
|
||||
function() { BrowserImport(); }],
|
||||
function () { BrowserImport(); }],
|
||||
["openfile", "Open the file selector dialog",
|
||||
function() { BrowserOpenFileWindow(); }],
|
||||
function () { BrowserOpenFileWindow(); }],
|
||||
["pageinfo", "Show information about the current page",
|
||||
function() { BrowserPageInfo(); }],
|
||||
function () { BrowserPageInfo(); }],
|
||||
["pagesource", "View page source",
|
||||
function() { BrowserViewSourceOfDocument(content.document); }],
|
||||
function () { BrowserViewSourceOfDocument(content.document); }],
|
||||
["places", "Places Organizer: Manage your bookmarks and history",
|
||||
function() { PlacesCommandHook.showPlacesOrganizer(ORGANIZER_ROOT_BOOKMARKS); }],
|
||||
function () { PlacesCommandHook.showPlacesOrganizer(ORGANIZER_ROOT_BOOKMARKS); }],
|
||||
["preferences", "Show Firefox preferences dialog",
|
||||
function() { openPreferences(); }],
|
||||
function () { openPreferences(); }],
|
||||
["printpreview", "Preview the page before printing",
|
||||
function() { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],
|
||||
function () { PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview); }],
|
||||
["printsetup", "Setup the page size and orientation before printing",
|
||||
function() { PrintUtils.showPageSetup(); }],
|
||||
function () { PrintUtils.showPageSetup(); }],
|
||||
["print", "Show print dialog",
|
||||
function() { PrintUtils.print(); }],
|
||||
function () { PrintUtils.print(); }],
|
||||
["saveframe", "Save frame to disk",
|
||||
function() { saveFrameDocument(); }],
|
||||
function () { saveFrameDocument(); }],
|
||||
["savepage", "Save page to disk",
|
||||
function() { saveDocument(window.content.document); }],
|
||||
function () { saveDocument(window.content.document); }],
|
||||
["searchengines", "Manage installed search engines",
|
||||
function() { openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
function () { openDialog("chrome://browser/content/search/engineManager.xul", "_blank", "chrome,dialog,modal,centerscreen"); }],
|
||||
["selectionsource", "View selection source",
|
||||
function() { liberator.buffer.viewSelectionSource(); }]
|
||||
function () { liberator.buffer.viewSelectionSource(); }]
|
||||
],
|
||||
|
||||
init: function()
|
||||
init: function ()
|
||||
{
|
||||
function incrementURL(count)
|
||||
{
|
||||
@@ -152,7 +152,7 @@ liberator.config = { //{{{
|
||||
|
||||
liberator.mappings.add([liberator.modes.NORMAL], ["gh"],
|
||||
"Open homepage",
|
||||
function() { BrowserHome(); });
|
||||
function () { BrowserHome(); });
|
||||
|
||||
liberator.mappings.add([liberator.modes.NORMAL], ["gH"],
|
||||
"Open homepage in a new tab",
|
||||
|
||||
Reference in New Issue
Block a user