From 08d29e1817c33ddd2694ad95f6163d4f4867387b Mon Sep 17 00:00:00 2001 From: f Date: Tue, 15 Sep 2020 10:02:50 -0300 Subject: [PATCH] =?UTF-8?q?v=C3=ADnculos=20de=20salida=20m=C3=A1s=20seguro?= =?UTF-8?q?s=20sutty/sutty#83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _layouts/default.html | 1 + assets/js/script.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/_layouts/default.html b/_layouts/default.html index a533fac..eb45082 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -7,6 +7,7 @@ + diff --git a/assets/js/script.js b/assets/js/script.js index 61cd8fa..c3600aa 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -28,4 +28,9 @@ document.addEventListener('{%- if site.turbolinks.enabled -%}turbolinks:load{%- 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"; + }); });