Skip to content

Commit

Permalink
Merge pull request #211 from amadeus4dev/1218
Browse files Browse the repository at this point in the history
with different block
  • Loading branch information
minjikarin authored Dec 18, 2023
2 parents f978bfe + 37eb218 commit 5f5301a
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions overrides/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,36 @@
document.write(`<meta http-equiv="refresh" content="0;url=${redirectUrl}" />`);
}

//event
document.addEventListener('click', function (event) {
var target = event.target;
if (target.tagName === 'A') {
var href = target.getAttribute('href');
if (href.startsWith('https://developers.amadeus.com')) {
event.preventDefault();
window.location.href = href;
// Event listener for link clicks
window.addEventListener('DOMContentLoaded', (event) => {
document.body.addEventListener('click', function (event) {
var target = event.target;
if (target.tagName === 'A') {
var href = target.getAttribute('href');
if (href.startsWith('https://developers.amadeus.com')) {
event.preventDefault();
window.location.href = href;
}
}
}
});
});
</script>
{% endblock %}

{% block scripts %}
<script>
// Event listener for link clicks
window.addEventListener('DOMContentLoaded', (event) => {
document.body.addEventListener('click', function (event) {
var target = event.target;
if (target.tagName === 'A') {
var href = target.getAttribute('href');
if (href.startsWith('https://developers.amadeus.com')) {
event.preventDefault();
window.location.href = href;
}
}
});
});
</script>
{% endblock %}

0 comments on commit 5f5301a

Please sign in to comment.