Greasy Fork is available in English.
直接显示tumblr的图片为高清版
当前为
// ==UserScript==
// @name display the image of tumblr in HD revolution
// @description 直接显示tumblr的图片为高清版
// @version 0.5
// @include http://*.tumblr.com/*
// @include https://*.tumblr.com/*
// @author yechenyin
// @namespace http://greasyfork.icu/users/3586-yechenyin
// @require https://code.jquery.com/jquery-1.11.2.min.js
// ==/UserScript==
$("a>img").each(function() {
if (this.src != this.parentNode.href && this.parentNode.href.match(/.+_\d+\.(jpe?g|gif|png|bmp)$/))
this.src = this.parentNode.href;
else if ($(this).parent().attr("data-big-photo"))
this.src = $(this).parent().attr("data-big-photo");
})
$(document).on('DOMNodeInserted', '#posts', function(e) {
$(e.target).find("a>img").each(function() {
if (this.src != this.parentNode.href && this.parentNode.href.match(/.+_\d+\.(jpe?g|gif|png|bmp)$/)){
console.log("original:"+this.src);
this.src = this.parentNode.href;
console.log("modifyed1:"+this.src);
}
if ($(this).parent().attr("data-big-photo")) {
console.log("original:"+this.src);
this.src = $(this).parent().attr("data-big-photo");
console.log("modifyed2:"+this.src);
}
});
});