您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
replace imgur urls with imgurp
// ==UserScript== // @name imgur to imgurp // @version 1.0 // @namespace wiidat // @description replace imgur urls with imgurp // @include *://*/* // @homepage https://github.com/wiidat/imgur-to-filmot // ==/UserScript== var a = document.getElementsByTagName('a'); for (i=0;i<a.length;i++) { p = /imgur\.com\/([\S]+)/; res = p.exec(a[i]); if (res!=null) { a[i].href = 'http://i.imgurp.com/' + res[1]; } } //var p = document.getElementsByTagName('img'); //for (i=0;i<p.length;i++) { // src = /imgur\.com\/([\S]+)/; // res = src.exec(p[i].src); // // if (res!=null) { // p[i].src = 'http://i.imgurp.com/' + res[1]; // } //} var url = document.URL; reg = /imgur\.com\/([\S]+)?/; res = reg.exec(url); if (res!=null) { if (res[1] != null) location.replace("http://imgurp.com/" + res[1]); else location.replace("http://imgurp.com/"); }