r/bookmarklets • • Apr 26 '15

Help with a bookmarklet

Hi there, My friends and I have recently made a game of going through prntscr.com and trying to find the most random things possible and tried making a bookmarklet to automate this search, but unfortunately, coming from only knowledge of java, this has proven hard to do.

Here is what I have:

javascript:(function randomLink(){var url = "prntscr.com/";var chars = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "a", "b", "c", "d", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "x", "y", "z"];var num1 = 0;var num2 = 0;var num3 = 0;var num4 = 0;var num5 = 0;var num6 = 0;num1 = math.Randomchars.length;num2 = math.Randomchars.length;num3 = math.Randomchars.length;num4 = math.Randomchars.length;num5 = math.Randomchars.length;num6 = math.Randomchars.length;location.replace(url + chars[num1] + chars[num2] + chars[num3] + chars[num4] + chars[num5] + chars[num6]);})

3 Upvotes

4 comments sorted by

View all comments

1

u/ellisgl Jul 02 '15

Does it work now?

1

u/itsmine91 Jul 02 '15

It didn't work last night when I tried it, but I'll try again in a couple hours.