Forum: Ruby on Rails RoR API Firefox search plugin

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Iván Vega R. (Guest)
on 2006-01-06 03:43
(Received via mailing list)
Hi,

Lately I've been visiting the RoR API site quite often, so I modified a
Firefox search plugin to make searches to it (with Google). So here I
post it in case someone finds it useful:

<SEARCH
   version = "7.1"
   name="Google - RoR API"
   description="RoR API SiteSearch"
   method="GET"
   action="http://www.google.com/search?q=site:api.rubyonrail...
   queryCharset="ISO-8859-1">
  <input name="" user>
</search>

<BROWSER
   update="."
   updateIcon="."
   updateCheckDays="300">

Save that as a .src file in your <Firefox dir>\searchplugins and you're
all set.

Ivan V.
D'Andrew "Dave" Thompson (Guest)
on 2006-01-06 06:22
(Received via mailing list)
Ivan,

Thank you for the hack. You can also include an icon into the directory
for
eye candy.

Save the following link http://wiki.rubyonrails.com/images/favicon.png
to
the <Firefox dir>\searchplugins as the same name as your .src file, but
with
the .png ending.

For those of you who don't know what this is...this is the option for
choosing which search engine you want to use by clicking on the dropdown
icon in the search box at the top navigation bar of firefox.

Dave
Gerard (Guest)
on 2006-01-06 10:58
(Received via mailing list)
What firefox version and platform are you talking about? Because mine
(10.0.4
on debian linux) doesn't do anything with it.

And with the searchplugin dir do you mean the regular plugin dir?

Thanx

Gerard.


On Friday 06 January 2006 02:43, Iván Vega R. tried to type something
like:
>    method="GET"
> Save that as a .src file in your <Firefox dir>\searchplugins and you're
> all set.
>
> Ivan V.
>
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails

--
"Who cares if it doesn't do anything?  It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..."

My $Grtz =~ Gerard;
~
:wq!
Dave S. (Guest)
on 2006-01-06 14:32
(Received via mailing list)
On Friday 06 Jan 2006 08:56, Gerard wrote:
> What firefox version and platform are you talking about? Because mine
> (10.0.4 on debian linux) doesn't do anything with it.
> And with the searchplugin dir do you mean the regular plugin dir?

Gerard, on my Gentoo box with Firefox 1.5, it's located at:

~/.mozilla/firefox/aeaprjg5.default/searchplugins

You just need to look for the directory called "foobar.default" and go
in
there, although I think it's possible you'll have more than one of
those, if
you've had different Firefox versions installed, so you might have to
work
out which one to use.

With Firefox 1.0x, I used to have to put my search plugins at:

/usr/lib/mozilla-firefox/searchplugins

Also, I've altered Iván's version slightly, so it simulates clicking the
"I'm
feeling lucky" button instead (takes you instantly to the first result).
Note that this isn't necessarily better, because the first result may
not
always be the one you wanted!

<SEARCH
   version = "7.1"
   name="Google - RoR API"
   description="RoR API SiteSearch"
   method="GET"
action="http://www.google.com/search?btnI=I%27m+Feeling+Lu...
   queryCharset="ISO-8859-1">
  <input name="" user>
</search>

<BROWSER
   update="."
   updateIcon="."
   updateCheckDays="300">



Personally though, I think the best method of using the RoR API pages
with
Firefox is to just bookmark api.rubyonrails.com, then assign it a
keyword (in
the bookmark manager), so mine is "rapi" for the API, "rwiki" for the
Wiki,
and "rref" for http://www.rubycentral.com/ref/

Then you just type "rapi" in your address bar, and if you have Firefox's
"find
as you type" setting enabled, just start to type the name of the
function you
are looking for.  Seems slightly quicker, since even with the search
plugin
above, you still have to search on the page it takes you to to find the
thing
you were looking for, and also you don't have the sidebar of the API
frames
available, so may end up missing something.

Cheers,

~Dave

--

Dave S.
Rent-A-Monkey Website Development
Web: http://www.rentamonkey.com/
Gerard (Guest)
on 2006-01-06 19:54
(Received via mailing list)
Dave,

Did the thingy, and it's in the list. However, it doesn't respond to an
<enter> key input. While the rest of them do. Any clue anybody?

Thanx

Gerard.

On Friday 06 January 2006 13:30, Dave S. tried to type something
like:
> there, although I think it's possible you'll have more than one of those,
> may not always be the one you wanted!
>
> Wiki, and "rref" for http://www.rubycentral.com/ref/
> ~Dave
--
"Who cares if it doesn't do anything?  It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..."

My $Grtz =~ Gerard;
~
:wq!
Christos G. (Guest)
on 2006-01-06 21:03
(Received via mailing list)
Cool Thanks!
Derek H. (Guest)
on 2006-01-07 04:10
(Received via mailing list)
Dave,

Great tip!

- Derek

On 1/6/06, Christos G. <removed_email_address@domain.invalid> wrote:
> > Gerard.
> > >
> > > "I'm feeling lucky" button instead (takes you instantly to the first
> > >   <input name="" user>
> > > Firefox is to just bookmark api.rubyonrails.com, then assign it a keyword
> > > Cheers,
> >
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Derek H.
HighGroove Studios - http://www.highgroove.com
Atlanta, GA
Keeping it Simple.
404.593.4879
This topic is locked and can not be replied to.