您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
When directly viewing an image on Tumblr, ensures that the highest resolution image is loaded.
当前为
// ==UserScript== // @name Tumblr Image Size // @description When directly viewing an image on Tumblr, ensures that the highest resolution image is loaded. // @version 1.0 // @namespace Dimethyl // @include /^https?://\d+\.media\.tumblr\.com/(.+/)*tumblr_.+_\d+\.(jpe?g|gif|png|bmp)$/ // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js // @grant none // ==/UserScript== var sizes = [ '_1280.', '_500.', '_400.', '_250.', '_100.' ]; function checkSize(index) { if (index >= sizes.length) return; var url = window.location.href.replace(/(.*(?=_))(_\d*.)(.*)/, '$1' + sizes[index] + '$3'); if (url == window.location.href) return; $.ajax({ url: url, type: 'HEAD', success: function(data, textStatus, jqXHR) { window.location.replace(url); }, error: function(jqXHR, textStatus, errorThrown) { checkSize(index + 1); } }); } checkSize(0);