Skip to content

Instantly share code, notes, and snippets.

@un1tz3r0
Forked from ctesta01/bookmarklet.js
Created April 10, 2019 06:10
Show Gist options
  • Save un1tz3r0/3266612b743b0f83892890bdea39bcca to your computer and use it in GitHub Desktop.
Save un1tz3r0/3266612b743b0f83892890bdea39bcca to your computer and use it in GitHub Desktop.
take me to a random url – a js bookmarklet
javascript:(function(){var links = [
"https://en.wikipedia.org/wiki/Special:Random",
"https://en.wikipedia.org/wiki/Portal:Current_events",
"http://mathworld.wolfram.com/",
"http://functions.wolfram.com/",
"https://en.wikipedia.org/wiki/Portal:Contents/Outlines",
"https://en.wikipedia.org/wiki/Glossary_of_areas_of_mathematics",
"http://mathworld.wolfram.com/classroom/",
"https://en.wikipedia.org/wiki/Lists_of_mathematics_topics",
"https://en.wikipedia.org/wiki/Mathematics_Subject_Classification#First-level_areas",
"https://en.wikipedia.org/wiki/List_of_important_publications_in_mathematics",
"https://en.wikipedia.org/wiki/Outline_of_mathematics",
"http://mathworld.wolfram.com/cgi-bin/random.cgi" ];
function getRandomInt(min, max) { return Math.floor(Math.random() * (max - min + 1) + min); } window.location.href = links[getRandomInt(0, links.length-1)]; })();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment