Skip to content

Instantly share code, notes, and snippets.

@sanderaarts
Created November 21, 2015 10:33
Show Gist options
  • Save sanderaarts/bb695c24b7c7968f72b4 to your computer and use it in GitHub Desktop.
Save sanderaarts/bb695c24b7c7968f72b4 to your computer and use it in GitHub Desktop.
void function() {
var chars = document.body.innerText.split('').sort().filter(function(char, i, arr) {
return i === 0 || arr[i - 1] !== char;
}).join('');
var textarea = document.createElement('textarea');
textarea.innerHTML = chars;
textarea.setAttribute('style','position:fixed;top:5vh;left:5vw;height:90vh;width:90vw;box-shadow:0 0 5vmax black;background:white');
document.body.appendChild(textarea);
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment