Skip to content

Instantly share code, notes, and snippets.

@hitode909
Created May 7, 2010 05:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hitode909/393099 to your computer and use it in GitHub Desktop.
Save hitode909/393099 to your computer and use it in GitHub Desktop.
勝手にリンククリックしまくる
// ==UserScript==
// @name random-surf
// @namespace http://www.hatena.ne.jp/hitode909
// @include *
// ==/UserScript==
setInterval(function(){
var anchors = document.querySelectorAll('a');
var target = anchors[Math.floor(anchors.length * Math.random())];
location.href = target.href;
}, 5000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment