aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Pages/Read.cshtml17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/Pages/Read.cshtml b/src/Pages/Read.cshtml
index 63543aa..9cff853 100644
--- a/src/Pages/Read.cshtml
+++ b/src/Pages/Read.cshtml
@@ -11,9 +11,10 @@
</div>
</div>
-<div id="art-body">
+<article id="art-body">
@Html.Raw(Model.Source.Content)
-</div>
+</article>
+
<footer>
<p>
<div style="display: flex; flex-direction: column; flex-wrap: nowrap;">
@@ -33,9 +34,17 @@
}
<br/>
<small>
- <a href="@Model.Source.Href">Les på nrk.no</a>
+ <a href="@Model.Source.Href" no-interception>Les på nrk.no</a>
</small>
</div>
</div>
</p>
-</footer> \ No newline at end of file
+</footer>
+
+<script>
+document.addEventListener("DOMContentLoaded", () => {
+ document.querySelectorAll("a:not([no-interception])").forEach(el => {
+ if (el.href.indexOf("nrk.no") !== -1) el.href = "/les/nrk?url=" + el.href;
+ });
+})
+</script> \ No newline at end of file