From: Vincent Vanwaelscappel Date: Fri, 18 Oct 2019 17:01:30 +0000 (+0200) Subject: fix #3044 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9a0dc97759bd43dc54d4632feb1723b033a4e9fe;p=pmi.git fix #3044 @0.5 --- 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});