1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 04:07:59 +01:00

Remove beforeunload handler.

This commit is contained in:
Kris Maglione
2011-10-04 06:44:34 -04:00
parent 8795c093f1
commit c36c9d6185
2 changed files with 14 additions and 5 deletions

View File

@@ -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),

View File

@@ -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))