Discuz! PHP2HTML

turn PHP link into HTML

目前為 2022-12-31 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Discuz! PHP2HTML
// @name:zh      Discuz!核心 PHP转HTML 链接
// @namespace    https://github.com/404.html
// @version      0.4.0
// @license      GPLv3 or later
// @description  turn PHP link into HTML
// @author       H2B
// @match        *://www.mcbbs.net/*
// @match        *://www.52pojie.cn/*
// @icon         http://mcbbs.net/favicon.ico
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    var uri = location.href;
    var url = new URL(uri);
    if (url.searchParams.get("mod") == "viewthread") {
        let tid = url.searchParams.get("tid");
        let page = url.searchParams.get("page");
        if (!page) page = "1";
        history.replaceState(null, "", "https://"+ location.host + "/thread-"+ tid +"-"+ page +"-1.html"+ location.hash);
    } else if (uri.indexOf("link_redirect") > -1) // skip alert.
        location.assign(url.searchParams.get("target"));
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址