mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 08:07:59 +01:00
Remove beforeunload handler.
This commit is contained in:
@@ -290,7 +290,6 @@ var CommandWidgets = Class("CommandWidgets", {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
multilineOutput: Class.Memoize(function () this._whenReady("dactyl-multiline-output", function (elem) {
|
multilineOutput: Class.Memoize(function () this._whenReady("dactyl-multiline-output", function (elem) {
|
||||||
elem.contentWindow.addEventListener("beforeunload", function (event) { event.preventDefault(); }, true);
|
|
||||||
highlight.highlightNode(elem.contentDocument.body, "MOW");
|
highlight.highlightNode(elem.contentDocument.body, "MOW");
|
||||||
}), true),
|
}), true),
|
||||||
|
|
||||||
|
|||||||
@@ -381,13 +381,23 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
if (idx) {
|
if (idx) {
|
||||||
idx = Number(idx) - 1;
|
idx = Number(idx) - 1;
|
||||||
stack.top.elements.push(update(
|
stack.top.elements.push(update(
|
||||||
function (obj) obj[name] != null && idx in obj[name] ? quote(obj[name][idx]) : Set.has(obj, name) ? "" : unknown(full),
|
function (obj) obj[name] != null && idx in obj[name] ? quote(obj[name][idx])
|
||||||
{ test: function (obj) obj[name] != null && idx in obj[name] && obj[name][idx] !== false && (!flags.e || obj[name][idx] != "") }));
|
: Set.has(obj, name) ? "" : unknown(full),
|
||||||
|
{
|
||||||
|
test: function (obj) obj[name] != null && idx in obj[name]
|
||||||
|
&& obj[name][idx] !== false
|
||||||
|
&& (!flags.e || obj[name][idx] != "")
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
stack.top.elements.push(update(
|
stack.top.elements.push(update(
|
||||||
function (obj) obj[name] != null ? quote(obj[name]) : Set.has(obj, name) ? "" : unknown(full),
|
function (obj) obj[name] != null ? quote(obj[name])
|
||||||
{ test: function (obj) obj[name] != null && obj[name] !== false && (!flags.e || obj[name] != "") }));
|
: Set.has(obj, name) ? "" : unknown(full),
|
||||||
|
{
|
||||||
|
test: function (obj) obj[name] != null
|
||||||
|
&& obj[name] !== false
|
||||||
|
&& (!flags.e || obj[name] != "")
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let elem in array.iterValues(stack))
|
for (let elem in array.iterValues(stack))
|
||||||
|
|||||||
Reference in New Issue
Block a user