summaryrefslogtreecommitdiffstats
path: root/org/madore/damlengine
diff options
context:
space:
mode:
Diffstat (limited to 'org/madore/damlengine')
-rw-r--r--org/madore/damlengine/weblog-recent-template.daml13
1 files changed, 13 insertions, 0 deletions
diff --git a/org/madore/damlengine/weblog-recent-template.daml b/org/madore/damlengine/weblog-recent-template.daml
index 423f410..2938edc 100644
--- a/org/madore/damlengine/weblog-recent-template.daml
+++ b/org/madore/damlengine/weblog-recent-template.daml
@@ -22,6 +22,19 @@
<link rel="alternate" type="application/rss+xml" title="RSS" href="weblog.rss" />
+<d:extra-script>
+// <![CDATA[Addition for this page: redirect to permalink if fragment not found
+function checkFragment(e) {
+ var frag = location.hash;
+ var match = /^\#(d\.(\d{4}\-\d{2})\-\d{2}\.\d{4}(?:$|\..*))$/.exec(frag);
+ if ( match && ! document.getElementById(match[1]) ) {
+ location.href = match[2] + ".html" + frag;
+ }
+}
+window.addEventListener("load", checkFragment, false);
+// ]]>
+</d:extra-script>
+
<d:body>
<p>This WebLog is bilingual, some entries are in English and others