Created
June 21, 2012 09:57
-
-
Save sixcircuit/2964941 to your computer and use it in GitHub Desktop.
Custom Chrome Frame Prompt
This file contains hidden or 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
<html> | |
<head> | |
<!--[if lte IE 9]> | |
<style> | |
body{ display: none !important; } | |
body.show{ display: block !important; } | |
</style> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script> | |
<script> | |
function prompt(){ | |
// this is framework specific but it basically replaces the body with a chrome frame prompt | |
// you can replace this with a $(document.body).html(<your prompt html, or whatever>); | |
Dry.ChromeFrame().Render(document.body, true); | |
// this shows the body, which is hidden if they have IE, before you replace it | |
// so they don't see the horrible rendering | |
$(document.body).addClass("show"); | |
} | |
$(document).ready(function(){ | |
CFInstall.check({ | |
onmissing: prompt, | |
preventPrompt: true | |
}); | |
}); | |
</script> | |
<![endif]--> | |
</head> | |
<body> | |
</body> | |
</html> | |
<!-- CHROME FRAME PROMPT MARKUP IN A SEPARATE FILE, but doesn't have to be for you, this is what document.body gets replaced with for us. | |
<div id = "{{{InstanceId}}}" class = "ChromeFrame Prompt"> | |
<div class="Prompt"> | |
<div class="ImageWrap"> | |
<img src="/images/chickrx-logo.png" /> | |
</div> | |
<h1>You're with it, but your browser isn't.</h1> | |
<div class="Plugin"> | |
<div class="Big">Install This Plugin:</div> | |
<div class="Explain"><a href="http://www.google.com/chromeframe/eula.html?redirect=true&quickenable=true">Chrome Frame</a>. It's from Google, and it makes Internet Explorer, well, work.</div> | |
</div> | |
<div class="OrWrapperWrapper"> | |
<div class="OrWrapper"> | |
<div class="Line"></div> | |
<div class="Or">Or</div> | |
<div class="Line"></div> | |
</div> | |
<div class="Clear"></div> | |
</div> | |
<div class="Chrome"> | |
<div class="Big">Install A Better Browser:</div> | |
<div class="Explain"><a href="http://www.google.com/chrome">Chrome</a> or <a href="http://www.mozilla.org/en-US/firefox/new/">Firefox</a>. Trust us, they're both way better than what you're using.</div> | |
</div> | |
<div class="Clear"></div> | |
</div> | |
</div> | |
--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment