I got a website need to check user input value is contain porn site URL or not, so I can do reject the input
Using: Chrome
$porn = [''];
$.getJSON('https://cdn.rawgit.com/aredo/porn-site-list/master/sites.json',function(data){
$(data).each(function(index,value){
$pornlist = value.host;
$porn.push($pornlist);
});
$('.urlinput').on('input',function(){
$text = $(this).val();
if (jQuery.inArray($porn,$text) != -1) {
//Porn site not allow
console.log('in webiste')
} else {
//Not porn site allow
console.log('not in website')
}
});
});