// ==UserScript== // @name 贴吧丸 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 浏览移动端贴吧网页无需跳转登录 // @author GAEE // @match *://tieba.baidu.com/* // @match *://m.tieba.com/* // @match *://jump2.bdimg.com/* // @match *://tiebac.baidu.com/* // @match *://c.tieba.baidu.com/* // @icon // @grant none // @downloadURL none // ==/UserScript== (function() { 'use strict'; const _hostList = ['tieba.baidu.com', 'm.tieba.com', 'jump2.bdimg.com', 'tiebac.baidu.com', 'c.tieba.baidu.com']; var WL = window.location; var host = WL.hostname; var path = WL.pathname; var flag = encodeURIComponent('GAEE::贴吧药丸'); var execute = window[flag]; if(_hostList.indexOf(host)==-1 || execute){ return; } execute = true; if(path.indexOf('/p/')!=-1){ var tid = /[0-9]+/.exec(path); WL.replace(`https://byokpg.smartapps.cn/pages/pb/pb?tid=${tid}`); } })();