Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Laziness, Lizards and Monks

by data64 (Chaplain)
on Jul 14, 2005 at 20:17 UTC ( [id://475036]=note: print w/replies, xml ) Need Help??


in reply to Re: Laziness, Lizards and Monks
in thread Laziness, Lizards and Monks

"javascript: var s = %22%s%22; self.location = ((%22%s%22 == s) ? %22http://www.perlmonks.org/%22 : (%22http://www.perlmonks.org/index.pl?node=%22 + s))"

Not sure how many people actually use this, but those of you on Firefox would have noticed the above does not actually work correctly any more. It always goes to perlmonks home page and never does a search. It does work fine on Mozilla Seamonkey though. I finally traced this to a slight difference in how it works in Firefox and Seamonkey. Below code does seem to work on both. I had to split the %s into two strings in the comparison with variable s to stop firefox from trying to replace it.

javascript: var s = "%s"; self.location = (("%" + "s" == s) ? "http://www.perlmonks.org/" : ("http://www.perlmonks.org/index.pl?node=" + s));

A corresponding one for Perl documentation

javascript: var s = "%s"; self.location = (("%" + "s" == s) ? "http://perldoc.perl.org/" : ("http://perldoc.perl.org/search.html?q=" + s));

Replies are listed 'Best First'.
Re^3: Laziness, Lizards and Monks
by hossman (Prior) on Jul 14, 2005 at 21:51 UTC

    Yeah, at some point in the firefox code tree, keyword bookmarks stoped replacing just the furst %s, and started replacing them all .. i'm not sure when exactly i noticed it happening, but i had forgotten all about this thread.

    thanx for the followup.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://475036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-04-23 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found