Skip to content

Commit 70ec539

Browse files
committed
2 parents 3305c80 + 01c1338 commit 70ec539

File tree

4 files changed

+121
-96
lines changed

4 files changed

+121
-96
lines changed

static/ads.txt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
google.com, pub-2096280583430267, DIRECT, f08c47fec0942fa0
1+
google.com, pub-3944954862316283, RESELLER, f08c47fec0942fa0
2+
kueez.com, d8a37d52dbe953d3ffb39ab759dc4d94, DIRECT
3+
themediagrid.com, UOT45Z, RESELLER, 35d5010d7789b49d
4+
rubiconproject.com, 16920, RESELLER, 0bfd66d529a55807
5+
openx.com, 557564833, RESELLER, 6a698e2ec38604c6
6+
Pubmatic.com, 162110, RESELLER, 5d62403b186f2ace
7+
lijit.com, 407406, RESELLER, fafdf38b16bf6b2b #SOVRN
8+
sharethrough.com, n98xDzeL, RESELLER, d53b998a7bd4ecd2
9+
sonobi.com, 4c4fba1717, RESELLER, d1a215d9eb5aee9e
10+
appnexus.com, 8826,RESELLER, f5ab79cb980f11d1
11+
Disqus.com, 108, RESELLER
12+
Media.net, 8CU4JTRF9, RESELLER
13+
onetag.com, 6e053d779444c00, RESELLER
14+
yieldmo.com, 3133660606033240149, RESELLER
15+
33across.com, 0010b00002ODU4HAAX, RESELLER, bbea06d9c4d2853c
16+
video.unrulymedia.com, 3486482593, RESELLER

static/assets/scripts/home.js

Lines changed: 100 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ try {
77
const allTags = document.querySelectorAll(".tag");
88
const sortButton = document.getElementById("sort");
99
const pickForMe = document.getElementById("pickforme");
10-
const addGameRequestButton = document.getElementById("addGameRequestButton");
10+
// const addGameRequestButton = document.getElementById("addGameRequestButton");
1111
const sortDirectionText = document.getElementById("order");
1212
const header = document.querySelector('header');
1313
const toggleBtn = document.querySelector('.toggle-btn');
@@ -123,11 +123,11 @@ try {
123123
window.ccPorted.serverBlocked = true;
124124
window.ccPorted.baseRendering = true;
125125

126-
createNotif({
127-
message: "Something is blocking the connection to the server. You will not be able to login, which means that high scores will not be saved and your games will not save across domains and devices.",
128-
cta: false,
129-
autoClose: 7
130-
});
126+
// createNotif({
127+
// message: "Something is blocking the connection to the server. You will not be able to login, which means that high scores will not be saved and your games will not save across domains and devices.",
128+
// cta: false,
129+
// autoClose: 5
130+
// });
131131
const gamesJson = await importJSON("/games.json");
132132
const { games } = gamesJson;
133133
log(`Games ${games.length} found.`);
@@ -168,23 +168,27 @@ try {
168168
loadPinnedStates();
169169
log("Loading ROMs")
170170
document.querySelector(".cards").classList.remove("loading");
171-
let romsJSON = await importJSON("/roms/roms.json");
172-
let unseenRoms = [];
173-
log(`Roms found (length not calculated - reason: deep)`);
174-
Object.keys(romsJSON).forEach(key => {
175-
const romsList = romsJSON[key];
176-
romsList.forEach(([romLink, romID]) => {
177-
const name = `${key}-${normalize(romID)}`;
178-
if (!checkRomSeen(name)) unseenRoms.push([key, romID]);
179-
markGameSeen(name);
180-
})
181-
});
182-
if (unseenRoms.length > 0) {
183-
if (unseenRoms.length == 1) {
184-
document.getElementById("romLinks").innerHTML += ` (${unseenRoms[0][0]}/${unseenRoms[0][1]} New!)`;
185-
} else {
186-
document.getElementById("romLinks").innerHTML += ` (${unseenRoms.length} New!)`;
171+
try {
172+
let romsJSON = await importJSON("/roms/roms.json");
173+
let unseenRoms = [];
174+
log(`Roms found (length not calculated - reason: deep)`);
175+
Object.keys(romsJSON).forEach(key => {
176+
const romsList = romsJSON[key];
177+
romsList.forEach(([romLink, romID]) => {
178+
const name = `${key}-${normalize(romID)}`;
179+
if (!checkRomSeen(name)) unseenRoms.push([key, romID]);
180+
markGameSeen(name);
181+
})
182+
});
183+
if (unseenRoms.length > 0) {
184+
if (unseenRoms.length == 1) {
185+
document.getElementById("romLinks").innerHTML += ` (${unseenRoms[0][0]}/${unseenRoms[0][1]} New!)`;
186+
} else {
187+
document.getElementById("romLinks").innerHTML += ` (${unseenRoms.length} New!)`;
188+
}
187189
}
190+
} catch (e) {
191+
log("Failed to load ROMs: " + e);
188192
}
189193
if (query.has("q")) {
190194
if (query.get("q").length > 0) {
@@ -211,6 +215,15 @@ try {
211215
setTimeout(() => {
212216
baseRender();
213217
}, 3000);
218+
219+
createPopup({
220+
title: 'Hiring!',
221+
message: "We are hiring! We are looking for interns to help add games and manage the community.",
222+
cta: {
223+
text: "Apply",
224+
link: "https://forms.gle/kWJRXuYN93unLkZRA"
225+
}
226+
});
214227
const gamesJson = await importJSON("/games.json");
215228
const { games } = gamesJson;
216229
log(`Got ${games.length} games`);
@@ -263,22 +276,26 @@ try {
263276
loadPinnedStates();
264277
document.querySelector(".cards").classList.remove("loading");
265278
window.ccPorted.cardsRendered = true;
266-
let romsJSON = await importJSON("/roms/roms.json");
267-
let unseenRoms = []
268-
Object.keys(romsJSON).forEach(key => {
269-
const romsList = romsJSON[key];
270-
romsList.forEach(([romLink, romID]) => {
271-
const name = `${key}-${normalize(romID)}`;
272-
if (!checkRomSeen(name)) unseenRoms.push([key, romID]);
273-
markGameSeen(name);
274-
})
275-
});
276-
if (unseenRoms.length > 0) {
277-
if (unseenRoms.length == 1) {
278-
document.getElementById("romLinks").innerHTML += ` (${unseenRoms[0][0]}/${unseenRoms[0][1]} New!)`
279-
} else {
280-
document.getElementById("romLinks").innerHTML += ` (${unseenRoms.length} New!)`
279+
try {
280+
let romsJSON = await importJSON("/roms/roms.json");
281+
let unseenRoms = []
282+
Object.keys(romsJSON).forEach(key => {
283+
const romsList = romsJSON[key];
284+
romsList.forEach(([romLink, romID]) => {
285+
const name = `${key}-${normalize(romID)}`;
286+
if (!checkRomSeen(name)) unseenRoms.push([key, romID]);
287+
markGameSeen(name);
288+
})
289+
});
290+
if (unseenRoms.length > 0) {
291+
if (unseenRoms.length == 1) {
292+
document.getElementById("romLinks").innerHTML += ` (${unseenRoms[0][0]}/${unseenRoms[0][1]} New!)`
293+
} else {
294+
document.getElementById("romLinks").innerHTML += ` (${unseenRoms.length} New!)`
295+
}
281296
}
297+
} catch (e) {
298+
log("Failed to load roms.json: " + e);
282299
}
283300
if (query.has("q")) {
284301
if (query.get("q").length > 0) {
@@ -296,14 +313,6 @@ try {
296313
}
297314
log("Home page loaded");
298315
window.ccPorted.baseRendering = false;
299-
createPopup({
300-
title: 'Hiring!',
301-
message: "We are hiring! We are looking for interns to help add games and manage the community.",
302-
cta: {
303-
text: "Apply",
304-
link: "https://forms.gle/kWJRXuYN93unLkZRA"
305-
}
306-
});
307316
loadAds();
308317
}
309318
async function incrementClicks(gameID) {
@@ -643,8 +652,7 @@ try {
643652
position: fixed;
644653
bottom: 20px;
645654
right: 20px;
646-
max-width: 800px;
647-
min-width: 500px;
655+
max-width: 100vw;
648656
background-color: rgb(37,37,37);
649657
border: 2px solid #333;
650658
border-radius: 10px;
@@ -868,52 +876,52 @@ try {
868876
toggleBtn.setAttribute('data-current', newLayout);
869877
rerenderCards(newLayout);
870878
});
871-
document.addEventListener("keydown", (e) => {
872-
if (e.key == "Escape" && window.gameRQPopupOpen) {
873-
closePopup();
874-
}
875-
if (e.key == "Enter" && window.gameRQPopupOpen) {
876-
document.getElementById("sendGameRequestButton").click();
877-
}
878-
});
879-
addGameRequestButton.addEventListener("click", () => {
880-
createAddGamePopup();
881-
const sendButton = document.getElementById("sendGameRequestButton");
882-
const nvmdButton = document.getElementById("nvmd");
883-
const popup = document.querySelector(".popup");
884-
885-
popup.addEventListener("click", (e) => {
886-
if (e.target == popup) {
887-
closePopup();
888-
}
889-
});
890-
nvmdButton.addEventListener("click", () => {
891-
closePopup();
892-
});
893-
sendButton.addEventListener("click", async () => {
894-
const input = document.getElementById("gameRequestInput");
895-
try {
896-
// show join discord instead
897-
document.getElementById("gameRequestInput").value = "";
898-
const p = document.createElement("p");
899-
p.innerHTML = "We are not accepting game requests through the website at this time. <a href = 'https://discord.gg/4nURBJmUJY'>Please join the discord</a> and mention the @gamedev role in #game-requests to submit a game request."
900-
const secondP = document.createElement("p");
901-
secondP.innerHTML = "If you are unable to join the discord, please email us at <a href = 'mailto:[email protected]'>[email protected]</a>.";
902-
903-
if (input.value.toLowerCase().includes("roblox")) {
904-
alert("20 game requests for roblox are submitted every day. Please no more. Thanks");
905-
closePopup();
906-
return;
907-
}
908-
await addGameRequest(input.value);
909-
} catch (e) {
910-
// alert("An error occurred while sending your request. Please try again later.")
911-
log("error" + e);
912-
}
913-
closePopup();
914-
});
879+
// document.addEventListener("keydown", (e) => {
880+
// if (e.key == "Escape" && window.gameRQPopupOpen) {
881+
// closePopup();
882+
// }
883+
// if (e.key == "Enter" && window.gameRQPopupOpen) {
884+
// document.getElementById("sendGameRequestButton").click();
885+
// }
886+
// });
887+
// addGameRequestButton.addEventListener("click", () => {
888+
// createAddGamePopup();
889+
// const sendButton = document.getElementById("sendGameRequestButton");
890+
// const nvmdButton = document.getElementById("nvmd");
891+
// const popup = document.querySelector(".popup");
892+
893+
// popup.addEventListener("click", (e) => {
894+
// if (e.target == popup) {
895+
// closePopup();
896+
// }
897+
// });
898+
// nvmdButton.addEventListener("click", () => {
899+
// closePopup();
900+
// });
901+
// sendButton.addEventListener("click", async () => {
902+
// const input = document.getElementById("gameRequestInput");
903+
// try {
904+
// // show join discord instead
905+
// document.getElementById("gameRequestInput").value = "";
906+
// const p = document.createElement("p");
907+
// p.innerHTML = "We are not accepting game requests through the website at this time. <a href = 'https://discord.gg/4nURBJmUJY'>Please join the discord</a> and mention the @gamedev role in #game-requests to submit a game request."
908+
// const secondP = document.createElement("p");
909+
// secondP.innerHTML = "If you are unable to join the discord, please email us at <a href = 'mailto:[email protected]'>[email protected]</a>.";
910+
911+
// if (input.value.toLowerCase().includes("roblox")) {
912+
// alert("20 game requests for roblox are submitted every day. Please no more. Thanks");
913+
// closePopup();
914+
// return;
915+
// }
916+
// await addGameRequest(input.value);
917+
// } catch (e) {
918+
// // alert("An error occurred while sending your request. Please try again later.")
919+
// log("error" + e);
920+
// }
921+
// closePopup();
922+
// });
915923

916-
});
924+
// });
917925
pickForMe.addEventListener("click", (e) => {
918926
var card = pickRandomCard();
919927
card.click();

static/index.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@
4343
</div>
4444
<h4 id="check-roms"></h4>
4545
<div class="dont-see">
46-
<h4>Don't see what you are looking for? <a href="javascript:void(0)"
47-
id="addGameRequestButton">Request
48-
an addition</a></h4><br>
46+
<h4>Don't see what you are looking for? <a href="https://discord.gg/4nURBJmUJY">Join the discord</a> to request a game.</h4><br>
4947
</div>
5048
<p><a href = "/tos/privacy_policy.html">Privacy Policy</a> | <a href ="/tos/terms_of_service.html">Terms of Service</a></p>
5149

static/tos/privacy_policy.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ <h2>Security</h2>
184184
<li>Regular security audits and updates are performed</li>
185185
</ul>
186186
</section>
187+
<section>
188+
<h2>Monumetric</h2>
189+
<p>*This Site is affiliated with Monumetric (dba for The Blogger Network, LLC) for the purposes of placing advertising on the Site, and Monumetric will collect and use certain data for advertising purposes. To learn more about Monumetric's data usage, click here: <a href='http://www.monumetric.com/publisher-advertising-privacy'>Publisher Advertising Privacy</a>*</p>
190+
</section>
187191
<section>
188192
<h2>Changes to This Policy</h2>
189193
<p> We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page and updating the "Last Updated" date. </p>

0 commit comments

Comments
 (0)