// ==UserScript== // @name 关闭spine动画 // @version 0.1 // @description close spine // @author f59375443 // @match *://*/* // @license MIT // @grant none // @run-at document-start // @namespace https://greasyfork.org/users/73281 // @downloadURL none // ==/UserScript== // 拦截Spine的初始化方法(例如 spine-core.js) const originalCreateElement = document.createElement; document.createElement = function(tagName) { if (tagName.toLowerCase() === 'canvas') { const canvas = originalCreateElement.call(document, tagName); Object.defineProperty(canvas, 'getContext', { value: () => null // 禁用Canvas渲染 }); return canvas; } return originalCreateElement.call(document, tagName); };