var disableFeatures = false;
var ua = navigator.userAgent;
var playstationOrNot = ua.substring(ua.indexOf("5.0 (") + 5, ua.indexOf(") Apple") - 7);
// If the system is not a playstation, disable features, display error
if(playstationOrNot != "PlayStation")
{
alert("mmm... This is only for PS4s")
document.write('<div class="alert alert-danger"><strong>You are not on a PS4, annndddd Disabled!</strong></div>');
window.stop(); //works in all browsers but IE
if ($.browser.msie) {document.execCommand("Stop");}; //works in IE,
disableFeatures = true;
}
// If the system is a playstation, ensure the version is 5.55!
else if(ua.substring(ua.indexOf("5.0 (") + 19, ua.indexOf(") Apple")) != "5.55")
{
alert("mmmm... you clicked 5.55 exploits but This PS4 is not 5.55")
document.write('<div class="alert alert-danger"><strong>Your PS4 is not on FW 5.55!</strong> Your current running FW version is ' + ua.substring(ua.indexOf("5.0 (") + 19, ua.indexOf(") Apple")) + ',</div>');
window.stop(); //works in all browsers but IE
if ($.browser.msie) {document.execCommand("Stop");}; //works in IE,
disableFeatures = true;
}
// If we've made it this far, the system must be a PS4 and must be version 5.55
else
{
alert("Ye.. your on 5.55")
document.write('<div class="alert alert-success"><strong>Congratulations!</strong> We\'ve detected your PlayStation 4 is running FW 5.55</div>');
}