0

I have one boomarklet, means javascript code that takes current page's source, search for one string (or i can say hyperlink) and changes the current page to gathered link.

The problem is that

i want to make it run infinite times, if possible pausing in between to let the page load.

This is for just one of RPG i am playing, i am bored of Clicking that Exchange Flower link again and again and again. and its not offensive, or i ca say not ethical, they have many bookmarklets for doing some other kinda work, so ..

here is the Code javascript:window.location.href=document.documentElement.innerHTML.substring(document.documentElement.innerHTML.indexOf("museum.php?rfc="),document.documentElement.innerHTML.indexOf("museum.php?rfc=")+18)+"&step=a2";

Thanks anyway...

Gaurav Gandhi
  • 3,041
  • 2
  • 27
  • 40
  • What code have you got so far? It is probably as simple as just calling `setTimeout()` at the end of your function on itself. Or is the bookmarklet navigating (its hard to tell from your question)? – Kyeotic May 29 '12 at 16:20
  • here is the Code `javascript:window.location.href=document.documentElement.innerHTML.substring(document.documentElement.innerHTML.indexOf("museum.php?rfc="),document.documentElement.innerHTML.indexOf("museum.php?rfc=")+18)+"&step=a2";` – Gaurav Gandhi May 29 '12 at 16:25
  • You should really put that in your questions – Kyeotic May 29 '12 at 16:28
  • Does the answer below not meet some criteria? – Kyeotic Jun 03 '12 at 18:40

1 Answers1

1

It seems like you are asking about running some javascript on page load, since the script is navigating the page. Tools like Greasemonkey (for Firefox) are built for just this.

For Google Chrome, you could try this tool which converts bookmarklets into extensions.

Kyeotic
  • 19,697
  • 10
  • 71
  • 128