Skip to content

Commit

Permalink
Merge pull request #220 from amadeus4dev/10jan
Browse files Browse the repository at this point in the history
Ignore event listener
  • Loading branch information
minjikarin authored Jan 10, 2024
2 parents 3722e2c + 0e5b550 commit 85a3f76
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 85a3f76

Please sign in to comment.