不知道大家有没有试过,在T00ls的首页,点开一篇文章,竟然提示401,如下两个图:
但是在论坛里面我们又是有权限查看的。。
为了解决这个问题,我老早前,就简单的写了个油猴脚本:
// ==UserScript==
// @name T00ls论坛跳转
// @namespace https://fengwenhua.top/
// @version 0.1
// @description T00ls论坛跳转
// @author 江南小虫虫
// @match https://www.t00ls.com/*
// @icon https://www.google.com/s2/favicons?domain=www.t00ls.com
// ==/UserScript==
(function() {
'use strict';
// Your code here...
// 处理当前链接
var pathname = window.location.pathname
console.log(pathname);
if(pathname.indexOf('articles-') !=-1){
// articles-63363.html
// thread-63363-1-1.html
var source_pathname = pathname;
pathname = pathname.replace(/\w+/,"thread").replace(/(\d+)/,"$1"+"-1-1");
console.log(pathname);
var href = window.location.href;
href = href.replace(source_pathname, pathname);
console.log(href);
window.location.href=href;
}
})();
这样,当我点开这个页面的时候,它就自动跳转到论坛里面了。。。有需要自取
自评TCV:1









