pseudonitro-viewer: Add patch

Closes #61
This commit is contained in:
ave 2020-05-28 15:26:04 +03:00
parent 018474dc2b
commit cf6f10a0e1
Signed by: a
GPG key ID: 398DD7BD03276F6D
3 changed files with 42 additions and 0 deletions

View file

@ -71,6 +71,10 @@ Video demonstration: https://www.youtube.com/watch?v=NMRPsAgqtWQ
- nospoiler: Automatically shows all spoilers. Useful for moderation.
- **notrack**: Disables most of the tracking in Discord. Included in all official branches.
- nozlib: Disables zlib-stream field on wss, making it easier to parse wss communications when MITMing the app.
- psuedonitro-viewer: This patch allows viewing emojis sent with pseudoNitro.
![An image of pseudoNitro](https://lasagna.cat/i/nw0kfk2r.png)
- profilemention: Restores the behavior where tapping a user's profile picture adds their mention to the chat box instead of opening their profile.
- **supplemental**: Adds some helper functions needed by certain patches.

View file

@ -0,0 +1,22 @@
diff -crB com.discord-base/smali/com/discord/utilities/textprocessing/Rules.smali com.discord/smali/com/discord/utilities/textprocessing/Rules.smali
*** com.discord-base/smali/com/discord/utilities/textprocessing/Rules.smali 2020-05-27 16:23:07.799975486 +0300
--- com.discord/smali/com/discord/utilities/textprocessing/Rules.smali 2020-05-28 15:14:32.542156347 +0300
***************
*** 165,171 ****
sput-object v1, Lcom/discord/utilities/textprocessing/Rules;->PATTERN_UNICODE_EMOJI$delegate:Lkotlin/Lazy;
! const-string v1, "^<(a)?:([a-zA-Z_0-9]+):(\\d+)>"
.line 10
invoke-static {v1}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
--- 165,172 ----
sput-object v1, Lcom/discord/utilities/textprocessing/Rules;->PATTERN_UNICODE_EMOJI$delegate:Lkotlin/Lazy;
! # There's a ZWSP there
! const-string v1, "^<&??(a)?:([a-zA-Z_0-9]+):(\\d+)>"
.line 10
invoke-static {v1}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;

View file

@ -0,0 +1,16 @@
## DisTok CutTheCord: Pseudo Nitro Viewer Patch
This patch allows viewing emojis sent with pseudoNitro.
pseudoNitro is a way of sending emojis from all guilds to all guilds, even without Nitro. Both receivers need psuedoNitro to view these.
- The old format is inserting a `&` between `<` and `:` (such as `<&:thinkEyes:406800811700781076>`).
- The new format is inserting a zwsp between `<` and `:` (such as `<:thinkEyes:406800811700781076>`).
- This patch supports receiving both.
TL;DR:
![](https://lasagna.cat/i/nw0kfk2r.png)
#### Available and tested on:
- 24