Skip to content

Instantly share code, notes, and snippets.

@Eren121
Last active July 15, 2024 20:39
Show Gist options
  • Save Eren121/23fb66be5d4a6158f6244174cddbf3db to your computer and use it in GitHub Desktop.
Save Eren121/23fb66be5d4a6158f6244174cddbf3db to your computer and use it in GitHub Desktop.
(function() {
const xhrProto = XMLHttpRequest.prototype,
origOpen = xhrProto.open,
origSend = xhrProto.send;
const typingUrlRegex = /https:\/\/discord.com\/api\/v6\/channels\/[0-9]+\/typing/;
xhrProto.open = function (method, url) {
this._url = url;
return origOpen.apply(this, arguments);
};
xhrProto.send = function() {
const typingDetected = typingUrlRegex.test(this._url);
if(typingDetected) {
return false;
}
else {
return origSend.apply(this, arguments);
}
}
})();
@Prabesh01
Copy link

here you go.
here's methods for all platforms except IOS: https://gist.github.com/Prabesh01/875ded55f3d82c6aa236d09ac8b42b49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment