Last active
July 15, 2024 20:39
-
-
Save Eren121/23fb66be5d4a6158f6244174cddbf3db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here you go.
here's methods for all platforms except IOS: https://gist.github.com/Prabesh01/875ded55f3d82c6aa236d09ac8b42b49