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:
@@ -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]] ) )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user