您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
优化学而思功能,美化学而思主题
当前为
// ==UserScript== // @name BetterXes // @namespace https://github.com/wuyuhangxyz/BetterXes // @version 0.0.1 // @description 优化学而思功能,美化学而思主题 // @author 吴宇航 // @license GPL-3.0 // @run-at document-start // @match https://code.xueersi.com/* // @icon https://code.xueersi.com/static/images/code-home/qrlogo.png // @grant none // ==/UserScript== // 部分代码来源于XesExt,特此鸣谢 function getSourceCode(){ const href = window.location.href; const type = /langType=.+/.exec(href)[0].substring('langType='.length) const pid = /pid=[0-9]+/.exec(href)[0].substring('pid='.length) let url; if (type == "scratch"){ url = `https://code.xueersi.com/scratch3/index.html?pid=${pid}&version=3.0&from=adapt&env=community`; }else{ url = `https://code.xueersi.com/ide/code/${pid}?from=adapt`; } return url; } (function() { 'use strict'; window.addEventListener('load', () => { // 修改标题 document.title = "BetterXes"; // 源代码 let adaptBtn = document.getElementsByClassName("adapt"); adaptBtn = (adaptBtn.length == 1)?adaptBtn:document.getElementsByClassName("not-allow-adopt-con"); if (adaptBtn.length == 1){ adaptBtn[0].childNodes[0].className = 'never-adapt'; adaptBtn[0].replaceWith(adaptBtn[0].cloneNode(true)); adaptBtn[0].childNodes[1].data = ' 源代码 '; adaptBtn[0].addEventListener('click', (ev) => { window.open(getSourceCode()); ev.preventDefault(); }); } // 去除运行频率限制 const _setTimeout = window.setTimeout window.setTimeout = (code, delay, ...args) => { if (code.toString().includes('fnTryLockRun')) { code() return -1 } return _setTimeout(code, delay, ...args) } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址