JSFiddle - React, Tailwind, and code Playground
by Info Hassan
HTML
<div id="adprimary">
Content Goes Here
</div>
JavaScript
$(document).ready(function(){
var urlGet = document.referrer;
var frameLocation = urlGet.match(/:\/\/(.[^/]+)/)[1];
var whiteLocation = "google";
if (whiteLocation!=frameLocation) {
$('#adprimary').Show(); //chage to .remove();
alert("Other Domain Detected");
} else {
$('#adprimary').remove(); //change to .show();
alert("Same Domain Detected");
}
});