Skip to content

Instantly share code, notes, and snippets.

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'),
snippet = '<pre><link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Inconsolata&text=' + chars + '"></pre>';
textarea.innerHTML = snippet;
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);