您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Handles the user verification, CAPTCHA, and pre-loading sequence for TriX Executor.
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/542307/1622824/TriX%20Verification%20Library.js
// ==UserScript== // @name TriX Verification Library // @namespace https://github.com/YourUsername/TriX-Executor // @version 1.1.0 // @description Handles the user verification, CAPTCHA, and pre-loading sequence for TriX Executor. // @author You // @license MIT // ==/UserScript== const TriX_Verification = (function() { 'use strict'; let _GM; // Internal storage for GM functions const VerificationSystem={ validUsers:{'795354688':"Dr. Yes",_000000000:"Painsel"},currentUserID:null, showModal(e){let t=document.getElementById("trix-verify-modal");t||(_GM.GM_addStyle("@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=Fira+Code&display=swap');#trix-verify-modal{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(26,27,38,.9);z-index:2000000;display:flex;align-items:center;justify-content:center;backdrop-filter:blur(5px);font-family:'Poppins',sans-serif}.trix-verify-container{background:#2a2d3d;padding:30px;border-radius:10px;text-align:center;color:#e0e0e0;box-shadow:0 8px 32px rgba(0,0,0,.4);width:400px}.trix-verify-container h3{margin-top:0;color:#00bfff}.trix-captcha-code{background:#1e202b;padding:10px 20px;border-radius:5px;font-family:'Fira Code',monospace;font-size:24px;letter-spacing:10px;margin:20px 0;user-select:none}.trix-verify-input{padding:10px;font-size:16px;width:90%;text-align:center;border-radius:5px;border:1px solid #353952;background:#1e202b;color:#e0e0e0;margin-bottom:20px}.trix-verify-btn{padding:10px 20px;border:none;border-radius:5px;cursor:pointer;background:#00bfff;color:#fff;font-weight:700;transition:background-color .2s}.trix-verify-btn:hover{background-color:#00a0d8}.trix-verify-btn.secondary{background-color:#414868}.trix-verify-btn.secondary:hover{background-color:#565f89}.trix-verify-btn:disabled{background:#414868;cursor:not-allowed}.trix-progress-bar{width:100%;background:#1e202b;border-radius:5px;overflow:hidden;height:20px;margin-top:15px;border:1px solid #16161e}.trix-progress-bar-inner{height:100%;width:0;background:linear-gradient(90deg,#00bfff,#28a745);transition:width .3s ease,background-color .3s ease}.trix-remember-me{display:flex;justify-content:center;align-items:center;gap:8px;font-size:14px;color:var(--trix-text-secondary);margin-bottom:20px}"),t=document.createElement("div"),t.id="trix-verify-modal",document.body.appendChild(t)),t.innerHTML=`<div class="trix-verify-container">${e}</div>`}, async run(gmFunctions) { _GM = gmFunctions; // Store GM functions for use in this library const rememberedId = await _GM.GM_getValue('trix_verified_user_id', null); const rememberedTs = await _GM.GM_getValue('trix_verified_timestamp', 0); if (rememberedId && (Date.now() - rememberedTs < 864e5) && this.validUsers[rememberedId]) { console.log(`[TriX] Welcome back, ${this.validUsers[rememberedId]}. Verification skipped.`); this.onVerificationSuccess(); return; } this.showIdInput(); }, showIdInput(){this.showModal(`<h3>TriX Executor Access</h3><p>Please log in or sign up as a guest.</p><input type="text" class="trix-verify-input" id="trix-id-input" placeholder="Enter User ID"><div class="trix-remember-me"><input type="checkbox" id="trix-remember-checkbox"><label for="trix-remember-checkbox">Remember me for 24 hours</label></div><button class="trix-verify-btn" id="trix-id-submit">Login with ID</button><p style="margin: 20px 0 10px;">or</p><button class="trix-verify-btn secondary" id="trix-guest-signup">Sign Up as Guest</button>`);const e=document.getElementById("trix-id-input"),t=document.getElementById("trix-id-submit");e.focus();const i=async()=>{const t=e.value.trim();if(this.validUsers[t]){this.currentUserID=t;const e=document.getElementById("trix-remember-checkbox").checked;e&&(await _GM.GM_setValue("trix_verified_user_id",t),await _GM.GM_setValue("trix_verified_timestamp",Date.now())),this.runCaptcha()}else e.style.border="1px solid #f7768e",e.value="Invalid ID",setTimeout(()=>{e.style.border="1px solid #353952",e.value=""},1500)};t.addEventListener("click",i),e.addEventListener("keydown",e=>{"Enter"===e.key&&i()}),document.getElementById("trix-guest-signup").addEventListener("click",()=>this.handleGuestSignup())}, async handleGuestSignup(){const e=`GUEST-${Date.now().toString(36).slice(-4).toUpperCase()}${Math.random().toString(36).slice(-2).toUpperCase()}`;await _GM.GM_setValue("trix_guest_user_id",e),this.currentUserID=e,this.validUsers[e]="Guest",this.showModal(`<h3>Guest ID Created!</h3><p>Your permanent Guest ID is:</p><div class="trix-captcha-code" style="cursor:text;" title="Save this ID!">${e}</div><p>Please save this ID. You will be automatically logged in on this browser.</p>`),setTimeout(()=>this.showTabUserConfirm(),4e3)}, showTabUserConfirm(){const e=document.querySelector("#input0").value.trim(),t=this.validUsers[this.currentUserID]||"User";this.showModal(`<h3>Confirm Tab User</h3><p>Welcome, ${t}.<br>Please confirm your current in-game username to proceed.</p><input type="text" class="trix-verify-input" id="trix-user-confirm" placeholder="Current in-game username"><button class="trix-verify-btn" id="trix-user-submit">Confirm User</button>`);const i=document.getElementById("trix-user-confirm"),s=document.getElementById("trix-user-submit");i.focus();const o=()=>{i.value.trim()===e?this.runCaptcha():(i.style.border="1px solid #f7768e",i.value="Username does not match tab",setTimeout(()=>{i.style.border="1px solid #353952",i.value=""},2e3))};s.addEventListener("click",o),i.addEventListener("keydown",e=>{"Enter"===e.key&&o()})}, async runCaptcha(){const e=this.validUsers[this.currentUserID],t=Math.random().toString(36).substring(2,8).toUpperCase();this.showModal(`<h3>Identity Confirmed</h3><p>Please complete the final CAPTCHA.</p><div class="trix-captcha-code">${t}</div><input type="text" class="trix-verify-input" id="trix-captcha-input" maxlength="6" autocomplete="off"><button class="trix-verify-btn" id="trix-captcha-submit">Continue</button>`);const i=document.getElementById("trix-captcha-input"),s=document.getElementById("trix-captcha-submit");i.focus();const o=()=>{i.value.toUpperCase()===t?this.runLoader():i.style.border="1px solid #f7768e"};s.addEventListener("click",o),i.addEventListener("keydown",e=>{"Enter"===e.key&&o()})}, runLoader(){this.showModal(`<h3>Finalizing...</h3><p>Preparing the TriX environment.</p>`),setTimeout(()=>this.onVerificationSuccess(),1500)}, onVerificationSuccess(){ document.getElementById("trix-verify-modal")?.remove(); const username = document.querySelector("#input0").value.trim() || "Guest_temp"; console.log(`[TriX] Verification successful. Initializing core for user: ${username}`); // Pass all the necessary GM functions to the core library TriX_Core.init({ username: username, GM_addStyle: _GM.GM_addStyle, GM_setValue: _GM.GM_setValue, GM_getValue: _GM.GM_getValue, GM_listValues: _GM.GM_listValues, GM_deleteValue: _GM.GM_deleteValue, GM_addValueChangeListener: GM_addValueChangeListener, //This one is a global from the main script 'GM.xmlHttpRequest': GM['xmlHttpRequest'] }); } }; return VerificationSystem; })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址