diff options
Diffstat (limited to 'chrome/common/extensions/docs/template/page_shell.html')
-rwxr-xr-x | chrome/common/extensions/docs/template/page_shell.html | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/common/extensions/docs/template/page_shell.html b/chrome/common/extensions/docs/template/page_shell.html index 792a9ac..faf8a37 100755 --- a/chrome/common/extensions/docs/template/page_shell.html +++ b/chrome/common/extensions/docs/template/page_shell.html @@ -25,7 +25,19 @@ src="../../../third_party/jstemplate/jstemplate_compiled.js"> </script> <script type="text/javascript" src="js/api_page_generator.js"></script> - <script type="text/javascript" src="js/bootstrap.js"></script> + <script> +// Re-render the page if the user-agent is chrome and it is being served as +// a file:/// scheme. This allows both the initial render to static as well +// as dynamic re-rendering for developers/doc-writers working on local changes. +window.onload = function() { + var chrome = navigator.userAgent.indexOf("Chrome") > -1; + var fileScheme = location.protocol == "file:"; + var regenerate = chrome && fileScheme; + //if (regenerate) { + window.renderPage(); + //} +} + </script> </head> <!-- <body> content is completely generated. Do not edit, as it will be and rewritten. --> |