Skip to content

Instantly share code, notes, and snippets.

@fl4ke
fl4ke / never-delete.js
Last active October 25, 2019 21:20
Cordless script to log deleted messages into the console.
var MAX_CACHE_SIZE = 50;
var messages = [];
function onMessageReceive(message) {
if (messages.length >= MAX_CACHE_SIZE) messages.shift();
messages.push(message);
}
function onMessageDelete(message){
var msg = getMessageById(message.ID);
@fl4ke
fl4ke / autismo.js
Last active October 18, 2019 12:18 — forked from n4n0GH/autismo.js
Memescript for Cordless
function onMessageSend(message){
return message.replace(/%%([^%]*)%%/g, function(autismo){
autismo = autismo.split('')
for(var i=0; i<autismo.length; i++){
autismo[i] = i%2?autismo[i].toLowerCase():autismo[i].toUpperCase()
}
autismo.push(' :spongemock:')
return autismo.join('')
})
.replace(/°°([^°]*)°°/g, function(autismo){