您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds a QR Code of the "lightsaber URL" to the front page of Lightsaber Escape
当前为
// ==UserScript== // @name Lightsaber Escape QR Code Display // @namespace DoomTay // @description Adds a QR Code of the "lightsaber URL" to the front page of Lightsaber Escape // @version 1.1.1 // @include https://lightsaber.withgoogle.com/ // @grant GM_xmlhttpRequest // ==/UserScript== var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if(mutation.target.parentNode.id == "url") { observer.disconnect(); lightsaberURL = mutation.target.textContent; //Using GM_xmlhttpRequest because this site doesn't like off-domain images GM_xmlhttpRequest({ method: "GET", url: "https://chart.googleapis.com/chart?chs=120x120&cht=qr&chl=" + lightsaberURL + "&chld=L|1&choe=UTF-8", overrideMimeType: "text/plain; charset=x-user-defined", onload: function(response) { var QRCode = new Image(); QRCode.id = "LSCode"; var arr = new Uint8Array(response.responseText.length); for(var i = 0; i < response.responseText.length; ++i) { arr[i] = response.responseText.charCodeAt(i) & 0xFF; } var imageData = new Blob([arr.buffer],{type:"image/png"}); QRCode.src = window.URL.createObjectURL(imageData); document.getElementsByClassName("centered")[0].insertBefore(QRCode,document.getElementsByClassName("connection-url-wrapper style-scope sw-page-landing")[0]); QRCode.width = 120; QRCode.height = 120; QRCode.style.position = "absolute"; QRCode.style.left = "45%"; QRCode.style.bottom = "-35px"; } }); } else if(mutation.target.id == "url" || (document.getElementById("url") && mutation.target.contains(document.getElementById("url")))) console.log(mutation); }); }); var config = { characterData: true, subtree: true }; observer.observe(document.getElementById("app"), config);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址