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

Unified Diff: lib/typoFixer.js

Issue 8478020: Slight improvements to URL Fixer code (Closed)
Patch Set: Created Oct. 1, 2012, 4:03 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 | « chrome/content/options.xul ('k') | no next file » | 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
@@ -178,20 +178,16 @@ function correctURL(window, value)
// Ignore search keywords and such
if ("getShortcutOrURI" in window && window.getShortcutOrURI(value) != value)
return null;
// Spaces before the first slash or period is probably a quick search
if (/^[^\/\.\s]+\s/.test(value))
return null;
- // Check manually entered corrections
- if (Prefs.custom_replace.hasOwnProperty(value) && Prefs.custom_replace[value])
- return Prefs.custom_replace[value];
Thomas Greiner 2012/10/02 10:31:14 Feel free to modify it but don't remove this code.
-
let [prefix, domain, suffix] = parseURL(value);
if (!domain)
return null;
let oldDomain = domain;
if (!isIPAddress(domain))
{
processTypedDomain(domain);
« no previous file with comments | « chrome/content/options.xul ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld