Skip to content

Commit

Permalink
Ignore event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
MinjiK committed Jan 10, 2024
1 parent 3722e2c commit 0e5b550
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,5 @@
const redirectUrl = path.replace(redirectPattern, 'https://developers.amadeus.com/self-service/apis-docs/guides/$1');
document.write(`<meta http-equiv="refresh" content="0;url=${redirectUrl}" />`);
}

// Add event listener to all links starting with developers.amadeus.com
document.querySelectorAll('a[href^="https://developers.amadeus.com"]').forEach(link => {
link.addEventListener('click', function (e) {
e.preventDefault(); // Prevent the default action (navigating to the link)
window.location.href = this.href; // Manually redirect the page to the link
});
});
</script>
{% endblock %}

0 comments on commit 0e5b550

Please sign in to comment.