Index: lib/typoRules.js |
=================================================================== |
--- a/lib/typoRules.js |
+++ b/lib/typoRules.js |
@@ -27,17 +27,17 @@ let CUSTOM_RULE_PRIORITY = 0x7FFFFFFF; |
let rules = {expressions: []}; |
loadRules(); |
// Make first attempt to update rules after five minutes |
let updateTimer = null; |
updateTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); |
updateTimer.initWithCallback(onTimer, 1000 * 60 * 5, Ci.nsITimer.TYPE_REPEATING_SLACK); |
-onShutdown.add(function() updateTimer.cancel()); |
+onShutdown.add(() => updateTimer.cancel()); |
function loadRules() |
{ |
loadRulesFrom(Services.io.newFileURI(getRuleFile()).spec, false, function(success) |
{ |
if (!success) |
loadRulesFrom(require("info").addonRoot + "defaults/typoRules.json", true); |
}); |
@@ -91,17 +91,17 @@ function loadRulesFrom(url, ignoreVersio |
callback(false); |
} |
} |
function getRuleFile() |
{ |
let result = FileUtils.getFile("ProfD", [require("info").addonName + "-rules.json"]); |
- getRuleFile = function() result; |
+ getRuleFile = () => result; |
return getRuleFile(); |
} |
function addCustomRules() |
{ |
for (let domain in Prefs.whitelist) |
onWhitelistEntryAdded(domain); |
} |