1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 12:44:13 +01:00

Fix tab number updates in FF36. Closes issue 300.

This commit is contained in:
Kris Maglione
2011-01-26 16:22:29 -05:00
parent a6fe97b787
commit 218562e21b
48 changed files with 498 additions and 8666 deletions

View File

@@ -1219,6 +1219,15 @@ update(iter, {
func.call(self, val);
},
indexOf: function indexOf(iter, elem) {
let i = 0;
for (let item in iter) {
if (item == elem)
return i;
i++;
}
},
/**
* Returns the array that results from applying *func* to each property of
* *obj*.

View File

@@ -613,6 +613,9 @@ var ConfigBase = Class("ConfigBase", {
HelpString[delim]::before content: attr(delim);
HelpString[delim]::after content: attr(delim);
HelpNews position: relative;
HelpNewsOld opacity: .7;
HelpNewsTag position: absolute; left: 100%; padding-left: 1em; color: #527BBD; opacity: .6; white-space: pre;
HelpHead;html|h1,html|h2,html|h3,html|h4;dactyl://help/* {
font-weight: bold;

View File

@@ -174,13 +174,13 @@ var RangeFinder = Module("rangefinder", {
description: "Forward Find mode, active when typing search input",
bases: [modes.FIND],
input: true
}, { history: "search" });
});
modes.addMode("FIND_BACKWARD", {
extended: true,
description: "Backward Find mode, active when typing search input",
bases: [modes.FIND],
input: true
}, { history: "search" });
});
},
commands: function (dactyl, modules, window) {
const { commands, rangefinder } = modules;

View File

@@ -185,8 +185,10 @@ var IO = Module("io", {
else if (/\.css$/.test(filename))
styles.registerSheet(uri.spec, false, true);
else {
if (!(file.path in plugins))
plugins[file.path] = modules.newContext(modules.userContext);
modules.commands.execute(file.read(), null, silent || "loud", null,
{ file: file.path, line: 1 });
{ file: file.path, line: 1, context: plugins[file.path] });
}
if (this._scriptNames.indexOf(file.path) == -1)

View File

@@ -478,7 +478,7 @@ var JavaScript = Module("javascript", {
if (obj.length) {
let func = obj[0][0][funcName];
if (callable(func)) {
let [, prefix, args] = /^(function .*?)\((.*)?\)/.exec(Function.prototype.toString.call(func));
let [, prefix, args] = /^(function .*?)\((.*?)\)/.exec(Function.prototype.toString.call(func));
let n = this._get(i).comma.length;
args = template.map(Iterator(args.split(", ")),
function ([i, arg]) <span highlight={i == n ? "Filter" : ""}>{arg}</span>,

View File

@@ -1200,7 +1200,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
}
if (post)
return [url, elems.join('&'), charset, elems];
return [url + "?" + elems.join('&'), null, charset];
return [url + "?" + elems.join('&'), null, charset, elems];
},
/**
@@ -1270,8 +1270,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
if (tokens)
expr = String.replace(expr, /(\(?P)?<(\w+)>/g, function (m, n1, n2) !n1 && set.has(tokens, n2) ? tokens[n2].dactylSource || tokens[n2].source || tokens[n2] : m);
expr = String.replace(expr, /\/\/[^\n]*|\/\*[^]*?\*\//gm, "")
.replace(/\s+/g, "");
expr = String.replace(expr, /(\\.)|\/\/[^\n]*|\/\*[^]*?\*\/|\s+/gm, function (m, m1) m1 || "");
if (/\(\?P</.test(expr)) {
var source = expr;