MJRocks Edits and Designs
// ==UserScript== // @name Tumblr Sidebr (Firefox) // @namespace http://zetx.tumblr.com/ // @description Restores your default tumblelog's sidebar to the dashboard. // @include http://*.tumblr.com/dashboard* // @include http://*.tumblr.com/tagged* // ==/UserScript== /* (C) 2011 Caleb Leung Use this freely under the GNU GPL, http://www.gnu.org/licenses/gpl.html History ------- 2011-06-08 - Added an @include for /tagged; honestly don't know what pages were/should show the sidebar 2011-06-08 - Updated so jQuery will play nicer with pre-existing js libraries 2011-06-08 - The ID I was using didn't exist if you didn't have multiple tumblelogs 2011-06-08 - Created (jQuery code from http://joanpiedra.com/jquery/greasemonkey/) */ var jQuery; // Add jQuery (function(){ if (typeof unsafeWindow.jQuery == 'undefined') { var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement, GM_JQ = document.createElement('script'); GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'; GM_JQ.type = 'text/javascript'; GM_JQ.async = true; GM_Head.insertBefore(GM_JQ, GM_Head.firstChild); } GM_wait(); })(); // Check if jQuery's loaded function GM_wait() { if (typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait, 100); } else { jQuery = unsafeWindow.jQuery.noConflict(true); readyUp(); } } // All your GM code must be inside this function function readyUp() { jQuery.noConflict(); //var addy = jQuery("#all_blogs_list a").attr('href'); var addy = jQuery("#user_channels a").attr('href'); GM_xmlhttpRequest({ method: 'GET', url: 'http://www.tumblr.com' + addy, headers: { 'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey', }, onload: function(responseDetails) { var defaultTumb = responseDetails.responseText; var tumbPost = defaultTumb.search("\