forked from RJLee88/RJsGamesV2
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.html
More file actions
185 lines (164 loc) · 6.31 KB
/
index.html
File metadata and controls
185 lines (164 loc) · 6.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="emulator, games, unblocked, gaming, game website, proxy, etc.">
<title>Google</title>
<link rel="stylesheet" href="head/styles.css">
<link rel="icon" type="image/png" href="https://i.ibb.co/zFr0mR4/Google-icon-icons-com-66793.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
<style>
#particles-js {
position: absolute;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
z-index: -2;
overflow: hidden;
}
#particles-fade {
position: absolute;
top: 8vw;
background-image: linear-gradient(rgba(0, 0, 0, 0), var(--background-color));
width: 100vw;
height: 92vh;
z-index: -1;
}
.random-button-container {
margin-top: 20px;
}
</style>
</head>
<body>
<div id="particles-js"></div>
<div id="particles-fade"></div>
<div id="header">
<h1><a href="#" id="title"><img src="https://i.ibb.co/D1Lf7Sd/Proxy-Net-Web.png" alt="Logo"></a></h1>
<div class="nav-links">
<a href="/apps" class="icon" title="apps">Apps</a>
<a href="/proxy" class="icon" title="proxy">Proxy</a>
<a href="#faq">FAQ</a>
<a href="#changelog">Changelog</a>
<a href="/cloaker" class="icon" title="apps">Cloaker</a>
<input type="text" id="search" placeholder="Search for a game...">
<button id="theme-toggle">☀️</button>
</div>
</div>
<div id="dropdown">
<h2>Settings</h2>
<label>
<input type="checkbox" id="particles-toggle" checked> Show Particles
</label>
</div>
<center>
<img src="https://i.ibb.co/2NYzHh6/New-Project-3.png" alt="Logo">
</center>
<div class="random-button-container">
<button id="random-game">Random Game 🎲</button>
</div>
<div class="container"></div>
<div id="faq" class="section">
<h2>FAQ</h2>
<p><b>Q: Why isn't the games working on mobile?</b></p>
<p>A: Honestly I Dont Care...</p>
<p><b>Q: How can I provide feedback?</b></p>
<p>You cant...</p>
</div>
<div id="changelog" class="section">
<h2>Changelog</h2>
<p>Built Diffrent Update!</p>
<ul>
<li>Added a ton of new games!</li>
<li>Worked on cloaker!</li>
<li>New Links!</li>
<li>Small stuff no one cares about!</li>
<li>Unspended RenderBelder!</li>
</ul>
</div>
<div id="cp-footer">
<i class="bi bi-cookie"></i>
<p>All Games Are Not Owned By me and open source projects made by others
</p>
</div>
<script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const particlesToggle = document.getElementById('particles-toggle');
const particlesContainer = document.getElementById('particles-js');
const title = document.getElementById('title');
const dropdown = document.getElementById('dropdown');
const themeToggle = document.getElementById('theme-toggle');
const savedParticlesSetting = JSON.parse(localStorage.getItem('particlesEnabled')) ?? true;
particlesToggle.checked = savedParticlesSetting;
particlesContainer.style.display = savedParticlesSetting ? 'block' : 'none';
particlesToggle.addEventListener('change', function () {
const isChecked = particlesToggle.checked;
particlesContainer.style.display = isChecked ? 'block' : 'none';
localStorage.setItem('particlesEnabled', JSON.stringify(isChecked));
});
title.addEventListener('click', function () {
dropdown.classList.toggle('open');
});
function loadParticles(theme) {
const particlesConfig = theme === 'light-mode' ? 'dark-particles.json' : 'light-particles.json';
particlesJS.load('particles-js', `head/${particlesConfig}`, function() {
console.log(`Particles.js config (${particlesConfig}) loaded`);
});
}
const savedTheme = localStorage.getItem('theme') || 'dark-mode';
document.body.classList.add(savedTheme);
themeToggle.textContent = savedTheme === 'light-mode' ? '🌙' : '☀️';
loadParticles(savedTheme);
themeToggle.addEventListener('click', function () {
const isLightMode = document.body.classList.toggle('light-mode');
const newTheme = isLightMode ? 'light-mode' : 'dark-mode';
localStorage.setItem('theme', newTheme);
themeToggle.textContent = isLightMode ? '🌙' : '☀️';
loadParticles(newTheme);
});
document.getElementById('random-game').addEventListener('click', function () {
const games = document.querySelectorAll('.button-container');
const randomGame = games[Math.floor(Math.random() * games.length)];
const onClickValue = randomGame.getAttribute('onclick');
const url = onClickValue.match(/location\.href='([^']+)'/)[1];
window.location.href = url;
});
});
window.onload = function() {
fetch('head/games.json')
.then(response => {
if (!response.ok) {
throw new Error('Network response was not ok ' + response.statusText);
}
return response.json();
})
.then(data => {
const games = data.games;
const container = document.querySelector('.container');
Object.keys(games).forEach(gameName => {
const gameLink = games[gameName];
const buttonContainer = document.createElement('div');
buttonContainer.classList.add('button-container');
buttonContainer.setAttribute('onclick', `location.href='${gameLink}/'`);
const img = document.createElement('img');
img.src = `/${gameLink}/img.jpeg`;
img.alt = gameName;
const span = document.createElement('span');
span.classList.add('button-text');
span.textContent = gameName;
buttonContainer.appendChild(img);
buttonContainer.appendChild(span);
container.appendChild(buttonContainer);
});
})
.catch(error => {
console.error('There was a problem with the fetch operation:', error);
});
};
</script>
</body>
</html>