diff options
Diffstat (limited to 'docs/config/templates/indexPage.template.html')
| -rw-r--r-- | docs/config/templates/indexPage.template.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/config/templates/indexPage.template.html b/docs/config/templates/indexPage.template.html index fdfd8b4a..e156226a 100644 --- a/docs/config/templates/indexPage.template.html +++ b/docs/config/templates/indexPage.template.html @@ -54,6 +54,26 @@ })(node); } })(); + + + // force page reload when new update is available + window.applicationCache && window.applicationCache.addEventListener('updateready', function(e) { + if (window.applicationCache.status == window.applicationCache.UPDATEREADY) { + window.applicationCache.swapCache(); + window.location.reload(); + } + }, false); + + // GA asynchronous tracker + var _gaq = _gaq || []; + _gaq.push(['_setAccount', 'UA-8594346-3']); + _gaq.push(['_setDomainName', '.angularjs.org']); + + (function() { + var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; + ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); + })(); </script> </head> <body> |
