September 23, 2008

Random Pages

make your own random page bookmark with customized keywords.


       
Code:

       

(function(){
var kws=['jesus','mary','joseph'];
function Rnd(w) { return parseInt(Math.random() * (w + 1));}
var url='http://delicious.com/tag/'+kws[Rnd(kws.length)-1]+'?min=10&random=1';
location.href = url;
}())



bookmarklet url:



       
Code:

       
javascript:%20(function(){%20var%20kws=['jesus','mary','joseph'];%20function%20Rnd(w)%20{%20return%20parseInt(Math.random()%20*%20(w%20+%201));}%20var%20url='http://delicious.com/tag/'+kws[Rnd(kws.length)-1]+'?min=10&random=1';%20location.href%20=%20url;%20}())




you just need to edit [‘jesus’,’mary’,’joseph’] into a list of key words you want to use.

use as many as you like.

you can also simply repeat terms to make some terms more likely than the rest…