| Index: lib/typoAppIntegration.js |
| =================================================================== |
| --- a/lib/typoAppIntegration.js |
| +++ b/lib/typoAppIntegration.js |
| @@ -36,14 +36,14 @@ |
| { |
| // URL Fixer |
| exports.isTypoCorrectionEnabled = function(window, prefix, domain, suffix) true; |
| - |
| + |
| break; |
| } |
| case "adblockplus": |
| { |
| // Adblock Plus |
| let {Prefs} = require("prefs"); |
| - |
| + |
| // Do not ask to opt-in if user found setting |
| if (!Prefs.correctTyposAsked) |
| { |
| @@ -55,10 +55,10 @@ |
| Prefs.removeListener(onPrefChange); |
| } |
| } |
| - |
| + |
| Prefs.addListener(onPrefChange); |
| } |
| - |
| + |
| exports.isTypoCorrectionEnabled = function(window, prefix, domain, suffix) |
| { |
| if (!Prefs.correctTyposAsked && !Prefs.correctTypos) |
| @@ -92,10 +92,10 @@ |
| // We need to have persistence being set to 1 due to redirect which happens afterwards |
| exports.openInfobar(window, "adblockplus-infobar-correct-typos-ask", message, buttons, 1); |
| } |
| - |
| + |
| return Prefs.correctTypos; |
| }; |
| - |
| + |
| break; |
| } |
| } |
| @@ -172,12 +172,12 @@ |
| if (urlbar && urlbar._fireEvent && !functionHooks.has(window)) |
| { |
| - function correctURL() |
| + let correctURL = function() |
| { |
| let correction = corrector(window, urlbar.value); |
| if (correction) |
| urlbar.value = correction; |
| - } |
| + }; |
| let unhook = hook(urlbar, "_fireEvent", function(eventType) |
| { |
| @@ -315,13 +315,13 @@ |
| if ("BrowserApp" in window && window.BrowserApp.observe && !functionHooks.has(window)) |
| { |
| let innerUnhook = null; |
| - function cleanup() |
| + let cleanup = function() |
| { |
| if (innerUnhook) |
| innerUnhook(); |
| innerUnhook = null; |
| - } |
| + }; |
| let unhook = hook(window.BrowserApp, "observe", function(subject, topic, data) |
| { |