🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

知乎移动页变网页

try to take over the world!

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @name         知乎移动页变网页
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       cmmdwl
// @match        *://*.zhihu.com/tardis/*
// @grant        none
// ==/UserScript==

(function() {



    var url = location.href; //声明变量url
    if (url.indexOf("/tardis/sogou/qus/") > 0) {//如果url里面搜索到了/tardis就继续执行
        var url1 = url.replace("/tardis/sogou/qus/", "/question/"); //替换掉tardis
        var url2 = url1.slice(url.indexOf("/tardis/sogou/qus/") + 1).split('/')
        // console.log(location.protocol+"//www.v2ex.com/t/"+url2[1])
        console.log("url 1 ok "+url1);
        console.log("url 2 ok "+url2);
        location.replace(url1); //直接输出 url1 结束了
        console.log(location.protocol+"/www.zhihu.com/"+url2[2]);
    }

    // Your code here...
})();