1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 18:47:58 +01:00

fixed :open google.com opening google for searching ".com"

This commit is contained in:
Martin Stubenschrott
2007-05-02 12:47:30 +00:00
parent e52f7ffda8
commit 06bf4d63d4
2 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,8 @@
<pre> <pre>
date: date:
* version 0.5 * version 0.5
* made <tab> <up> <down> etc. perform the default action, so menus kinda
work, and it doesn't beep anymore on tab.
* added 'defsearch' setting for setting default search engine * added 'defsearch' setting for setting default search engine
2007-05-01: 2007-05-01:

View File

@@ -1313,13 +1313,13 @@ function stringToURLs(str)
}*/ }*/
// first check if the first word is a search engine // first check if the first word is a search engine
var matches = urls[url].match(/^\s*(\w+)\s*(.*)/); var matches = urls[url].match(/^\s*(\w+)(\s+|$)(.*)/);
var alias = null; var alias = null;
var text = null; var text = null;
if (matches && matches[1]) if (matches && matches[1])
alias = matches[1]; alias = matches[1];
if (matches && matches[2]) if (matches && matches[3] && matches[3].length >= 1)
text = matches[2]; text = matches[3];
if (alias) if (alias)
{ {