open sesame

いろんな人のtumblrの page/2222 を開いて reblog するというゲーム(don't use autopagerized)

http://twitter.com/#!/taizooo/status/27320644725

をするためのブックマークレットをつくった。open_sesame.bookmarklet.js

使い方は

  1. page/2222 を開きたい tumblr のページを開く
  2. ブックマークレットをクリック
  3. ファイヤ


javascript:
'open_sesame.bookmarklet.js',
(function(){
  var u=window.location.href.match(/^http:\/\/[^/]+\.tumblr\.com\//),x=u+'page/2222';
  window.open(x);
}
)();

ついでに
dashboard に現われた reblogger からランダムに page/2222 を開くブックマークレットも作った。hirake_page2222.bookmarklet.js

こっちはみんな大好き autopagerize でたくさん表示させといてからの方が楽しいんじゃないかしら

使い方は

  1. dashboard を開く
  2. autopagerize でできるだけたくさんページをつないどく
    • できれば endless summer で、
      • それはね、同じ人のページばっかり開くっていう問題が解決していないから
  3. ブックマークレットをクリック
  4. ファイヤ


javascript:
'hirake_page2222.bookmarklet.js',
(function(){
  var id=document.querySelectorAll('a.post_avatar'),
  u=id[Math.floor(Math.random()*id.length)].href,
  x=u+'page/2222';
  window.open(x);
}
)();

ネーミングにいつもの冴えが無い…


改版だ!

nodes=document.querySelectorAll('a.hogehoge') とかしてる nodes を sort して uniq するのってどうやるんだ?

https://twitter.com/#!/taizooo/status/27347748087

firebug で見るとなんかそのままの順番で並んでるように見える http://gyazo.com/52ed5c154ee35fdc0c7c1eec6cf9a13b.png

https://twitter.com/#!/taizooo/status/27348683813

querySelectorAll つかってユーザーページのリストを抜き出してソートしてユニークしてそこからランダムにユーザーを選びたいということなのです

https://twitter.com/#!/taizooo/status/27348969965

こんな感じではー. http://gist.github.com/626330

http://twitter.com/#!/Constellation/status/27349553589

thx!!! [twitter:@Constellation] (aka utatane, Taberareloo master)


javascript:
'hirake_page2222.bookmarklet.js',
(function(){
  var id=Array.prototype.reduce.call(document.querySelectorAll('a.post_avatar'), function(memo, node) {
    if (!~memo.indexOf(node.href)) {
      memo.push(node.href);
    }
    return memo;
  }, []);
  u=id[Math.floor(Math.random()*id.length)];
  x=u+'page/2222';
  window.open(x);
}
)();

ちょっと code の意味がわかってなかったりするけど動く!たくさんページを繋いどいた方が良いです!