Skip to content

Instantly share code, notes, and snippets.

@Pmmlabs
Created December 6, 2015 11:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pmmlabs/a96c89c36b2925f54121 to your computer and use it in GitHub Desktop.
Save Pmmlabs/a96c89c36b2925f54121 to your computer and use it in GitHub Desktop.
emoji_bugfix
diff --git a/source/vk_main.js b/source/vk_main.js
index 3c3d0f3..6342e47 100644
--- a/source/vk_main.js
+++ b/source/vk_main.js
@@ -691,6 +691,9 @@ vk_features={
if (getSet(95)=='y'){
Inj.Replace('Emoji.addEmoji','Emoji.cssEmoji[code][1]','(Emoji.cssEmoji[code]?Emoji.cssEmoji[code][1]:Emoji.codeToChr(code))');
}
+ Inj.Replace('Emoji.emojiReplace','i == 2','i % 2 == 0');
+ Inj.Replace('Emoji.emojiReplace','charAt(0)','charAt(i-2)');
+ Inj.Replace('Emoji.codeToChr','code.length / 4','Math.ceil(code.length / 4)');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment