Fix show_org_source
[worg.git] / preamble.html
blobad4f590d7342d72f975a3c06d3d897ee872cbc6e
1 <script type="text/javascript">
3 var _gaq = _gaq || [];
4 _gaq.push(['_setAccount', 'UA-7691209-1']);
5 _gaq.push(['_trackPageview']);
7 (function() {
8 var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
9 ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
10 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
11 })();
13 document.addEventListener('DOMContentLoaded',function() {
14 document.getElementById("table-of-contents").onclick = function() {
15 var elem = document.getElementById("text-table-of-contents");
16 elem.style.display = elem.style.display == "block" ? "none" : "block";
18 });
20 var url = document.location.href;
21 var orgsource = url.substring(0, url.lastIndexOf("."))+".org.html";
22 function show_org_source(){
23 document.location.href = orgsource;
25 </script>