Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: chrome/common/extensions/docs/js/bootstrap.js

Issue 159607: Extension docs build script, gyp target and PRESUBMIT.PY check (Closed)
Patch Set: remove build step on mac Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/docs/js/api_page_generator.js ('k') | chrome/common/extensions/docs/overview.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/js/bootstrap.js
diff --git a/chrome/common/extensions/docs/js/bootstrap.js b/chrome/common/extensions/docs/js/bootstrap.js
new file mode 100755
index 0000000000000000000000000000000000000000..5282030de944b2098e62af0949345e2ca9aa3f71
--- /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 previous file with comments | « chrome/common/extensions/docs/js/api_page_generator.js ('k') | chrome/common/extensions/docs/overview.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698