| Index: lib/typoFixer.js |
| =================================================================== |
| --- a/lib/typoFixer.js |
| +++ b/lib/typoFixer.js |
| @@ -242,21 +242,20 @@ function correctURL(window, value) |
| } |
| }, |
| { |
| label: no, |
| accessKey: null, |
| callback: function() |
| { |
| // No: Add to list of corrections (ignore) |
| - if (/^www\./.test(value)) |
| - { |
| - value = value.substr(4); |
| - } |
| - Prefs.whitelist[value] = value; |
| + let {onWhitelistEntryAdded} = require("rules"); |
| + let entry = oldDomain.replace(/^www\./, ""); |
| + Prefs.whitelist[entry] = true; |
| + onWhitelistEntryAdded(entry); |
| Prefs.whitelist = JSON.parse(JSON.stringify(Prefs.whitelist)); |
| require("appIntegration").loadURI(value); |
| processFalsePositive(oldDomain, domain); |
| } |
| } |
| ]; |
| require("appIntegration").openInfobar(window, "url-fixer-infobar-askafter", message, buttons, 1); |