Skip to content

Instantly share code, notes, and snippets.

@szerookii
Created March 20, 2020 12:44
Show Gist options
  • Save szerookii/c83093f245f5b7d6abe72bd854277222 to your computer and use it in GitHub Desktop.
Save szerookii/c83093f245f5b7d6abe72bd854277222 to your computer and use it in GitHub Desktop.
A script that retrieves the Discord token and copies it to the clipboard
(function(){
location.reload();
var i = document.createElement('iframe');
document.body.appendChild(i);
var el = document.createElement('textarea');
el.value = i.contentWindow.localStorage.token;
el.setAttribute('readonly', '');
el.style = {position: 'absolute', left: '-9999px'};
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
alert("Token copied to clipboard ! ;)");
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment