TriX Executor

A Comprehensive Script Executor for Territorial.io with Python (WASM) support.

安装此脚本
作者推荐脚本

您可能也喜欢CroxyProxy Helper

安装此脚本
// ==UserScript==
// @name         TriX Executor
// @namespace    https://github.com/YourUsername/TriX-Executor
// @version      1.6.1
// @description  A Comprehensive Script Executor for Territorial.io with Python (WASM) support.
// @author       You
// @match        *://territorial.io/*
// @match        *://www.territorial.io/*
// @match        *://*.*.*.*/*
// @icon         https://i.postimg.cc/0NkRZxDm/image.png
// @grant        GM_addStyle
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_listValues
// @grant        GM_deleteValue
// @grant        GM_addValueChangeListener
// @grant        GM.xmlHttpRequest
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js
// @require      https://gf.qytechs.cn/scripts/541461-trix-core-library/code/TriX%20Core%20Library.js
// @require      https://gf.qytechs.cn/scripts/541462-trix-ui-library/code/TriX%20UI%20Library.js
// @run-at       document-start
// @license      MIT
// ==/UserScript==

// --- NOTE: @require for pyodide.js has been REMOVED. It is now loaded dynamically by the core library. ---

(function() {
    'use strict';
    function isTerritorialPage(){if(window.location.hostname.includes('territorial.io'))return!0;try{const e=new URLSearchParams(window.location.search).get('__cpo');if(e&&atob(e).includes('territorial.io'))return!0}catch(e){}return!1}
    if(!isTerritorialPage())return;
    console.log('[TriX Executor Loader] Page verified. Waiting for game UI...');
    function waitForElement(e,t){if(document.querySelector(e))return void t();const o=new MutationObserver((c,r)=>{document.querySelector(e)&&(r.disconnect(),t())});o.observe(document.documentElement,{childList:!0,subtree:!0})}
    function startExecutor(){const e="#input0",t=document.querySelector(e).value.trim()||`Guest_temp`;console.log(`[TriX Executor Loader] Game UI ready. Initializing core for user: ${t}`),TriX_Core.TabManager.init(t)}
    waitForElement("#input0",startExecutor);
})();

QingJ © 2025

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