Created
November 18, 2016 20:41
-
-
Save edinsoncs/e3179d5929f21688d596eec5ac2ff545 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var typeEnconding = function() { | |
this.charset = document.inputEncoding; | |
this.iqual = 'UTF-8'; | |
} | |
var newE = new typeEnconding(); | |
function scan(ch) { | |
if (ch.charset == ch.iqual) { | |
accept(ch); | |
} else { | |
not(ch); | |
} | |
} | |
scan(newE); | |
function accept(data) { | |
var txtAccept = 'Aprobado: ' + data.charset; | |
//Insert in body | |
document.body.insertAdjacentHTML('afterbegin', | |
'<h1 style="background-color:black;color:white;text-align: center">'+ | |
txtAccept | |
+'</h1>' + | |
'<p style="background-color:black;color:white;text-align: center;">ÑÑѨ{´+{+´{´ZPÑOZP´´Ñ´_--,XPC´´SCÑ: <b style="color:red;">Funciona Perfecto :)</b></p>' | |
); | |
} | |
function not(data) { | |
alert('No tienes integrado UTF-8, y tienes: ' + data.charset); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment