Skip to content

Instantly share code, notes, and snippets.

View januarionclx's full-sized avatar

januarionclx

View GitHub Profile
@januarionclx
januarionclx / discordScripts.js
Last active November 6, 2021 23:55
Delete discord messages from server.
const getUserId = async () => {
return new Promise((resolve, reject) => {
const iframe = document.createElement('iframe');
iframe.onload = () => {
resolve(JSON.parse(iframe.contentWindow.localStorage.getItem('user_id_cache')));
}
iframe.src = 'about:blank';
document.body.appendChild(iframe);
});
};
@januarionclx
januarionclx / typewriter.js
Created January 23, 2022 18:04
A simple, event-based typewriting class.
// Utils
const getIntBetween = (min, max) => {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
// Typewriter 'class'
const TypeWriter = function(element = null) {
this.el = element;
this.delay = 0;
this.lastFrame = null;