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

Source formatting fixes *yawn*.

This commit is contained in:
Doug Kearns
2009-04-30 22:09:08 +10:00
parent c65f88f8a2
commit 6b9564635a
8 changed files with 31 additions and 26 deletions

View File

@@ -145,14 +145,14 @@ function Buffer() //{{{
{
return fn(val);
}
catch(e)
catch (e)
{
return val
}
}
return [
function() getBrowser().webNavigation,
function(webNav) webNav.sessionHistory.QueryInterface(Ci.nsIWebNavigation)
function () getBrowser().webNavigation,
function (webNav) webNav.sessionHistory.QueryInterface(Ci.nsIWebNavigation)
].reduce(call, null);
}
@@ -161,8 +161,8 @@ function Buffer() //{{{
"string", "UTF-8",
{
scope: options.OPTION_SCOPE_LOCAL,
getter: function() getBrowser().docShell.QueryInterface(Ci.nsIDocCharset).charset,
setter: function(val)
getter: function () getBrowser().docShell.QueryInterface(Ci.nsIDocCharset).charset,
setter: function (val)
{
// Stolen from browser.jar/content/browser/browser.js, more or
// less.
@@ -174,7 +174,7 @@ function Buffer() //{{{
}
catch (e) { liberator.reportError(e) }
},
completer: function(context) completion.charset(context)
completer: function (context) completion.charset(context)
});
// FIXME: Most certainly belongs elsewhere.
@@ -256,7 +256,7 @@ function Buffer() //{{{
"Stop loading",
function ()
{
if(config.stop)
if (config.stop)
config.stop();
else
window.BrowserStop();

View File

@@ -1454,15 +1454,16 @@ function Completion() //{{{
});
},
charset: function(context) {
charset: function (context)
{
context.anchored = false;
context.generate = function() {
context.generate = function () {
let names = util.Array(
'more1 more2 more3 more4 more5 unicode'.split(' ').map(function(key)
'more1 more2 more3 more4 more5 unicode'.split(' ').map(function (key)
options.getPref('intl.charsetmenu.browser.' + key).split(', ')))
.flatten().uniq();
let bundle = document.getElementById('liberator-charset-bundle');
return names.map(function(name) [name, bundle.getString(name.toLowerCase() + '.title')]);
return names.map(function (name) [name, bundle.getString(name.toLowerCase() + '.title')]);
};
},

View File

@@ -140,7 +140,7 @@ const liberator = (function () //{{{
let classes = [v[1] for ([k, v] in Iterator(this.opts)) if (opts.indexOf(k) < 0)];
let css = classes.length ? classes.join(",") + "{ display: none; }" : "";
styles.addSheet(true, "taboptions", "chrome://*", css);
tabs.tabsBound = Array.some(opts, function(k) k in self.opts);
tabs.tabsBound = Array.some(opts, function (k) k in self.opts);
statusline.updateTabCount();
}
}

View File

@@ -410,7 +410,8 @@ const util = { //{{{
[XHTML, 'html'],
[XUL, 'xul'],
]);
if (object instanceof Node && !(object instanceof Document)) {
if (object instanceof Node && !(object instanceof Document))
{
let elem = object;
if (elem.nodeType == elem.TEXT_NODE)
return elem.data;
@@ -674,7 +675,7 @@ const util = { //{{{
util.Array = function Array(ary) {
var obj = {
__proto__: ary,
__iterator__: function() this.iteritems(),
__iterator__: function () this.iteritems(),
__noSuchMethod__: function (meth, args) {
let res = util.Array(util.Array[meth].apply(null, [this.__proto__].concat(args)))
if (res instanceof Array)

View File

@@ -102,7 +102,8 @@ const config = { //{{{
function () { buffer.viewSelectionSource(); }]*/
],
focusChange: function(win) {
focusChange: function (win)
{
// we switch to -- MESSAGE -- mode for Muttator, when the main HTML widget gets focus
if (win && win.document instanceof HTMLDocument || liberator.focus instanceof HTMLAnchorElement)
{

View File

@@ -141,7 +141,8 @@ const config = { //{{{
function () { SBSubscribe(); }]
],
focusChange: function() {
focusChange: function ()
{
// Switch to -- PLAYER -- mode for Songbird Media Player.
if (config.isPlayerWindow)
liberator.mode = modes.PLAYER;
@@ -173,7 +174,8 @@ const config = { //{{{
"library.js"
],
stop: function() {
stop: function ()
{
SBGetBrowser().mCurrentBrowser.stop();
},