Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
orn8 authored Nov 27, 2024
1 parent 9dbad1d commit 9d9e5f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ document.addEventListener('DOMContentLoaded', function() {
button.dataset.url = game.url;
button.classList.add('button');
button.addEventListener('click', function() {
const gameTitle = game.name;
const encodedUrl = encodeURIComponent(game.url);
window.open(`gameX.html?url=${encodedUrl}&title=${gameTitle}`, '_blank');
const encodedTitle = encodeURIComponent(game.name)
window.open(`gameX.html?url=${encodedUrl}&title=${encodedTitle}`, '_blank');
});
buttonsContainer.appendChild(button);
});
Expand Down

0 comments on commit 9d9e5f7

Please sign in to comment.