Skip to content

Instantly share code, notes, and snippets.

@Silvyre
Silvyre / ACCio.dat
Last active May 20, 2024 18:16
🧙🐑 AutoControl for Colonist.io (ACCio): play Colonist.io using your keyboard! Setup instructions in comments below.
{"customEntities":{"script":[["1",{"name":"wall.js","value":{"mdTime":1641400238352,"srcCode":"await ACCio(_ => {\n socketGameSend.buildCityWall();\n selectNextAfterDelay();\n});"}}],["2",{"name":"setup.js","value":{"mdTime":1656815986599,"srcCode":" try {\n return ACCio(_ => console.log(\"ACCio is already enabled! Try refreshing if you're having trouble.\"));\n }\n catch (e) { console.error(e) }\n\n try {\n await ACtl.runInPageCtx('https://cdn.jsdelivr.net/gh/CoeJoder/waitForKeyElements.js@v1.2/waitForKeyElements.js');\n }\n catch {\n return ACtl.runInPageCtx(_ => console.error('ACCio failed to load all required libraries.'));\n }\n\n ACCio = new Proxy(ACtl.runInPageCtx, {\n apply: (target, thisArg, argumentsList) => {\n if (['INPUT', 'TEXTAREA'].includes(document.activeElement.tagName)) {\n return;\n }\n\n try { return target(...argumentsList); }\n catch (e) { console.error(e) }\n }\n });\n\n await ACtl.runInPageCtx(_ => waitForKeyElements('canvas[style*