Skip to content

Commit e61d18b

Browse files
committed
Updates
1 parent 51d6e1c commit e61d18b

File tree

7 files changed

+49
-11
lines changed

7 files changed

+49
-11
lines changed

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
Welcome to 3kh0 lite, a lightweight, fast, clean game site.
77

88
## Features
9-
- No tracking
10-
- No ads
11-
- No bloat
9+
- Fast
10+
- Clean
11+
- Lightweight
1212
- Obama approves 👍
1313

1414
## Get your copy

Diff for: ads.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
google.com, pub-5756835229788588, DIRECT, f08c47fec0942fa0

Diff for: index.html

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ <h1 style="font-size: 3em; text-align: center;">
1818
</h1>
1919
<span id="subtitle" style="font-size: 1.5em;">...</span>
2020
<p style="text-align: center; max-width: 600px; margin: 20px auto;">
21-
Welcome to 3kh0 lite, a lightweight, lightning fast, and simple game site.<br /><br />
22-
Yes, no tracking, no ads, no garbage. It is privacy-respecting and <b>DOES</b> have games.<br />
21+
Welcome to 3kh0 lite, a lightweight, lightning fast, and simple game site.<br />
2322
<a href="/projects.html" style="text-decoration: none;"><button style="cursor: pointer; background-color: #22c55e; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; border-radius: 20px; margin-top: 20px;">Start playing!</button></a><br />
2423
<br />
25-
<a href="/misc.html" style="text-decoration: none;"><button style="cursor: pointer; background-color: #b625cc; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; border-radius: 20px; margin-top: 5px;">Tab Cloak and about:blank</button></a>
24+
<a href="/misc.html" style="text-decoration: none;"><button style="cursor: pointer; background-color: #b625cc; border: none; color: white; padding: 15px 32px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; border-radius: 20px; margin-top: 5px;">Tools and settings</button></a>
2625
</p>
2726
<p style="text-align: center; max-width: 600px; margin: 20px auto;">
2827
&copy; 3kh0, 2024. All rights reserved. You are welcome to use and/or duplicate material from the <a href="https://github.com/3kh0/3kh0-lite" style="color: #22c55e;">GitHub repository</a> with proper credit to 3kh0.<br /><br />

Diff for: js/main.js

+18-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
11
console.warn(
2-
"%cHello!!", "color: red; font-weight: 600; background: yellow; padding: 0 5px; border-radius: 5px",
2+
"%cHello!!",
3+
"color: red; font-weight: 600; background: yellow; padding: 0 5px; border-radius: 5px",
34
"Feel free to use anything you find here for your projects; credit is appreciated but not required! Visit my website at https://3kh0.net for more information."
45
);
56

7+
// this setting controls if ads are shown,
8+
// more info on the README.md file
9+
var adStatus = localStorage.getItem("adConsent") === 'true'; // default: true
10+
11+
if (!adStatus) {
12+
(function () {
13+
var script = document.createElement("script");
14+
script.async = true;
15+
script.src = "https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5756835229788588";
16+
script.crossOrigin = "anonymous";
17+
document.head.appendChild(script);
18+
console.log("Ads enabled, thank you for your support!");
19+
})();
20+
}
21+
622
const local_title = localStorage.getItem("title");
723
const local_icon = localStorage.getItem("icon");
824
if (window.localStorage.hasOwnProperty("title")) {
@@ -12,4 +28,4 @@ if (window.localStorage.hasOwnProperty("title")) {
1228
if (window.localStorage.hasOwnProperty("icon")) {
1329
document.querySelector("link[rel=icon]").href = local_icon;
1430
console.log("Icon set to: " + local_icon);
15-
}
31+
}

Diff for: js/misc.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,16 @@ document.getElementById("create").onclick = function () {
7474
iframe.allow = "fullscreen";
7575
iframe.src = url.value;
7676
win.document.body.appendChild(iframe);
77-
};
77+
};
78+
79+
var adConsentCheckbox = document.getElementById("adConsent");
80+
81+
adConsentCheckbox.checked = localStorage.getItem("adConsent") === 'true';
82+
83+
adConsentCheckbox.addEventListener('change', function () {
84+
localStorage.setItem("adConsent", this.checked);
85+
console.log("Ad consent status: " + this.checked);
86+
alert("Changes saved.");
87+
});
88+
89+
var adStatus = adConsentCheckbox.checked;

Diff for: misc.html

+11-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
</style>
1212
</head>
13-
<body style="background-color: #121212; color: #ffffff; font-family: 'Roboto', sans-serif; margin: 0; padding: 5%; display: flex; flex-direction: column; justify-content: center; align-items: center;">
13+
<body style="background-color: #121212; color: #ffffff; font-family: sans-serif; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh;">
1414
<h2 style="text-align: center; font-size: 2em; margin-bottom: 1em;">Miscellaneous stuff</h2>
1515
<div style="width: 100%; max-width: 600px; margin-bottom: 2em;">
1616
<div>
@@ -40,6 +40,16 @@ <h1>Tab Cloaker</h1>
4040
<button onclick="resetTabSettings();" style="padding: 10px 20px; border: none; border-radius: 10px; background-color: #b625cc; color: #ffffff;">Reset</button>
4141
</div>
4242
</div>
43+
<div style="width: 100%; max-width: 600px; margin-bottom: 2em;">
44+
<div>
45+
<h1>Ads consent</h1>
46+
<div>
47+
<p>Sometimes, ads are shown to support the creator, if you would not like to see ads or it slows down your computer too much, you can disable them here.</p>
48+
<label for="adConsent">Do not show ads at all:</label>
49+
<input type="checkbox" id="adConsent" name="adConsent">
50+
</div>
51+
</div>
52+
</div>
4353
<p style="text-align: center; margin-top: 2em;">
4454
<a href="/index.html" style="text-decoration: none;">
4555
<button style="cursor: pointer; background-color: #22c55e; border: none; color: white; padding: 15px 32px; text-decoration: none; display: inline-block; font-size: 16px; border-radius: 20px; margin-top: 5px;">

Diff for: projects.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<body style="background-color: #121212; color: #ffffff; font-family: sans-serif; text-decoration: none; text-align: center;">
8181
<h1 style="font-size: 3em; text-align: center;">Projects</h1>
8282
<input type="text" id="search" onkeyup="searchGames()" placeholder="Search for games..." style="width: 100%; font-size: 18px; padding: 6px 20px; margin: auto; border-radius: 30px; max-width: 600px; margin-bottom: 10px;" />
83-
<div id="loader" style="display: block; border: 16px solid #f3f3f3; border-top: 16px solid #3498db; border-radius: 50%; width: 120px; height: 120px; animation: spin 2s linear infinite; margin: auto; margin-top: 1rem;"></div>
83+
<div id="loader" style="display: block; border: 16px solid #f3f3f3; border-top: 16px solid #3498db; border-radius: 50%; width: 120px; height: 120px; animation: spin 0.3s linear infinite; margin: auto; margin-top: 1rem;"></div>
8484
<div id="game-container" class="flex-container"></div>
8585
<p class="text-center">
8686
<a href="/index.html" style="text-decoration: none;">

0 commit comments

Comments
 (0)