All pastes #1602317 Raw Edit

UnityObject - Safari 64Bit hack

public java v1 · immutable
#1602317 ·published 2009-10-07 20:11 UTC
rendered paste body
var isNotOkay = false;				var pluginLength = navigator.plugins.length;var i = 0;for(i; i < pluginLength; i++){		var pName = navigator.plugins[i].name;	var pDesc = navigator.plugins[i].description;	var modPDesc = pDesc.substring(13,16);		if(pName == "Unity Player"){				//check to see if the version is not greater than 2.5 and that they have the proper player		if(pDesc != "Unity Player 2.5.1f5" || modPDesc > 2.5){			isNotOkay = true;		}			}	}//this is where the safari 64bit check starts..............if (navigator.appVersion.indexOf("Safari") != -1&& navigator.appVersion.indexOf("Mac OS X 10_6") != -1&& isNotOkay == true){	//enter your code to alert the user here	sendUserAlert('using_64bit_safari');}