Index: lib/typoAppIntegration.js |
=================================================================== |
--- a/lib/typoAppIntegration.js |
+++ b/lib/typoAppIntegration.js |
@@ -111,18 +111,21 @@ switch (application) |
exports.getBrowser = (window) => "gBrowser" in window ? window.gBrowser : null; |
exports.applyToWindow = function(window, corrector) |
{ |
let urlbar = exports.getURLBar(window); |
if (urlbar && urlbar.handleCommand && !functionHooks.has(window)) |
{ |
+ let hooked = (urlbar.hasOwnProperty("handleCommand") ? |
+ urlbar : Object.getPrototypeOf(urlbar)); |
Wladimir Palant
2016/12/01 14:02:43
Actually, with urlbar variable being used to acces
|
+ |
// Handle new URLs being entered |
- let unhook = hook(urlbar, "handleCommand", function() |
+ let unhook = hook(hooked, "handleCommand", function() |
{ |
let correction = corrector(window, urlbar.value); |
if (correction) |
urlbar.value = correction; |
}); |
functionHooks.set(window, unhook); |
} |
}; |