Skip to content

Instantly share code, notes, and snippets.

@maiconschmitz
Created April 21, 2012 21:32
Show Gist options
  • Save maiconschmitz/2439745 to your computer and use it in GitHub Desktop.
Save maiconschmitz/2439745 to your computer and use it in GitHub Desktop.
Detecção e instalação do Google Chrome Frame
google.load('chrome-frame', '1');
function onLoad()
{
function gcfNaoInstalado()
{
if (confirm("Você esta sendo redirecionado para a página de instalação do Google Chrome Frame. Deseja mesmo continuar?")) {
window.location = "http://www.google.com/chromeframe?user=true&redirect=http://www.maiconschmitz.com.br";
}
}
function gcfInstaladoComSucesso()
{
alert("O Google Chrome Frame foi instalado com sucesso!");
}
if (CFInstall.isAvailable()) {
alert("Você já possui o Google Chrome Frame instalado!");
}
/* Verifica se o Google Chrome Frame esta instalado */
CFInstall.check({
'onmissing': gcfNaoInstalado,
'preventPrompt': true,
'oninstall': gcfInstaladoComSucesso
});
}
google.setOnLoadCallback(onLoad);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment