Browse Source

Fix show_org_source

Bastien 2 years ago
parent
commit
befa9cae34
1 changed files with 4 additions and 3 deletions
  1. 4 3
      preamble.html

+ 4 - 3
preamble.html

@@ -16,9 +16,10 @@
           elem.style.display = elem.style.display == "block" ? "none" : "block";
       }
   });
-  
+
+  var url = document.location.href;
+  var orgsource = url.substring(0, url.lastIndexOf("."))+".org.html";
   function show_org_source(){
-      document.location.href =
-	  rpl(document.location.href,"html","org.html");
+      document.location.href = orgsource;
   }
 </script>