diff --git a/bookmarklets.html b/bookmarklets.html index fbb89e04..0a49b99a 100644 --- a/bookmarklets.html +++ b/bookmarklets.html @@ -57,7 +57,7 @@

Bookmarklets

- Selenite Minified + Selenite Minified

Drag the link above to your bookmarks bar. This is a minified version of Selenite, that you can open at any time, without relying on a single website.

Edit any page

Drag the link above to your bookmarks bar. This allows you to edit the text of any webpage.

diff --git a/js/cookie.js b/js/cookie.js index ea705d95..9284c42f 100644 --- a/js/cookie.js +++ b/js/cookie.js @@ -2,7 +2,7 @@ function getMainSave() { var mainSave = {}; // List of items in localStorage that should not be saved - var localStorageDontSave = ["sdsadawdasdasd"]; + var localStorageDontSave = ["supportalert"]; // Convert localStorage to an array of key-value pairs and remove the items that should not be saved localStorageSave = Object.entries(localStorage); diff --git a/js/games.js b/js/games.js index 1727af27..2eabb9cb 100644 --- a/js/games.js +++ b/js/games.js @@ -158,13 +158,13 @@ function selectRandomGame() { position: "center", // `left`, `center` or `right` style: { background: - "linear-gradient(42deg, rgba(36, 69, 128, 1) 100%, rgb(24, 17, 87) 0%)", + "linear-gradient(var(--bg-1), var(--bg-2))", + boxShadow: "0px 0px 5px 5px var(--input-bg-color)", width: "25%", }, onClick: function () {}, // Callback after click }).showToast(); setTimeout(() => { redirectGame(gamelist[randomgame].directory); - s; }, 3000); } \ No newline at end of file diff --git a/js/main.js b/js/main.js index 917cee75..5b03654e 100644 --- a/js/main.js +++ b/js/main.js @@ -8,28 +8,51 @@ function check() { if ($("#panicmode").length > 0) { $("#panicmode").prop({ href: panicurl }); } + if ($(".seleniteminified").length > 0) { + $.get("https://raw.githubusercontent.com/skysthelimitt/selenite-optimized/main/build/bookmark.txt", function(data) { + $(".seleniteminified").prop({ href: data }); + }) + } } window.onload = function () { + checkAlert(); interval = setInterval(check, 50); }; -window.addEventListener("error", function (event) { +window.addEventListener( + "error", + function (event) { if (event.target instanceof HTMLImageElement) { alert( "Error: Image failed to load." + - "\nFull Image URL: " + event.target.src + - '\nPlease take a screenshot WITH THIS ERROR VISIBLE and click "Report a Bug" or go to https://forms.gle/j75WUn6UhdqsRZgf7' - ) + "\nFull Image URL: " + + event.target.src + + '\nPlease take a screenshot WITH THIS ERROR VISIBLE and click "Report a Bug" or go to https://forms.gle/j75WUn6UhdqsRZgf7' + ); event.target.src = "/favicon.png"; } else { - alert ( - "Error: " + event.message + - "\nScript: " + event.filename + - "\nLine: " + event.lineno + - "\nColumn: " + event.colno + - "\nStackTrace: " + event.error + - '\nPlease take a screenshot WITH THIS ERROR VISIBLE and click "Report a Bug" or go to https://forms.gle/j75WUn6UhdqsRZgf7' + alert( + "Error: " + + event.message + + "\nScript: " + + event.filename + + "\nLine: " + + event.lineno + + "\nColumn: " + + event.colno + + "\nStackTrace: " + + event.error + + '\nPlease take a screenshot WITH THIS ERROR VISIBLE and click "Report a Bug" or go to https://forms.gle/j75WUn6UhdqsRZgf7' ); } - }, true); + }, + true +); + +function checkAlert() { + if(!Cookies.get("supportalert")) { + alert('Welcome to Selenite!\nI\'m a single developer that works on this website, so I would appreciate your support! You can pay on Patreon by clicking the "Support" button, which will have private links, or disable your adblock to help support me!\nI work on this website for free, so any support would be appreciated! Please share this website with anyone you know, so this website can expand even more!\nGo to bookmarklets and then add "Selenite Minified" to your bookmarks to have an unblocked version 24/7 :) \nI don\'t want to be annoying, so you won\'t see this message for another 30 days :)'); + Cookies.set('supportalert', true, { expires: 31 }); + } +}