/* * @title Tumblr dashboard bookmark * @description Save your depth and restart digging * @include http://www.tumblr.com/* * @include https://www.tumblr.com/* * @javascript_url * @license Public Domain */ (function(){ // window.next_page // in dashboard page // * http://www.tumblr.com/dashboard/2/12345 // initial // * /dashboard/2/12345 // after autopaging // in search page // * http://www.tumblr.com/tagged/bookmarklet?before=12345 // initial // * /tagged/bookmarklet?before=12345 // after autopaging // `before` param is not a post id. var currentPost = Tumblr.KeyCommands.current_post; var now = new Date, label = window.next_page.replace("http://www.tumblr.com", "") .replace(/\?before=\d+$|\/\d+\/\d+$/, "").slice(1) + " - " + [now.getFullYear(), now.getMonth(), now.getDate()].join("-"); var href; if(label.indexOf("dashboard") == 0){ var postId = parseInt(currentPost.data("post-id"), 10) + 1; href = window.next_page.replace(/\d+$/, postId); }else{ href = window.next_page; } var insertHTML = '