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

Unified Diff: lib/main.js

Issue 8788183: Detect and handle the case of our own typo correction extension being installed in parallel (Closed)
Patch Set: Created Nov. 19, 2012, 1:24 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 | « no previous file | lib/typoBootstrap.js » ('j') | lib/typoBootstrap.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/main.js
===================================================================
--- a/lib/main.js
+++ b/lib/main.js
@@ -14,8 +14,6 @@
let {TimeLine} = require("timeline");
TimeLine.enter("Adblock Plus startup");
-let {Prefs} = require("prefs");
-TimeLine.log("Done loading preferences");
registerPublicAPI();
TimeLine.log("Done registering public API");
require("filterListener");
@@ -28,24 +26,8 @@
TimeLine.log("Done loading sync support");
require("ui");
TimeLine.log("Done loading UI integration code");
-if (!Prefs.correctTyposAsked || (Prefs.correctTyposAsked && Prefs.correctTypos))
-{
- require("typoFixer");
- TimeLine.log("Done loading typo correction");
-}
-else
-{
- let onPrefChange = function(name)
- {
- if (name == "correctTypos")
- {
- require("typoFixer");
- Prefs.removeListener(onPrefChange);
- }
- }
-
- Prefs.addListener(onPrefChange);
-}
+require("typoBootstrap");
+TimeLine.log("Done loading typo correction");
TimeLine.leave("Started up");
function registerPublicAPI()
« no previous file with comments | « no previous file | lib/typoBootstrap.js » ('j') | lib/typoBootstrap.js » ('J')

Powered by Google App Engine
This is Rietveld