Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/typoFixer.js

Issue 29366643: Issue 4682 - Remove typo collection functionality from URL Fixer (Closed) Base URL: https://hg.adblockplus.org/urlfixer
Patch Set: Created Dec. 1, 2016, 1:23 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/typoCollector.js ('k') | lib/typoNetError.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/typoFixer.js
===================================================================
--- a/lib/typoFixer.js
+++ b/lib/typoFixer.js
@@ -16,17 +16,16 @@
*/
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
let {Prefs} = require("prefs");
let {WindowObserver} = require("windowObserver");
let {getSchemeCorrection, isKnownScheme, getDomainCorrection, getDomainReferral, onWhitelistEntryAdded} = require("typoRules");
-let {processTypedDomain, processDomainCorrection, processFalsePositive} = require("typoCollector");
let appIntegration = require("typoAppIntegration");
let netError = require("typoNetError");
let typoWindowObserver = null;
exports.attachWindowObserver = attachWindowObserver;
function attachWindowObserver()
{
@@ -127,22 +126,19 @@ function correctURL(window, value)
return null;
let oldDomain = domain;
if (!isIPAddress(domain))
{
// Remove . at end of domain for fully qualified domain names
domain = domain.replace(/\.$/, "");
- processTypedDomain(domain);
-
let newDomain = getDomainCorrection(domain);
if (newDomain != domain)
{
- processDomainCorrection(domain, newDomain);
domain = newDomain;
hasCorrection = true;
let referral = getDomainReferral(domain.replace(/^www\./, ""));
if (referral)
{
// We need to add a query string parameter when sending users to this domain
let anchorIndex = suffix.indexOf("#");
@@ -197,17 +193,16 @@ function correctURL(window, value)
{
// No: Add to list of corrections (ignore)
let entry = oldDomain.replace(/^www\./, "");
Prefs.whitelist[entry] = true;
onWhitelistEntryAdded(entry);
Prefs.whitelist = JSON.parse(JSON.stringify(Prefs.whitelist));
appIntegration.loadURI(window, value);
- processFalsePositive(domain, oldDomain);
}
}
];
// We need to have persistence being set to 1 due to redirect which happens afterwards
appIntegration.openInfobar(window, require("info").addonName + "-infobar-askafter", message, buttons, 1);
require("typoSurvey").incrementCorrectionsCounter();
« no previous file with comments | « lib/typoCollector.js ('k') | lib/typoNetError.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld