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

Delta Between Two Patch Sets: lib/typoFixer.js

Issue 8554013: Renamed necessary components for ABP integration (Closed)
Left Patch Set: Created Oct. 10, 2012, 1:08 p.m.
Right Patch Set: Created Oct. 10, 2012, 1:59 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « lib/typoAppIntegration.js ('k') | lib/typoRules.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 Cu.import("resource://gre/modules/Services.jsm"); 5 Cu.import("resource://gre/modules/Services.jsm");
6 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); 6 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
7 7
8 let {Prefs} = require("prefs"); 8 let {Prefs} = require("prefs");
9 let {WindowObserver} = require("windowObserver"); 9 let {WindowObserver} = require("windowObserver");
10 let {getSchemeCorrection, isKnownScheme, getDomainCorrection, getDomainReferral, onWhitelistEntryRemoved} = require("typoRules"); 10 let {getSchemeCorrection, isKnownScheme, getDomainCorrection, getDomainReferral, onWhitelistEntryRemoved} = require("typoRules");
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 } 48 }
49 49
50 appIntegration.removeFromWindow(window); 50 appIntegration.removeFromWindow(window);
51 } 51 }
52 }); 52 });
53 53
54 // Load HTML code to add to network error pages 54 // Load HTML code to add to network error pages
55 let netErrorOverlay = null; 55 let netErrorOverlay = null;
56 let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.ns IXMLHttpRequest); 56 let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(Ci.ns IXMLHttpRequest);
57 request.open("GET", "chrome://url-fixer/content/typoNetError.xhtml"); 57 request.open("GET", "chrome://url-fixer/content/netError.xhtml");
58 request.addEventListener("load", function(event) 58 request.addEventListener("load", function(event)
59 { 59 {
60 netErrorOverlay = event.target.responseXML; 60 netErrorOverlay = event.target.responseXML;
61 }, false); 61 }, false);
62 request.send(null) 62 request.send(null)
63 63
64 function handlePageLoad(event) 64 function handlePageLoad(event)
65 { 65 {
66 let document = event.target; 66 let document = event.target;
67 if (document.documentURI.indexOf("about:neterror?") != 0 || 67 if (document.documentURI.indexOf("about:neterror?") != 0 ||
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 stringBundle = Services.strings.createBundle("chrome://url-fixer/locale/typo .properties?" + Math.random()); 279 stringBundle = Services.strings.createBundle("chrome://url-fixer/locale/typo .properties?" + Math.random());
280 let result = [ 280 let result = [
281 stringBundle.GetStringFromName("urlfixer.isItCorrect"), 281 stringBundle.GetStringFromName("urlfixer.isItCorrect"),
282 stringBundle.GetStringFromName("urlfixer.yes"), 282 stringBundle.GetStringFromName("urlfixer.yes"),
283 stringBundle.GetStringFromName("urlfixer.no") 283 stringBundle.GetStringFromName("urlfixer.no")
284 ]; 284 ];
285 285
286 getInfobarTexts = function() result; 286 getInfobarTexts = function() result;
287 return getInfobarTexts(); 287 return getInfobarTexts();
288 } 288 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld