A Pen by Stephen Way on CodePen.
Created
June 16, 2015 23:18
-
-
Save stephenway/b300d12f5e6c03bbafd2 to your computer and use it in GitHub Desktop.
vOJzrP
This file contains 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
<script> | |
$.ajax({ | |
url: "http://dig.jsondns.org/IN/" + window.location.hostname + "/A?callback=jsonp", | |
type: "GET", | |
dataType: "jsonp", | |
success: function(response) { | |
var showWarning = false; | |
$.each(response.answer, function(index, value) { | |
if (value.type === "A" && value.rdata === "63.135.210.217") { | |
showWarning = true; | |
} | |
}); | |
if (showWarning) { | |
$("body").append('<div id="dnsWarning" style="z-index: 1000; position: fixed; top: 0; left: 0; width:100%; height: 100%; background-color: white; -moz-opacity: 0.9; opacity: 0.9; filter: alpha(opacity=90); filter: progid:DXImageTransform.Microsoft.Alpha(opacity=90);"><div style="margin: 0 auto; width: 50%; position: relative; top:50%; transform: translateY(-50%);"><h1>Attention Insurance Agency: Agency Revolution Needs You To Update Your DNS Settings ASAP</h1><button style="background-color: red; color: white; font-size: 20px" onClick="readMoreDns();">Read More</button><br>This message will self-destruct automatically 24 hours after the changes are made. <a href="javascript:closeDns()">Close</a><br>Your customers won\'t see this message.<br>If you do nothing this website will be down on April 1st.</div></div>'); | |
} | |
} | |
}); | |
function closeDns() { | |
$("#dnsWarning").hide(); | |
} | |
function readMoreDns() { | |
window.location.href="https://now.agencyrevolution.com/blog/attention-required-for-dio-clients-new-ip-address"; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment