How would I make it so if someone tries to submit and open a NSFW site it either takes them to a custom block page that I can make or just not submit?
$('unblocker-form').onsubmit = function() {
var url = $('url').value;
if (url.substr(0, 4) != "http") {
url = "http://" + url;
}
window.location.pathname = 'p/' + url;
return false;
};
<form align="center" action="no-js" method="get" id="unblocker-form">
<p>
URL:
<input type="text" id="url" name="url" placeholder="EXP: coolmathgames.com " />
<input type="submit" id="btnCheck" onclick="fnCheckForRestrictedWords();" value="Go" />
</p>
</form>