您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace images in tumblr post with 1280px version if exists
// ==UserScript== // @name tumblr img enlarger // @namespace tie // @include http://*.tumblr.com/post/* // @include https://*.tumblr.com/post/* // @version 0.3.3 // @grant none //@require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js // @description Replace images in tumblr post with 1280px version if exists // ==/UserScript== var $; // 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.9.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 { $ = unsafeWindow.jQuery.noConflict(true); letsJQuery(); } } // All your GM code must be inside this function function letsJQuery() { /*begin*/ $('img').each(function(){ var src1 = $(this).attr("src"); var img=$(this); var width1=img.width(); if(src1.indexOf("_500")!=-1) { //alert('500 found at '+src1); src2 = src1.replace(/_500/g, '_1280'); //alert("new url "+ src2); /*replace with big image url*/ img.attr("src",src2); img.width(width1); } var wrap = img.parent(); if (wrap.is("a")) { img.unwrap(); } img.wrap("<a href='" + img.attr('src') + "' target='_blank' id='ioioi'></a>"); }); /*end*/ }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址