diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 19:27:50 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 19:27:50 +0000 |
commit | bed947625415eb87879a48202a84b8b4bd2f92f1 (patch) | |
tree | 9f80119962a8dbb6d0bb3d4cc09af22b555c3a1e /chrome/common/extensions/docs/js/bootstrap.js | |
parent | 563d8417b7c35cdbf197c0c079af61b874d32dea (diff) | |
download | chromium_src-bed947625415eb87879a48202a84b8b4bd2f92f1.zip chromium_src-bed947625415eb87879a48202a84b8b4bd2f92f1.tar.gz chromium_src-bed947625415eb87879a48202a84b8b4bd2f92f1.tar.bz2 |
Extension docs build script, gyp target and PRESUBMIT.PY check
This addeds a mechanism for extension docs to "render" from the api/extension_api.json api "idl", the docs/static file content and the template/ html templates into the static extension docs.
It retains the property that extension docs loaded in chrome with file:/// scheme will regenerate if dependent data has changed, but otherwise is static.
The build.py script runs test_shell to render the static files.
A extension_docs gyp target is defined with appropriate inputs & outputs that will run the build.py
A PRESUBMIT.PY check will warn on upload and commit if any files have changed that would require a docs rebuild.
Note that the PRESUBMIT.PY checks are not currently being run for git cl upload or git cl dcommit.
Review URL: http://codereview.chromium.org/159607
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22300 0039d316-1c4b-4281-b951-d872f2087c98
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 |