Skip to content

Instantly share code, notes, and snippets.

@poochin
Created September 20, 2012 11:36
Show Gist options
  • Select an option

  • Save poochin/3755407 to your computer and use it in GitHub Desktop.

Select an option

Save poochin/3755407 to your computer and use it in GitHub Desktop.
Dashboard を特定の post id になるまで掘り下げるブックマークレット(未入力時に自分の最新ポストまで遡るようにしました)
javascript: void function() {
var post_id;
post_id = parseInt(prompt('input post id to fall in.'));
new PeriodicalExecuter(function FallInDashboard(pe) {
var posts = $$('#posts > li.post:not(.new_post)');
exit: {
if (isNaN(post_id)) {
if ($$('.is_mine:not(.new_post)').length) {
break exit;
}
}
else if (parseInt(posts.slice(-1)[0].id.slice(5)) <= post_id) {
break exit;
}
if (loading_next_page == false) {
loading_next_page = true;
retry_auto_paginator_request();
}
return;
}
next_page = null;
pe.stop();
alert('Finished!!');
}, 1);
}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment