From 9a0dc97759bd43dc54d4632feb1723b033a4e9fe Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 18 Oct 2019 19:01:30 +0200 Subject: [PATCH] fix #3044 @0.5 --- resources/js/app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/js/app.js b/resources/js/app.js index 457cce3..4158d84 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -17,6 +17,7 @@ require('element-closest'); // the two possible header heights. It requires some variable duplication // but it's a reasonable compromise given the constraints... import cssVars from 'css-vars-ponyfill'; + cssVars({}); @@ -141,6 +142,17 @@ function getBodyScrollTop() { return el.scrollTop; } +document.addEventListener('DOMContentLoaded', function () { + var links = document.links; + + for (var i = 0, linksLength = links.length; i < linksLength; i++) { + var link = links[i]; + if (!link.target && link.hostname !== window.location.hostname) { + link.target = '_blank'; + } + } +}); + document.addEventListener('scroll', function () { checkScroll(); }, {passive: true}); -- 2.39.5