Implementation Guide
Implementation
Follow these steps to implement the games grid on your website:
HTML Structure
Add these elements to your HTML:
<div class="games-text">Your games text here</div>
<div id="games"></div>
JavaScript Implementation
document.addEventListener('DOMContentLoaded', function() {
const gamesText = document.querySelector('.games-text');
window.addEventListener('scroll', () => {
const scrollPosition = window.scrollY;
if (scrollPosition > 100) {
gamesText.style.opacity = '0';
} else {
gamesText.style.opacity = '0.8';
}
});
fetch('https://list.deez.us.kg/')
.then(response => response.text())
.then(data => {
const gameGrid = document.getElementById('games');
const tempContainer = document.createElement('div');
tempContainer.innerHTML = data;
const gameLinks = tempContainer.getElementsByTagName('a');
Array.from(gameLinks).forEach(link => {
const url = link.getAttribute('data-url');
const img = link.querySelector('img');
const gameLink = document.createElement('a');
gameLink.href = '#';
gameLink.innerHTML = `
`;
gameLink.addEventListener('click', (e) => {
e.preventDefault();
const win = window.open('about:blank', '_blank');
win.document.write(`
Clever
`);
win.document.close();
});
gameGrid.appendChild(gameLink);
});
})
.catch(error => {
console.error('Error loading games:', error);
const gameGrid = document.getElementById('games');
gameGrid.innerHTML = 'Error loading games. Please try again later.
';
});
});
Domain Verification
Important: Verify your domain before deploying to production. The game grid will only work on verified domains.