stop propagation when clicking on a link inside a clickable card, also open the link in a new tab without referrer
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending
This commit is contained in:
parent
9f95eb2b6b
commit
faf63ab5a0
1 changed files with 13 additions and 0 deletions
|
@ -36,5 +36,18 @@
|
||||||
</ul>
|
</ul>
|
||||||
{{/location_apps}} {{/data}}
|
{{/location_apps}} {{/data}}
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/* Fix links in list */
|
||||||
|
window.addEventListener("load", () =>
|
||||||
|
document.querySelectorAll("li a").forEach(function (link) {
|
||||||
|
link.setAttribute("target", "_blank");
|
||||||
|
link.setAttribute("rel", "noreferrer");
|
||||||
|
link.addEventListener("click", function (event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
);
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue