您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
useful for io games like woomy-arras.io (press [:])
当前为
// ==UserScript== // @name canvas screenshot to tga // @namespace http://bzzzzdzzzz.blogspot.com/ // @description useful for io games like woomy-arras.io (press [:]) // @author BZZZZ // @include * // @version 0.1 // @grant none // @run-at document-end // ==/UserScript== (function(){ var a=document.createElement("div"); a.setAttribute('onclick','document.getElementsByTagName("body")[0].addEventListener("keyup",new Function("evnt",'+JSON.stringify( 'if(evnt.code!="Semicolon")return;'+ 'var i=document.getElementsByTagName("canvas")[0],img=i.getContext("2d").getImageData(0,0,i.width,i.height),'+ 'w=img.width,h=img.height,raw=img.data,i2=raw.length,tga=new Uint8Array(18+i2);'+ 'tga[2]=2;'+ 'tga[12]=w&255;'+ 'tga[13]=w>>8;'+ 'tga[14]=h&255;'+ 'tga[15]=h>>8;'+ 'tga[16]=32;'+ 'i=18;'+ 'var w4=w*4,end,i3;'+ 'while(0<i2){'+ 'end=i+w4;'+ 'i2-=w4;'+ 'i3=i2;'+ 'while(i<end){'+ 'tga[2+i]=raw[i3++];'+ 'tga[1+i]=raw[i3++];'+ 'tga[i]=raw[i3++];'+ 'tga[3+i]=raw[i3++];'+ 'i+=4;'+ '}'+ '}'+ 'raw=null;'+ 'img=null;'+ 'i=document.createElement("a");'+ 'i.href=URL.createObjectURL(new Blob([tga],{"type":"image/x-targa"}));'+ 'tga=null;'+ 'i.download="shot.tga";'+ 'evnt.target.appendChild(i);'+ 'i.click();'+ 'evnt.target.removeChild(i);'+ 'URL.revokeObjectURL(i.href);' )+'),false);'); a.click(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址