Merge branch 'selenite-cc:main' into main

This commit is contained in:
khaybarkhaybaryayahud 2024-01-21 21:19:51 -05:00 committed by GitHub
commit 7d8a824192
8 changed files with 56 additions and 48 deletions

View File

@ -83,6 +83,10 @@
><sl-avatar image="/img/pfps/dire.webp" label="direflaws"></sl-avatar> ><sl-avatar image="/img/pfps/dire.webp" label="direflaws"></sl-avatar>
<p>DireFlaws</p></a <p>DireFlaws</p></a
> >
<a class="avatar" href="https://discord.com/users/1068293020534964306"
><sl-avatar image="/img/pfps/awesome.webp" label="awesome"></sl-avatar>
<p>Awesome-XV</p></a
>
</div> </div>
</main> </main>

View File

@ -41,6 +41,7 @@
<main id="main" class="noscroll"> <main id="main" class="noscroll">
<h2>What happened? Why does Selenite have ads?</h2> <h2>What happened? Why does Selenite have ads?</h2>
<p style="padding-left: 100px; padding-right: 100px; padding-bottom: 20px">After a lot of thinking, I have decided that the best course of action for Selenite is to add ads. I have spent a lot of time to make sure they are the least intrusive on your experience while still allowing me to make a profit off of the website. This decision was not out of greed or anything, it was because I can't expand Selenite past a certain point without a guaranteed income, and I can't do that solely off of donations.</p> <p style="padding-left: 100px; padding-right: 100px; padding-bottom: 20px">After a lot of thinking, I have decided that the best course of action for Selenite is to add ads. I have spent a lot of time to make sure they are the least intrusive on your experience while still allowing me to make a profit off of the website. This decision was not out of greed or anything, it was because I can't expand Selenite past a certain point without a guaranteed income, and I can't do that solely off of donations.</p>
<p>Ads are powered by Adsterra, and we use the 728x90 banner ads and the Native banners, with erotic ads disabled.</p>
<p>There is still an option to disable ads. You can also use an adblocker (which I <strong >HIGHLY</strong> recommend).</p> <p>There is still an option to disable ads. You can also use an adblocker (which I <strong >HIGHLY</strong> recommend).</p>
<button onclick="localStorage.setItem('selenite.adblock', 'true')">Click here to disable ads.</button> <button onclick="localStorage.setItem('selenite.adblock', 'true')">Click here to disable ads.</button>
</main> </main>

View File

@ -28,8 +28,8 @@
], ],
"quizlet": [ "quizlet": [
"Your Sets", "https://assets.quizlet.com/a/j/dist/app/i/logo/2021/q-twilight.e27821d9baad165.png" "Your Sets", "https://assets.quizlet.com/a/j/dist/app/i/logo/2021/q-twilight.e27821d9baad165.png"
] ],
"schoology": [ "schoology": [
"Schoology" "https://technology-mnps.ss13.sharpschool.com/UserFiles/Servers/Server_33575695/Image/Technology/Digital%20Tools/Schoology/Schoology.png" "Schoology", "https://technology-mnps.ss13.sharpschool.com/UserFiles/Servers/Server_33575695/Image/Technology/Digital%20Tools/Schoology/Schoology.png"
] ]
} }

BIN
img/pfps/awesome.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,53 +1,46 @@
let cloaklist; let cloaklist;
$.getJSON("/cloaks.json", function (data) {
cloaklist = data;
});
function cloakExceptions(url) { function cloakExceptions(url) {
if (url.includes("harrisonburg.instructure.com") == true) { if (url.includes("harrisonburg.instructure.com") == true) {
return "learn.canvas.net"; return "learn.canvas.net";
} }
return url; return url;
} }
function setCloakCookie(name, url) { function setCloakCookie(name, url) {
console.log(name + url); console.log(name + url);
if (!(url == null)) { if (!(url == null)) {
document.cookie = document.cookie = "tabicon=" + url + "";
"tabicon=" + url + ""; document.cookie = "tabname=" + name;
document.cookie = "tabname=" + name; setCloak();
setCloak(); } else {
} else { url = cloakExceptions($("#webicon").val());
url = cloakExceptions($("#webicon").val()); document.cookie = "tabicon=https://s2.googleusercontent.com/s2/favicons?domain_url=" + url;
document.cookie = document.cookie = "tabname=" + $("#webname").val();
"tabicon=https://s2.googleusercontent.com/s2/favicons?domain_url=" + url; setCloak();
document.cookie = "tabname=" + $("#webname").val(); }
setCloak();
}
} }
function clearCloak() { function clearCloak() {
document.cookie = "tabicon=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; document.cookie = "tabicon=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
document.cookie = "tabname=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"; document.cookie = "tabname=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
var link = document.querySelector("link[rel~='icon']"); var link = document.querySelector("link[rel~='icon']");
link.remove(); link.remove();
document.title = "Settings | Selenite"; document.title = "Settings | Selenite";
link = document.createElement("link"); link = document.createElement("link");
link.rel = "icon"; link.rel = "icon";
document.head.appendChild(link); document.head.appendChild(link);
link.href = "/favicon.png"; link.href = "/favicon.png";
} }
function loadCloaks() { async function loadCloaks() {
var presetCloaks = document.getElementById("presetCloaks"); const response = await fetch("/cloaks.json");
presetCloaks.onchange = (event) => { cloaklist = await response.json();
console.log(event.target.value); var presetCloaks = document.getElementById("presetCloaks");
console.log(cloaklist[event.target.value]); presetCloaks.onchange = (event) => {
setCloakCookie( console.log(event.target.value);
cloaklist[event.target.value][0], console.log(cloaklist[event.target.value]);
cloaklist[event.target.value][1] setCloakCookie(cloaklist[event.target.value][0], cloaklist[event.target.value][1]);
); };
};
} }
document.addEventListener('DOMContentLoaded', function() { document.addEventListener("DOMContentLoaded", function () {
loadCloaks(); loadCloaks();
}) });

View File

@ -16,10 +16,12 @@ function check() {
} }
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
if(document.getElementById("adcontainer") && Math.random() > 0.5 || localStorage.getItem("selenite.adblock") == "true") { if(document.querySelectorAll('[id=adcontainer]')) {
document.getElementById("adcontainer").innerHTML = ""; for(let i = 0; i < document.querySelectorAll('[id=adcontainer]').length; i++) {
if(Math.random() < 0.5 || localStorage.getItem("selenite.adblock") == "true")
document.querySelectorAll('[id=adcontainer]')[i].innerHTML = "";
}
} }
const iconSetting = document.querySelector("input#discordIcon"); const iconSetting = document.querySelector("input#discordIcon");
const blockClose = document.querySelector("input#blockClose"); const blockClose = document.querySelector("input#blockClose");
const openBlank = document.getElementById("blank"); const openBlank = document.getElementById("blank");

View File

@ -116,6 +116,11 @@
<a href="/suggest.html"><div class="suggest"><img src="img/addlink.svg" alt="Add Game logo" style="filter: invert(1);"><h1>Suggest a game!</h1></div></a> <a href="/suggest.html"><div class="suggest"><img src="img/addlink.svg" alt="Add Game logo" style="filter: invert(1);"><h1>Suggest a game!</h1></div></a>
<p id="message">games loading..</p> <p id="message">games loading..</p>
</div> </div>
<div id="adcontainer">
<h3><a href="ad.html">AD (click to read more):</a></h3>
<script async="async" data-cfasync="false" src="//pl22225360.toprevenuegate.com/92108816b5da54426d1639bcbfb5785c/invoke.js"></script>
<div id="container-92108816b5da54426d1639bcbfb5785c"></div>
</div>
</main> </main>

View File

@ -46,6 +46,9 @@
<a href="https://patreon.com/selenitecc"><img src="img/Digital-Patreon-Logo_White.png"></a> <a href="https://patreon.com/selenitecc"><img src="img/Digital-Patreon-Logo_White.png"></a>
</div> </div>
</div> </div>
<p>also viewing this ad will help me :)</p>
<script async="async" data-cfasync="false" src="//pl22225360.toprevenuegate.com/92108816b5da54426d1639bcbfb5785c/invoke.js"></script>
<div id="container-92108816b5da54426d1639bcbfb5785c"></div>
</main> </main>
<footer class="noscroll"> <footer class="noscroll">