Skip to content

Instantly share code, notes, and snippets.

@gazmull
Last active July 1, 2021 08:40
Show Gist options
  • Save gazmull/f665b375c1df25f2852c161752bc7139 to your computer and use it in GitHub Desktop.
Save gazmull/f665b375c1df25f2852c161752bc7139 to your computer and use it in GitHub Desktop.
Stomp on Stamp for Kamihomo project for lazy asses [yes still working on wiosi stamps]
/* eslint-disable max-len */
// ==UserScript==
// @name Kamihime PROJECT (EN) - Stomp on Stamp
// @version 2.0
// @description I watch Isekai Cheat Magician everyday
// @author Eunicorn
// @homepage https://thegzm.space
// @include /^https:\/\/cf\.(?:g|r)\.kamihimeproject\.dmmgames\.com\/front\/cocos2d-proj\/components-(?:pc|sp)\/game\/app\.html/
// @include /^https:\/\/cf\.en\.(?:g|r)\.skh\.dmmgames\.com\/front\/cocos2d-proj\/components-(?:pc|sp)\/game\/app\.html/
// @grant none
// @run-at document-end
// ==/UserScript==
/* eslint-enable max-len */
/* globals kh, cc */
const hideMyJuice = async () => {
const aStamps = kh.createInstance('apiAStampRallies');
const stamps = await aStamps.getStampRally()
.then(res => res.body.data)
.then(data => data.filter(s => !s.alreadyGot));
if (!stamps.length) return console.log('Nothing to stomp on.');
for (const stamp of stamps) {
const { masterId, hash } = stamp;
await aStamps.saveStampRally(masterId, hash);
console.log(`Stomped ${stamp.routingPath}`);
}
alert('I stomped on your stamps for today so gtfo and stfu');
};
const iHateGravity = setInterval(theYeeting => {
if (!cc) return;
if (!cc.director.getRunningScene()) return;
clearInterval(iHateGravity);
return theYeeting();
}, 5e3, hideMyJuice);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment