function addTargetToExternalReferences()

in source/_static/js/custom.js [70:84]


function addTargetToExternalReferences() {
  const exceptions = [
    "pages/charts.html",
    "pages/maps.html",
    "pages/geocoding.html",
  ];
  Array.from(document.getElementsByClassName("reference external")).forEach(function (linkElement) {
    if (exceptions.indexOf(linkElement.getAttribute("href")) == -1) {
        linkElement.setAttribute('target', '_blank');
    } else {
        linkElement.classList.remove("external");
        linkElement.classList.add("internal");
    }
  });
}