diff options
Diffstat (limited to 'chrome/common/extensions/docs/js/bootstrap.js')
-rwxr-xr-x | chrome/common/extensions/docs/js/bootstrap.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/common/extensions/docs/js/bootstrap.js b/chrome/common/extensions/docs/js/bootstrap.js new file mode 100755 index 0000000..5282030d --- /dev/null +++ b/chrome/common/extensions/docs/js/bootstrap.js @@ -0,0 +1,11 @@ +window.onload = function() { + // Regenerate page if we are passed the "?regenerate" search param + // or if the user-agent is chrome AND the document is being served + // from the file:/// scheme. + if (window.location.search == "?regenerate" || + navigator.userAgent.indexOf("Chrome") > -1) { + // Hide body content initially to minimize flashing. + document.getElementsByTagName("body")[0].className = "hidden"; + window.renderPage(); + } +}
\ No newline at end of file |