| Index: lib/typoAppIntegration.js |
| =================================================================== |
| --- a/lib/typoAppIntegration.js |
| +++ b/lib/typoAppIntegration.js |
| @@ -30,17 +30,17 @@ exports.removeFromWindow = function(wind |
| } |
| }; |
| switch (addonName) |
| { |
| case "url-fixer": |
| { |
| // URL Fixer |
| - exports.isTypoCorrectionEnabled = function(window, prefix, domain, suffix) true; |
| + exports.isTypoCorrectionEnabled = (window, prefix, domain, suffix) => true; |
| break; |
| } |
| case "adblockplus": |
| { |
| // Adblock Plus |
| let {Prefs} = require("prefs"); |
| @@ -100,21 +100,21 @@ switch (addonName) |
| } |
| } |
| switch (application) |
| { |
| case "firefox": |
| { |
| // Firefox |
| - exports.isKnownWindow = function(window) window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; |
| + exports.isKnownWindow = (window) => window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; |
| - exports.getURLBar = function(window) "gURLBar" in window ? window.gURLBar : null; |
| + exports.getURLBar = (window) => "gURLBar" in window ? window.gURLBar : null; |
| - exports.getBrowser = function(window) "gBrowser" in window ? window.gBrowser : null; |
| + 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)) |
| { |
| // Handle new URLs being entered |
| let unhook = hook(urlbar, "handleCommand", function() |
| @@ -154,21 +154,21 @@ switch (application) |
| break; |
| } |
| case "seamonkey": |
| { |
| let eventListeners = new WeakMap(); |
| // SeaMonkey |
| - exports.isKnownWindow = function(window) window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; |
| + exports.isKnownWindow = (window) => window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; |
| - exports.getURLBar = function(window) "gURLBar" in window ? window.gURLBar : null; |
| + exports.getURLBar = (window) => "gURLBar" in window ? window.gURLBar : null; |
| - exports.getBrowser = function(window) "gBrowser" in window ? window.gBrowser : null; |
| + exports.getBrowser = (window) => "gBrowser" in window ? window.gBrowser : null; |
| exports.applyToWindow = function(window, corrector) |
| { |
| let urlbar = exports.getURLBar(window); |
| let goButton = window.document.getElementById("go-button-container"); |
| if (urlbar && urlbar._fireEvent && !functionHooks.has(window)) |
| { |
| @@ -238,21 +238,21 @@ switch (application) |
| exports.getBrowser(window).loadURI(uri); |
| }; |
| break; |
| } |
| case "fennec": |
| { |
| // XUL Fennec |
| - exports.isKnownWindow = function(window) window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; |
| + exports.isKnownWindow = (window) => window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; |
| - exports.getURLBar = function(window) null; |
| + exports.getURLBar = (window) => null; |
| - exports.getBrowser = function(window) null; |
| + exports.getBrowser = (window) => null; |
| exports.applyToWindow = function(window, corrector) |
| { |
| if ("BrowserUI" in window && window.BrowserUI.goToURI && !functionHooks.has(window)) |
| { |
| // Handle new URLs being entered |
| let unhook = hook(window.BrowserUI, "goToURI", function(url) |
| { |
| @@ -299,21 +299,21 @@ switch (application) |
| } |
| }; |
| break; |
| } |
| case "fennec2": |
| { |
| // Native Fennec |
| - exports.isKnownWindow = function(window) window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; |
| + exports.isKnownWindow = (window) => window.document.documentElement.getAttribute("windowtype") == "navigator:browser"; |
| - exports.getURLBar = function(window) null; |
| + exports.getURLBar = (window) => null; |
| - exports.getBrowser = function(window) null; |
| + exports.getBrowser = (window) => null; |
| exports.applyToWindow = function(window, corrector) |
| { |
| if ("BrowserApp" in window && window.BrowserApp.observe && !functionHooks.has(window)) |
| { |
| let innerUnhook = null; |
| let cleanup = function() |
| { |
| @@ -367,12 +367,12 @@ switch (application) |
| if ("BrowserApp" in window && "loadURI" in window.BrowserApp) |
| window.BrowserApp.loadURI(uri); |
| }; |
| break; |
| } |
| default: |
| { |
| - exports.isKnownWindow = function(window) false; |
| + exports.isKnownWindow = (window) => false; |
| break; |
| } |
| } |