Greasy Fork

Greasy Fork is available in English.

display the image of tumblr in HD revolution

直接显示tumblr的图片为高清版

当前为 2015-04-17 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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);
        }
	});
});