1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-15 15:25:50 +01:00

Fix hints on Firefox 4.

This commit is contained in:
Kris Maglione
2011-03-12 11:58:16 -05:00
parent 45ba165366
commit 71d9a51442
3 changed files with 74 additions and 52 deletions

View File

@@ -346,7 +346,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
echoerr: function echoerr(str, flags) {
flags |= commandline.APPEND_TO_MESSAGES;
if (isinstance(str, ["Error", "Exception"]))
if (isinstance(str, ["Error", "Exception"]) || isinstance(str, [XPCWrappedNative_NoHelper]) && /^\[Exception/.test(str))
dactyl.reportError(str);
if (isObject(str) && "echoerr" in str)
str = str.echoerr;

View File

@@ -506,7 +506,9 @@ var HintSession = Class("HintSession", CommandMode, {
*/
removeHints: function _removeHints(timeout) {
for (let { doc, start, end } in values(this.docs)) {
delete doc.dactylLabels;
// Goddamn stupid fucking Gecko 1.x security manager bullshit.
try { delete doc.dactylLabels; } catch (e) { doc.dactylLabels = undefined; }
for (let elem in util.evaluateXPath("//*[@dactyl:highlight='hints']", doc))
elem.parentNode.removeChild(elem);
for (let i in util.range(start, end + 1))