vínculos de salida más seguros sutty/sutty#83

This commit is contained in:
f 2020-09-15 10:02:50 -03:00
parent 92884e2b48
commit 08d29e1817
2 changed files with 6 additions and 0 deletions

View file

@ -7,6 +7,7 @@
<meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta name="theme-color" content="white"/> <meta name="theme-color" content="white"/>
<meta name="color-scheme" content="light"/> <meta name="color-scheme" content="light"/>
<meta name="referrer" content="strict-origin-when-cross-origin"/>
<link href="assets/css/styles.css" rel="stylesheet"> <link href="assets/css/styles.css" rel="stylesheet">
<script defer type="text/javascript" src="assets/js/script.js"></script> <script defer type="text/javascript" src="assets/js/script.js"></script>

View file

@ -28,4 +28,9 @@ document.addEventListener('{%- if site.turbolinks.enabled -%}turbolinks:load{%-
if (Navigator.canShare(data)) Navigator.share(data).then(); if (Navigator.canShare(data)) Navigator.share(data).then();
}); });
}); });
document.querySelectorAll("a[href^='http://'],a[href^='https://'],a[href^='//']").forEach(a => {
a.rel = "noopener";
a.target = "_blank";
});
}); });