您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes maps darkmode
当前为
// ==UserScript== // @name Cryzen.io Map Darkmode // @license MIT // @namespace http://tampermonkey.net/ // @version 1.0.0 // @description Makes maps darkmode // @author VALIDUSER // @match https://cryzen.io/* // @grant none // @run-at document-start // ==/UserScript== (function() { 'use strict'; // resource overrider const srcset = Object.getOwnPropertyDescriptor(Image.prototype, 'src').set; function getSqareDataURL(width, height, color) { const canvas = document.createElement('canvas'); canvas.width = width; canvas.height = height; const context = canvas.getContext('2d'); context.fillStyle = color; context.fillRect(0, 0, width, height); const dataURL = canvas.toDataURL(); return dataURL; } Object.defineProperty(Image.prototype, 'src', { set(value) { this._src = value; if (typeof value != 'string') { return srcset.call(this, value); } if (value.includes('colorMap')) { value = getSqareDataURL(1, 1, '#000000'); } if (value.includes('map-')) { value = getSqareDataURL(1, 1, '#212121'); } if (value.includes('sky')) { value = getSqareDataURL(1, 1, '#212121'); } srcset.call(this, value); }, get() { return this._src; } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址