splix-js-demodularizer

A vile trick that may aid you in executing your beloved scripts in the novel version of the client

Tính đến 29-10-2023. Xem phiên bản mới nhất.

Script này sẽ không được không được cài đặt trực tiếp. Nó là một thư viện cho các script khác để bao gồm các chỉ thị meta // @require https://updategreasyfork.deno.dev/scripts/478491/1272037/splix-js-demodularizer.js

// ==UserScript==
// @name         splix-js-demodularizer
// @namespace    http://tampermonkey.net/
// @version      0.1.1
// @description  A vile trick that may aid you in executing your beloved scripts in the novel version of the client
// @author       You
// @match        https://splix.io/
// @icon         https://www.google.com/s2/favicons?sz=64&domain=splix.io
// @grant        none
// @run-at       document-start
// ==/UserScript==

await (async function() {
    'use strict';

    if (window.jsDemodularized) return;

    let clientCodeTimestamp = localStorage.getItem("clientCodeTimestamp");

    if (clientCodeTimestamp && Math.abs(new Date().getTime() - Number.parseInt(clientCodeTimestamp)) < 1000 * 60 * 60) {
        const clientCode = localStorage.getItem("clientCode");
        document.open('text/html');
        document.write(clientCode);
        document.close();
        window.jsDemodularized = true;
    } else {
       const response = await fetch("https://splix.io/");
       let clientCode = await response.text();
       clientCode = clientCode.replace('<script type="module" src="./bundle/main-', '<script defer src="./bundle/main-');
       localStorage.setItem("clientCode", clientCode);
       localStorage.setItem("clientCodeTimestamp", new Date().getTime());
       location.reload();
    }
})();