Archive

Posts Tagged ‘greasemonkey’

BH IMDB/Word Highlight

A long time ago I also made a Greasemonkey script called BH IMDB/Word Highlight. This script is written for some specific sites in Hungary. However, you can take ideas from this how to highlight a text on a web site.

Install a Greasemonkey script from a local file

Problem
You have downloaded a Greasemonkey script but… how to install it?

Solution
Here I suppose you have the Greasemonkey add-on installed (Hey, what is GM?). Well, I didn’t find anywhere the option “install from local file“. A GM script is called *.user.js and if you open the URL (http://...) of such a script, GM will recognize it and offer to install it (for this GM must be enabled). However! If you open your script locally (file://...), nothing happens. WTF?

Calm down. You know Python, right? The Swiss army knife of programmers. Just navigate to the directory where the GM script is located and start a web server:

$ python -m SimpleHTTPServer

Now open the URL http://localhost:8000 , click on the user script and GM will offer to install it. Python, what would I do without you?

User scripts are installed in this directory: “~/.mozilla/firefox/xxxxxxxx.default/gm_scripts“. Here you will find a config.xml file too that is created by GM.

Example
I installed this way this script: Greasemonkey: focus first input field. This script puts the focus on the first input field. I use it with Amazon and IMDB and works like a charm.

Gmail Strikethrough Button

October 26, 2011 Leave a comment

Greasemonkey script here.

Tip from here.

Categories: google Tags: , ,

Autofocus on the first input field of a page

April 1, 2011 Leave a comment

Problem

You visit some sites frequently where you conduct some search but first you always have to click on the search field. The best example is IMDB. When I go there, I want to find a movie, so I want to type immediately the title of a movie. Why can’t they set the focus on the search field? I find it very annoying.

Solution

Fortunately someone else had also met this problem :) Visit the post Greasemonkey: focus first input field and install the Greasemonkey script. It sets the focus on the first input field and by default it’s activated for all URL addresses. If you want to limit it to IMDB only, edit the head of the script:

...
// @version        1.0
// @include        http://www.imdb.com*
// ==/UserScript==
...

Location of the script: $HOME/.mozilla/firefox/xxxxxxxx.default/gm_scripts/.

Follow

Get every new post delivered to your Inbox.

Join 73 other followers