Skip to content

Instantly share code, notes, and snippets.

@cappuccino
Created June 14, 2009 01:24
Show Gist options
  • Save cappuccino/129505 to your computer and use it in GitHub Desktop.
Save cappuccino/129505 to your computer and use it in GitHub Desktop.
var versionStart = USER_AGENT.indexOf("AppleWebKit/") + "AppleWebKit/".length,
versionEnd = USER_AGENT.indexOf(" ", versionStart),
versionString = USER_AGENT.substring(versionStart, versionEnd),
versionDivision = versionString.indexOf('.'),
majorVersion = parseInt(versionString.substring(0, versionDivision)),
minorVersion = parseInt(versionString.substr(versionDivision + 1));
if((USER_AGENT.indexOf("Safari") !== CPNotFound && (majorVersion >= 525 && minorVersion > 14)) || USER_AGENT.indexOf("Chrome") !== CPNotFound)
PLATFORM_FEATURES |= CPJavascriptRemedialKeySupport;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment