diff --git a/.prettierignore b/.prettierignore index 82e6d2c14..2adf16a3f 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,4 +4,6 @@ package-lock.json package.json /static/m/ /static/dy/ -**/*.min.* \ No newline at end of file +**/*.min.* +prettierrc +eslintrc.cjs diff --git a/README.md b/README.md index ecb2e089c..575441288 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ As of January 1st, 2024, Replit is [no longer free](https://blog.replit.com/host 2. Click "Code" (green button) and then "Create Codespace on main." 3. In the terminal at the bottom, paste `pnpm i && pnpm start`. 4. Respond to the application popup by clicking "Make public." -> [!IMPORTANT] -> Make sure you actually click the "Make public." button, or the proxy won't function properly. + > [!IMPORTANT] + > Make sure you actually click the "Make public." button, or the proxy won't function properly. 5. Access the deployed website from the ports tab. 6. For subsequent uses in the same codespace, just run `pnpm start` diff --git a/index.js b/index.js index 1f8c90e9b..7479554d9 100644 --- a/index.js +++ b/index.js @@ -43,41 +43,41 @@ if (config.routes !== false) { }) } -if (config.local !== false) { +if (config.local !== false) { app.get('/e/*', (req, res, next) => { const baseUrls = [ 'https://raw.githubusercontent.com/v-5x/x/fixy', 'https://raw.githubusercontent.com/ypxa/y/main', 'https://raw.githubusercontent.com/ypxa/w/master', - ]; - fetchData(req, res, next, baseUrls); - }); + ] + fetchData(req, res, next, baseUrls) + }) } const fetchData = async (req, res, next, baseUrls) => { try { - const reqTarget = baseUrls.map(baseUrl => `${baseUrl}/${req.params[0]}`); - let data; - let asset; + const reqTarget = baseUrls.map((baseUrl) => `${baseUrl}/${req.params[0]}`) + let data + let asset for (const target of reqTarget) { - asset = await fetch(target); + asset = await fetch(target) if (asset.ok) { - data = await asset.arrayBuffer(); - break; + data = await asset.arrayBuffer() + break } } if (data) { - res.end(Buffer.from(data)); + res.end(Buffer.from(data)) } else { - next(); + next() } } catch (error) { - console.error('Error fetching:', error); - next(error); + console.error('Error fetching:', error) + next(error) } -}; +} server.on('request', (req, res) => { if (bareServer.shouldRoute(req)) { diff --git a/static/assets/scripts/frame.js b/static/assets/scripts/frame.js index 3ae4ce370..a797d799d 100644 --- a/static/assets/scripts/frame.js +++ b/static/assets/scripts/frame.js @@ -20,16 +20,15 @@ function iframeLoad() { if (website.includes('/a/')) { const website = iframe.contentWindow?.location.href.replace(window.location.origin, '').replace('/a/', '') document.getElementById('is').value = decodeXor(website) - localStorage.setItem('decoded', decodeXor(website)); + localStorage.setItem('decoded', decodeXor(website)) } else if (website.includes('/a/q/')) { const website = iframe.contentWindow?.location.href.replace(window.location.origin, '').replace('/a/q/', '') document.getElementById('is').value = decodeXor(website) - localStorage.setItem('decoded', decodeXor(website)); + localStorage.setItem('decoded', decodeXor(website)) } } } - // Reload function reload() { if (iframe) { @@ -139,61 +138,61 @@ document.addEventListener('fullscreenchange', function () { document.body.classList.toggle('fullscreen', isFullscreen) }) // Now -let decodedSet = false; -const decoded = localStorage.getItem('decoded'); -const key = ['nowgg', 'now.gg']; +let decodedSet = false +const decoded = localStorage.getItem('decoded') +const key = ['nowgg', 'now.gg'] if (localStorage.getItem('decoded') !== null) { - decodedSet = true; - console.log('Starting process.'); - now(); + decodedSet = true + console.log('Starting process.') + now() } else { - decodedSet = false; - console.log('Decoded not found.'); + decodedSet = false + console.log('Decoded not found.') } function now() { - console.log('Executing now() function.'); + console.log('Executing now() function.') if (decoded) { - let found = false; + let found = false for (const keyword of key) { if (decoded.includes(keyword)) { - console.log(`${keyword} found`); - found = true; - break; + console.log(`${keyword} found`) + found = true + break } } if (found) { - let count = 0; - let notfound = 0; - const limit = 10; - const max = 45; + let count = 0 + let notfound = 0 + const limit = 10 + const max = 45 const reloadInterval = setInterval(() => { if (count < limit && iframe) { - const iframeDocument = iframe.contentDocument || iframe.contentWindow.document; - const element = iframeDocument.querySelector('.sc-hGPBjI.gGkQpt'); + const iframeDocument = iframe.contentDocument || iframe.contentWindow.document + const element = iframeDocument.querySelector('.sc-hGPBjI.gGkQpt') if (element) { - console.log("Class found inside the iframe."); - document.querySelector('.overlay').style.display = 'block'; - document.getElementById('ifra').style.display = 'none'; - iframeDocument.location.reload(); - count += 1; - notfound = 0; + console.log('Class found inside the iframe.') + document.querySelector('.overlay').style.display = 'block' + document.getElementById('ifra').style.display = 'none' + iframeDocument.location.reload() + count += 1 + notfound = 0 } else { - console.log("Class not found inside the iframe."); - notfound += 1; + console.log('Class not found inside the iframe.') + notfound += 1 if (notfound >= max) { - clearInterval(reloadInterval); - document.getElementById('ifra').style.display = 'block'; - document.querySelector('.overlay').style.display = 'none'; + clearInterval(reloadInterval) + document.getElementById('ifra').style.display = 'block' + document.querySelector('.overlay').style.display = 'none' } } } else { - clearInterval(reloadInterval); + clearInterval(reloadInterval) } - }, 500); + }, 500) } } else { - console.log('Decoded not found in localStorage.'); + console.log('Decoded not found in localStorage.') } } diff --git a/static/assets/scripts/g.js b/static/assets/scripts/g.js index 36e52541b..8eee1d170 100644 --- a/static/assets/scripts/g.js +++ b/static/assets/scripts/g.js @@ -14,12 +14,12 @@ document.addEventListener('DOMContentLoaded', () => { var appInd = 0 appsList.forEach((app) => { - const isLocal = app.categories.includes("local"); - + const isLocal = app.categories.includes('local') + if (isLocal) { - app.local = true; + app.local = true } - + let pinNum = appInd const columnDiv = document.createElement('div') @@ -45,7 +45,7 @@ document.addEventListener('DOMContentLoaded', () => { btn.title = 'Pin' const link = document.createElement('a') - + function saveToLocal(path) { sessionStorage.setItem('GoUrl', path) } diff --git a/static/assets/scripts/settings.js b/static/assets/scripts/settings.js index 4550a3452..5ad73c5fe 100644 --- a/static/assets/scripts/settings.js +++ b/static/assets/scripts/settings.js @@ -87,20 +87,20 @@ function saveEventKey() { localStorage.setItem('pLink', pLink) } // Tab Cloaker -var dropdown = document.getElementById('dropdown'); -var options = dropdown.getElementsByTagName('option'); - -var sortedOptions = Array.from(options).sort(function(a, b) { - return a.textContent.localeCompare(b.textContent); -}); +var dropdown = document.getElementById('dropdown') +var options = dropdown.getElementsByTagName('option') + +var sortedOptions = Array.from(options).sort(function (a, b) { + return a.textContent.localeCompare(b.textContent) +}) while (dropdown.firstChild) { - dropdown.removeChild(dropdown.firstChild); + dropdown.removeChild(dropdown.firstChild) } -sortedOptions.forEach(function(option) { - dropdown.appendChild(option); -}); +sortedOptions.forEach(function (option) { + dropdown.appendChild(option) +}) function saveIcon() { const iconElement = document.getElementById('icon') diff --git a/static/assets/styles/frame.css b/static/assets/styles/frame.css index 2d52445e4..000b36c08 100644 --- a/static/assets/styles/frame.css +++ b/static/assets/styles/frame.css @@ -7,7 +7,7 @@ body { margin: 0; overflow-x: hidden; overflow-y: hidden; - background: var(--main) + background: var(--main); } iframe { @@ -158,19 +158,18 @@ iframe { } h1 { -text-align: center; -color: white; -font-size: 50px; -white-space: nowrap; + text-align: center; + color: white; + font-size: 50px; + white-space: nowrap; } p { -text-align: center; -color: white; -font-size: 25px; + text-align: center; + color: white; + font-size: 25px; } a { -color: #6495ED + color: #6495ed; } - diff --git a/static/assets/styles/settings.css b/static/assets/styles/settings.css index 001b003b1..acdbb8d05 100644 --- a/static/assets/styles/settings.css +++ b/static/assets/styles/settings.css @@ -157,14 +157,12 @@ select { outline: none; } - - @media screen and (max-width: 768px) { .settings-container { - padding: 25% 20px 20px 20px; + padding: 25% 20px 20px 20px; } .settings-card { - width: 100%; + width: 100%; max-width: 400px; } @@ -174,29 +172,28 @@ select { input, .key-form { - width: 90%; + width: 90%; } button, .key-button { - width: 100%; + width: 100%; max-width: 200px; } } @media screen and (max-width: 500px) { .settings-container { - padding-top: 35%; + padding-top: 35%; } } - @media screen and (min-width: 1000px) { .settings-container { - padding-top: 10%; + padding-top: 10%; } } #last-updated { margin-top: -3%; -} \ No newline at end of file +} diff --git a/static/games.html b/static/games.html index 72de726c0..92015611d 100644 --- a/static/games.html +++ b/static/games.html @@ -11,7 +11,7 @@ - +
diff --git a/static/go.html b/static/go.html index e5e77283b..f36c0c39e 100644 --- a/static/go.html +++ b/static/go.html @@ -6,7 +6,7 @@ Home - + @@ -43,10 +43,14 @@
-

Now.gg fix is being applied, please wait.

-

It should only take 1-2 minutes, if it takes longer clear your cache or join our discord!

-
- - + diff --git a/static/settings.html b/static/settings.html index 6a138f338..ff3c139d0 100644 --- a/static/settings.html +++ b/static/settings.html @@ -9,7 +9,7 @@ Home - + @@ -148,12 +148,15 @@

Themes!

Site Info

Version: 5.1.5

Last Updated: March 23rd, 2024

-

Questions? Need more links? Join our community at discord.gg/interstellar!

+

+ Questions? Need more links? Join our community at + discord.gg/interstellar! +

- +