summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/docs/js/bootstrap.js
blob: 5282030de944b2098e62af0949345e2ca9aa3f71 (plain)
1
2
3
4
5
6
7
8
9
10
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();
  }
}