mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 18:27:57 +01:00
fixed :open google.com opening google for searching ".com"
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user