// ==UserScript== // @name Tumblr Plain Blog Links // @namespace the.vindicar.scripts // @description Allows you to disable Peepr side panel that pops up when you click on a blog name. // @version 1.2.1 // @run-at document-end // @include http://www.tumblr.com/dashboard // @include https://www.tumblr.com/dashboard // @include http://www.tumblr.com/blog/* // @include https://www.tumblr.com/blog/* // @grant unsafeWindow // @downloadURL https://update.greasyfork.icu/scripts/9133/Tumblr%20Plain%20Blog%20Links.user.js // @updateURL https://update.greasyfork.icu/scripts/9133/Tumblr%20Plain%20Blog%20Links.meta.js // ==/UserScript== (function(){ kill_redirects(); disable_links_dashboard(); disable_links_notifications(); disable_links_indash_post_content(); disable_links_post_content(); function kill_redirects() { var re = /https?:\/\/t\.umblr\.com\/redirect\?(?:.+?&)?z=([^&]+)(?:&|$)/; var links = document.getElementsByTagName('a'); var match; // process the links that have already been loaded for (var i = 0; i < links.length; i++) if (links[i].hasAttribute('href') && (match = re.exec(links[i].getAttribute('href')))) links[i].setAttribute('href', decodeURIComponent(match[1])); var link_observer = new MutationObserver(function (mutations) { //checking the list of mutations for (var i=0; i tags ourselves var links = mutations[i].addedNodes[j].getElementsByTagName('a'); for (var k=0; k