1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 13:47:57 +01:00

Fixed ':open stuff://junk' to do a defsearch

This commit is contained in:
Ted Pavlic
2008-12-08 16:49:42 -05:00
parent 21a38093e2
commit 8d6b237b9e

View File

@@ -483,13 +483,13 @@ const util = { //{{{
// if the string // if the string
// * contains a space OR // * contains a space OR
// * does NOT have a period or a slash in it // * does NOT have a period in it
// AND // AND
// * has no valid protocol // * has no valid protocol
// then assume that we want to defsearch (or bookmark // then assume that we want to defsearch (or bookmark
// keyword) it. Otherwise, let Firefox figure it out // keyword) it. Otherwise, let Firefox figure it out
let proto = url.match(/^([-\w]+):/); let proto = url.match(/^([-\w]+):/);
if( ( /\s/.test(url) || !/[.\/]/.test(url) ) if( ( /\s/.test(url) || !/\./.test(url) )
&& &&
!( proto && Components.classes["@mozilla.org/network/protocol;1?name=" + proto[1]] ) ) !( proto && Components.classes["@mozilla.org/network/protocol;1?name=" + proto[1]] ) )
{ {