The problem with bookmarklet

I talked earlier about bookmarklets and how wonderful they are. In today’s web2.0 world, you can’t have a successful application without giving your users a cool bookmarklet. It can be easy to do sometimes (like the one of del.icio.us) but you always want to do more and it gets more complex… until the day you hit the wall

The problem

You can’t execute code without a click of the user. It is obvious to 99,42% of you, but there will be a day when you’ll just say “I want to execute some friggin’ code without a click from the user”. Even if you want to do it to simplify the life of the user, you can’t. There must be a solution.

The solution

For now, the solution is called GreaseMonkey. This is a Firefox add-on that executes javascript automatically when certain pages are called.

Example, I want every background color of every web page I visit to be gray. I would create a script with this code


document.body.style.backgroundColor = "gray";

and it would just work.

The problems of the solution

It is Firefox only. With around 75% market shares, Internet Explorer just can’t be forgotten.

It is too complex
. The user has to know how to install add-ons and how to install greasemonkey scripts. It is way to hard for a normal user.

The real solution

I don’t have one and that’s why guys that I ask you : how to execute javascript code automatically without a click from the user?

I want all the solutions you can give to me wether it is real or fantasy.

Thanks alot!

Commentaires

  1. pdp April 25 2007 at 04:20:42

    I think that I’ve already posted about this before on this blog,
    but you can use Technika… which allow you to run bookmarklets

    Technika can be found here: http://www.gnucitizen.org/projects/technika/

  2. Dan (maintainer of Javascript Kata) April 25 2007 at 08:01:31

    Yeah thanks but I have to install it if I want to make it run at the loading of the page.

  3. Dave April 27 2007 at 05:51:57

    Dan,

    Am I missing something here? You are looking for a way of running arbitrary code on the client-side without the user having to do anything?

    Hey, when you find it let me know so I can steal everyone’s bank/paypal/pron site passwords, won’t you?

    Dave

  4. Dan (maintainer of Javascript Kata) April 27 2007 at 06:07:17

    Yeah, I know this sounds really silly. But sometimes, people can give hints on something that could lead to somewhere unexpected. I know you can’t do that and there must be no way of doing it but I was hoping…

  5. Yansky April 29 2007 at 16:07:43

    Hi, I just thought I’d mention that there is a toolbar for IE that replicates most of greasemonkey’s functions.

    http://www.reifysoft.com/turnabout.php

  6. börsenspiel July 1 2007 at 09:56:00

    Am I missing something here? You are looking for a way of running arbitrary code on the client-side without the user having to do anything?

Post a comment

Comments are moderated and innapropriate ones won't be approved. Please respect this public space.