// ==UserScript== // @name display the images of tumblr in HD revolution directly // @description 直接显示tumblr的图片为高清版 // @version 1.5 // @include http://*.tumblr.com/* // @include https://*.tumblr.com/* // @author yechenyin // @namespace https://greasyfork.org/users/3586-yechenyin // @require https://code.jquery.com/jquery-1.11.2.min.js // @downloadURL none // ==/UserScript== $(".post_wrapper").each(function() { console.log($(this).find(".post_media img").length); if ($(this).find(".post_media img").length > 0) { $(this).find(".photoset_photo img").each(function() { if (this.src != this.parentNode.href) this.src = this.parentNode.href; }); $(this).find(".post_media_photo").each(function() { if ($(this).parent().attr("data-big-photo") && this.src != $(this).parent().attr("data-big-photo")) { this.src = $(this).parent().attr("data-big-photo"); console.log(this.src); } }); } }); $(document).on('DOMNodeInserted', '.post_container', function(e) { if ($(e.target).hasClass('post_container')) { if ($(this).find(".post_media img").length > 0) { $(this).find(".photoset_photo img").each(function() { if (this.src != this.parentNode.href) this.src = this.parentNode.href; }); $(this).find(".post_media_photo").each(function() { if ($(this).parent().attr("data-big-photo") && this.src != $(this).parent().attr("data-big-photo")) { this.src = $(this).parent().attr("data-big-photo"); console.log(this.src); } }); } } });