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

Unified Diff: lib/typoFixer.js

Issue 8554013: Renamed necessary components for ABP integration (Closed)
Patch Set: Created Oct. 10, 2012, 1:08 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
Index: lib/typoFixer.js
===================================================================
--- a/lib/typoFixer.js
+++ b/lib/typoFixer.js
@@ -7,10 +7,10 @@
let {Prefs} = require("prefs");
let {WindowObserver} = require("windowObserver");
-let {getSchemeCorrection, isKnownScheme, getDomainCorrection, getDomainReferral, onWhitelistEntryRemoved} = require("rules");
+let {getSchemeCorrection, isKnownScheme, getDomainCorrection, getDomainReferral, onWhitelistEntryRemoved} = require("typoRules");
let {processTypedDomain, processDomainCorrection,
processUserCorrection, processFalsePositive} = require("typedItCollector");
-let appIntegration = require("appIntegration");
+let appIntegration = require("typoAppIntegration");
// Attach our handlers to all browser windows
new WindowObserver(
@@ -54,7 +54,7 @@
// Load HTML code to add to network error pages
let netErrorOverlay = null;
let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.nsIXMLHttpRequest);
-request.open("GET", "chrome://url-fixer/content/netError.xhtml");
+request.open("GET", "chrome://url-fixer/content/typoNetError.xhtml");
request.addEventListener("load", function(event)
{
netErrorOverlay = event.target.responseXML;
@@ -251,19 +251,19 @@
callback: function()
{
// No: Add to list of corrections (ignore)
- let {onWhitelistEntryAdded} = require("rules");
+ let {onWhitelistEntryAdded} = require("typoRules");
let entry = oldDomain.replace(/^www\./, "");
Prefs.whitelist[entry] = true;
onWhitelistEntryAdded(entry);
Prefs.whitelist = JSON.parse(JSON.stringify(Prefs.whitelist));
- require("appIntegration").loadURI(window, value);
+ appIntegration.loadURI(window, value);
processFalsePositive(domain, oldDomain);
}
}
];
// We need to have persistence being set to 1 due to redirect which happens afterwards
- require("appIntegration").openInfobar(window, "url-fixer-infobar-askafter", message, buttons, 1);
+ appIntegration.openInfobar(window, "url-fixer-infobar-askafter", message, buttons, 1);
require("survey").incrementCorrectionsCounter();
@@ -276,7 +276,7 @@
{
// Randomize URI to work around bug 719376
if (!stringBundle)
- stringBundle = Services.strings.createBundle("chrome://url-fixer/locale/locale.properties?" + Math.random());
+ stringBundle = Services.strings.createBundle("chrome://url-fixer/locale/typo.properties?" + Math.random());
let result = [
stringBundle.GetStringFromName("urlfixer.isItCorrect"),
stringBundle.GetStringFromName("urlfixer.yes"),

Powered by Google App Engine
This is Rietveld