-
-
Save darthmaim/b9df8ae919d0bc749712 to your computer and use it in GitHub Desktop.
Item Chatlink to ID
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
getItemIdFromChatCode = function(link) { | |
var data = atob(link.match(/^\[&(.*)\]$/)[1]).split('').map(c => c.charCodeAt()); | |
var id = data[3] << 8 | data[2]; | |
return (data.length > 4 ? data[4] << 16 : 0) | id; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment