您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
访问新浪微博图片的URL时会自动跳转到原图
当前为
// ==UserScript== // @name 微博原图 // @namespace http://tampermonkey.net/ // @version 0.14 // @description 访问新浪微博图片的URL时会自动跳转到原图 // @author halfasec // @match *.sinaimg.cn/* // @grant none // ==/UserScript== (function() { 'use strict'; var princeLi=window.location.href; console.log(princeLi); var flagLarge=/thumbnail|thumb150|mw600|mw690|mw1024|small|bmiddle/.test(princeLi); console.log(flagLarge); if(flagLarge){ var catLi=princeLi.replace(/thumbnail|thumb150|mw600|mw690|mw1024|small|bmiddle/, "large"); console.log(catLi); window.location.href=catLi; } window.addEventListener('keydown', event => { if (event.keyCode == 115) { // F4 var detectiveBao="https://www.google.com/searchbyimage?safe=off&site=search&image_url="+window.location.href; window.location.href=detectiveBao; } }); })();