- Install asar tools
- Copy the app.asar from cricut (
C:\Users\USERNAME\AppData\Local\Programs\Cricut Design Space\resources) out to a folder - Unpack the asar with the command
asar e app.asar app - Open
app/cricut-ele-design-space/main.jsin a actual text editor - I use VSCode - Add the following code to the top of the file:
const electron = require('electron');
electron.app.on('ready', () => {
electron.protocol.handle('https', async (originalRequest) => {
const url = new URL(originalRequest.url);
if (url.hostname !== 'apis.cricut.com') {
return electron.net.fetch(originalRequest, { bypassCustomProtocolHandlers: true });
}
var myArray = {'14': "Scamander", '15': "Voldemort"};
// Check specific GET request conditions
if (originalRequest.method === 'GET' && myArray[url.searchParams.get('machineTypeId')] != undefined && url.searchParams.has('updateLastSeen')) {
const jsonResponse = JSON.stringify({
machineId: 0,
machineType: myArray[url.searchParams.get('machineTypeId')] ,
machineTypeId: url.searchParams.get('machineTypeId'),
primaryUserSet: true
});
return new Response(jsonResponse, {
headers: { 'Content-Type': 'application/json' },
status: 200
});
}
return electron.net.fetch(originalRequest, { bypassCustomProtocolHandlers: true });
});
});
- Repack the asar with the command
asar p app mod-app.asar - Replace the cricut app.asar with your new modded one
When Cricut updates the design space you will need to re-do the mod.