Greasy Fork is available in English.

去你的手机版贴吧

将百度搜索页面中的贴吧网页转换为PC版

질문, 리뷰하거나, 이 스크립트를 신고하세요.
// ==UserScript==
// @name         去你的手机版贴吧
// @version      0.21
// @description  将百度搜索页面中的贴吧网页转换为PC版
// @author       Aront
// @match        https://tieba.baidu.com/mo/q/*
// @icon         https://tb3.bdstatic.com/public/icon/favicon-v2.ico
// @grant        none
// @license      MIT
// @namespace https://greasyfork.org/users/163117
// ==/UserScript==

var domain = location.hostname;
var query = window.location.search.substring(1);

function getQueryVariable(variable)
{

    var vars = query.split("&");
    for (var i=0;i<vars.length;i++) {
        var pair = vars[i].split("=");
        if(pair[0] == variable){return pair[1];}
    }
    return(false);
}

//将百度搜索页面中的贴吧网页转换为PC版
function fuckMotieba(){
    var tid =getQueryVariable("tid")
    var PcUrl = "https://tieba.baidu.com/p/" + tid
    window.location.href=PcUrl
}

(function() {
    if (query.indexOf("topic") !=0 ){
        fuckMotieba()
    }
})();