mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-19 09:13:31 +02:00
Fix some minor function formatting faux pas.
This commit is contained in:
@@ -149,8 +149,10 @@ function Buffer() //{{{
|
|||||||
////////////////////// OPTIONS /////////////////////////////////////////////////
|
////////////////////// OPTIONS /////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
function getWebNav() {
|
function getWebNav()
|
||||||
function call(val, fn) {
|
{
|
||||||
|
function call(val, fn)
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return fn(val);
|
return fn(val);
|
||||||
@@ -182,7 +184,7 @@ function Buffer() //{{{
|
|||||||
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
|
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
|
||||||
getWebNav().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
|
getWebNav().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
|
||||||
}
|
}
|
||||||
catch (e) { liberator.reportError(e) }
|
catch (e) { liberator.reportError(e); }
|
||||||
},
|
},
|
||||||
completer: function (context) completion.charset(context),
|
completer: function (context) completion.charset(context),
|
||||||
validator: Option.validateCompleter
|
validator: Option.validateCompleter
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ CompletionContext.prototype = {
|
|||||||
let [k, v] = i;
|
let [k, v] = i;
|
||||||
let _k = "_" + k;
|
let _k = "_" + k;
|
||||||
if (typeof v == "string" && /^[.[]/.test(v))
|
if (typeof v == "string" && /^[.[]/.test(v))
|
||||||
v = eval("(function(i) i" + v + ")")
|
v = eval("(function (i) i" + v + ")")
|
||||||
if (typeof v == "function")
|
if (typeof v == "function")
|
||||||
res.__defineGetter__(k, function () _k in this ? this[_k] : (this[_k] = v(this.item)));
|
res.__defineGetter__(k, function () _k in this ? this[_k] : (this[_k] = v(this.item)));
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ function Events() //{{{
|
|||||||
////////////////////// MAPPINGS ////////////////////////////////////////////////
|
////////////////////// MAPPINGS ////////////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
liberator.registerObserver("load_mappings", function() {
|
liberator.registerObserver("load_mappings", function () {
|
||||||
mappings.add(modes.all,
|
mappings.add(modes.all,
|
||||||
["<Esc>", "<C-[>"], "Focus content",
|
["<Esc>", "<C-[>"], "Focus content",
|
||||||
function () { events.onEscape(); });
|
function () { events.onEscape(); });
|
||||||
@@ -872,9 +872,9 @@ function Events() //{{{
|
|||||||
yield match[0];
|
yield match[0];
|
||||||
},
|
},
|
||||||
|
|
||||||
canonKeys: function(keys)
|
canonKeys: function (keys)
|
||||||
{
|
{
|
||||||
var res = util.map(events.splitKeys(keys), function(key) {
|
var res = util.map(events.splitKeys(keys), function (key) {
|
||||||
let keyCode = 0;
|
let keyCode = 0;
|
||||||
|
|
||||||
if (key[0] == "<")
|
if (key[0] == "<")
|
||||||
|
|||||||
@@ -736,7 +736,8 @@ function IO() //{{{
|
|||||||
writeFile: function (file, buf, mode, perms, encoding)
|
writeFile: function (file, buf, mode, perms, encoding)
|
||||||
{
|
{
|
||||||
let ofstream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream);
|
let ofstream = Cc["@mozilla.org/network/file-output-stream;1"].createInstance(Ci.nsIFileOutputStream);
|
||||||
function getStream(defaultChar) {
|
function getStream(defaultChar)
|
||||||
|
{
|
||||||
let stream = Cc["@mozilla.org/intl/converter-output-stream;1"].createInstance(Ci.nsIConverterOutputStream);
|
let stream = Cc["@mozilla.org/intl/converter-output-stream;1"].createInstance(Ci.nsIConverterOutputStream);
|
||||||
stream.init(ofstream, encoding, 0, defaultChar);
|
stream.init(ofstream, encoding, 0, defaultChar);
|
||||||
return stream;
|
return stream;
|
||||||
|
|||||||
@@ -433,7 +433,8 @@ const util = { //{{{
|
|||||||
let elem = object;
|
let elem = object;
|
||||||
if (elem.nodeType == elem.TEXT_NODE)
|
if (elem.nodeType == elem.TEXT_NODE)
|
||||||
return elem.data;
|
return elem.data;
|
||||||
function namespaced(node) {
|
function namespaced(node)
|
||||||
|
{
|
||||||
var ns = NAMESPACES[node.namespaceURI];
|
var ns = NAMESPACES[node.namespaceURI];
|
||||||
if (ns)
|
if (ns)
|
||||||
return ns + ":" + node.localName;
|
return ns + ":" + node.localName;
|
||||||
|
|||||||
Reference in New Issue
Block a user