您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically promotes twitter image links to :orig, such as from :large.
当前为
// ==UserScript== // @name Twitter Image :orig Promoter // @version 0.4 // @description Automatically promotes twitter image links to :orig, such as from :large. // @author Cro // @match https://pbs.twimg.com/media/* // @grant none // @namespace https://gf.qytechs.cn/users/10865 // ==/UserScript== (function () { "use strict"; var queryVars = function(str) { return str.replace(/^\?/, '').split('&').map(x => x.split('=')).reduce((a, [k, v]) => { a[k] = v; return a; }, {}); }; // Check if this page contains a single image whose source is also the location. var image = document.getElementsByTagName('img')[0]; if (image && image.getAttribute('src') == location.href) { var pathname = location.pathname; // Check if we already have the orig modifier if (!pathname.match(/:orig$/)) { // Trim modifiers. var idx = pathname.lastIndexOf(':'); if (idx >= 0) pathname = pathname.substr(0, idx); // Check if we need to append the file type. var format = queryVars(location.search).format; if (format && !location.pathname.endsWith(format)) pathname += '.' + format; // Add the modifier. pathname += ':orig'; window.location = pathname; } } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址