Skip to content

Commit 54cfe31

Browse files
authored
Merge branch 'main' into main
2 parents 572eac0 + e6c0a2e commit 54cfe31

File tree

13 files changed

+344
-54
lines changed

13 files changed

+344
-54
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ As of January 1st 2024, Replit is [no longer free](https://blog.replit.com/hosti
4444
2. Click "Code" (green button) and then "Create Codespace on main."
4545
3. In the terminal at the bottom, paste `npm i && npm run start`.
4646
4. Respond to the application popup by clicking "Make public."
47-
> Make sure you actually click the "Make public." button, or the proxy won't function properly.
47+
> Make sure you actually click the "Make public." button, or the proxy won't function properly.
4848
5. Access the deployed website from the ports tab.
4949
6. For subsequent uses in the same codespace, just run `npm run start`
5050

config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ const config = {
55
interstellar: 'password',
66
}
77
}
8-
export default config;
8+
export default config

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import express from 'express'
2-
import basicAuth from "express-basic-auth";
2+
import basicAuth from 'express-basic-auth'
33
import http from 'node:http'
44
import { createBareServer } from '@tomphttp/bare-server-node'
55
import path from 'node:path'
@@ -28,6 +28,7 @@ const routes = [
2828
{ path: '/0', file: 'tabs.html' },
2929
{ path: '/&', file: 'go.html' },
3030
{ path: '/w', file: 'edu.html' },
31+
{ path: '/e', file: 'now.html' },
3132
]
3233

3334
app.get('/y/*', cors({ origin: false }), async (req, res, next) => {

static/apps.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<input type="text" id="searchbarbottom" onkeyup="search_bar()" placeholder="Search" />
3737
<select id="category" name="category" onchange="show_category()">
3838
<option value="all">All</option>
39+
<option value="android">Android Emulator</option>
3940
<option value="social">Social</option>
4041
<option value="stream">Streaming</option>
4142
<option value="message">Messaging</option>
172 KB
Loading

static/assets/scripts/apps.js

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,25 +256,39 @@ document.addEventListener('DOMContentLoaded', () => {
256256
name: 'Roblox (Now.GG)',
257257
link: 'https://now.gg/iframe/snippet?app_pkg=com.roblox.client&partner=interstellar',
258258
image: '/assets/media/icons/roblox.png',
259-
categories: ['all', 'emu'],
259+
categories: ['all', 'emu', 'android'],
260+
now: true,
260261
},
261262
{
262263
name: 'Now.GG',
263264
link: 'https://now.gg',
264265
image: '/assets/media/icons/now-gg.png',
265-
categories: ['all', 'emu'],
266+
categories: ['all', 'emu', 'android'],
266267
},
267268
{
268269
name: 'Roblox (NowGG.nl)',
269270
link: 'https://nowgg.nl/iframe/snippet?app_pkg=com.roblox.client&partner=interstellar',
270271
image: '/assets/media/icons/astroid.png',
271-
categories: ['all', 'emu'],
272+
categories: ['all', 'emu', 'android'],
273+
now: true,
274+
},
275+
{
276+
name: 'Roblox (NowGG.me)',
277+
link: 'https://nowgg.me/apps/roblox-corporation/5349/roblox.html',
278+
image: '/assets/media/icons/shuttle.png',
279+
categories: ['all', 'emu', 'android'],
272280
},
273281
{
274282
name: 'Now.GG (NowGG.nl)',
275283
link: 'https://nowgg.nl',
276284
image: '/assets/media/icons/astroid.png',
277-
categories: ['all', 'emu'],
285+
categories: ['all', 'emu', 'android'],
286+
},
287+
{
288+
name: 'Now.GG (NowGG.me)',
289+
link: 'https://nowgg.me',
290+
image: '/assets/media/icons/shuttle.png',
291+
categories: ['all', 'emu', 'android'],
278292
},
279293
{
280294
name: 'Amazon Luna',
@@ -338,6 +352,14 @@ document.addEventListener('DOMContentLoaded', () => {
338352
blank(app.link)
339353
return false
340354
}
355+
} else if (app.now) {
356+
link.onclick = function () {
357+
if (typeof app.say !== 'undefined') {
358+
alert(app.say)
359+
}
360+
now(app.link)
361+
return false
362+
}
341363
} else {
342364
link.onclick = function () {
343365
if (typeof app.say !== 'undefined') {

static/assets/scripts/g.js

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,25 +1496,39 @@ document.addEventListener('DOMContentLoaded', () => {
14961496
name: 'Roblox (Now.GG)',
14971497
link: 'https://now.gg/iframe/snippet?app_pkg=com.roblox.client&partner=interstellar',
14981498
image: '/assets/media/icons/roblox.png',
1499-
categories: ['all', 'emu'],
1499+
categories: ['all', 'emu', 'android'],
1500+
now: true,
15001501
},
15011502
{
15021503
name: 'Now.GG',
15031504
link: 'https://now.gg',
15041505
image: '/assets/media/icons/now-gg.png',
1505-
categories: ['all', 'emu'],
1506+
categories: ['all', 'emu', 'android'],
15061507
},
15071508
{
15081509
name: 'Roblox (NowGG.nl)',
15091510
link: 'https://nowgg.nl/iframe/snippet?app_pkg=com.roblox.client&partner=interstellar',
15101511
image: '/assets/media/icons/astroid.png',
1511-
categories: ['all', 'emu'],
1512+
categories: ['all', 'emu', 'android'],
1513+
now: true,
1514+
},
1515+
{
1516+
name: 'Roblox (NowGG.me)',
1517+
link: 'https://nowgg.me/apps/roblox-corporation/5349/roblox.html',
1518+
image: '/assets/media/icons/shuttle.png',
1519+
categories: ['all', 'emu', 'android'],
15121520
},
15131521
{
15141522
name: 'Now.GG (NowGG.nl)',
15151523
link: 'https://nowgg.nl',
15161524
image: '/assets/media/icons/astroid.png',
1517-
categories: ['all', 'emu'],
1525+
categories: ['all', 'emu', 'android'],
1526+
},
1527+
{
1528+
name: 'Now.GG (NowGG.me)',
1529+
link: 'https://nowgg.me',
1530+
image: '/assets/media/icons/shuttle.png',
1531+
categories: ['all', 'emu', 'android'],
15181532
},
15191533
{
15201534
name: 'Parappa the Rapper',
@@ -1623,8 +1637,7 @@ document.addEventListener('DOMContentLoaded', () => {
16231637
if (typeof app.say !== 'undefined') {
16241638
alert(app.say)
16251639
}
1626-
saveToLocal(app.link)
1627-
window.location.href = '/w'
1640+
window.location.href = app.link
16281641
return false
16291642
}
16301643
} else if (app.blank) {
@@ -1635,6 +1648,14 @@ document.addEventListener('DOMContentLoaded', () => {
16351648
blank(app.link)
16361649
return false
16371650
}
1651+
} else if (app.now) {
1652+
link.onclick = function () {
1653+
if (typeof app.say !== 'undefined') {
1654+
alert(app.say)
1655+
}
1656+
now(app.link)
1657+
return false
1658+
}
16381659
} else {
16391660
link.onclick = function () {
16401661
if (typeof app.say !== 'undefined') {

static/assets/scripts/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ function images(value) {
3131
})
3232
}
3333

34+
function now(value) {
35+
let iframe = document.querySelector('.iframe.active')
36+
window.navigator.serviceWorker
37+
.register('./sw.js', {
38+
scope: __uv$config.prefix,
39+
})
40+
.then(() => {
41+
let url = value.trim()
42+
if (!isUrl(url)) url = 'https://www.google.com/search?q=' + url
43+
else if (!(url.startsWith('https://') || url.startsWith('http://'))) url = 'https://' + url
44+
sessionStorage.setItem('encodedUrl', __uv$config.encodeUrl(url))
45+
location.href = '/e'
46+
})
47+
}
48+
3449
function blank(value) {
3550
let iframe = document.querySelector('.iframe.active')
3651
window.navigator.serviceWorker

static/assets/scripts/now.js

Lines changed: 137 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,157 @@
11
function styledLog(message, style) {
2-
console.log(`%c${message}`, style);
2+
console.log(`%c${message}`, style)
33
}
44

5-
function runTopLogs() {
6-
console.log('%cdiscord.gg/interstellar', 'font-weight: bold; font-size: 39px; color: red; text-shadow: 3px 3px 0 rgb(217,31,38), 6px 6px 0 rgb(226,91,14), 9px 9px 0 rgb(245,221,8), 12px 12px 0 rgb(5,148,68), 15px 15px 0 rgb(2,135,206), 18px 18px 0 rgb(4,77,145), 21px 21px 0 rgb(42,21,113); margin-bottom: 12px; padding: 5%;');
7-
console.log('%cCredits to @xbubbo and @xderpman on Discord.', 'font-weight: bold; font-size: 20px; color: blue;');
8-
console.log('%cYou can use this code with proper credits.', 'font-weight: bold; font-size: 20px; color: purple;');
9-
}
5+
// Made by discord.gg/interstellar
6+
// Credits to @xbubbo and @xderpman on Discord
7+
// You can use this code with proper credits.
108

11-
var adjustmentCompleted = false;
12-
var attempts = 0;
9+
var adjustmentCompleted = false
10+
var attempts = 0
1311

1412
function adjustElements() {
15-
if (adjustmentCompleted) {
16-
console.log('%cNow.GG Adjustment already completed. Stopping script.', 'font-size: 30px; color: green;');
17-
return true;
13+
if (adjustmentCompleted) {
14+
console.log('%cNow.GG Adjustment already completed. Stopping script.', 'font-size: 15px; color: green;')
15+
return true
16+
}
17+
18+
var iframe = top.document.getElementById('iframeId')
19+
20+
if (iframe) {
21+
var innerDoc = iframe.contentWindow.document
22+
23+
var roblox = innerDoc.getElementById('js-game-video')
24+
var controlBar = innerDoc.getElementById('ng-control-bar')
25+
var fullscreen = innerDoc.getElementById('ng-fs') || innerDoc.querySelector('.sc-kOcGyv.dkAhwC')
26+
27+
if (roblox && controlBar) {
28+
roblox.style.top = '415px'
29+
controlBar.style.top = '91%'
30+
console.log('%cSuccessfully adjusted Now.GG.', 'font-size: 15px; color: green;')
31+
32+
if (fullscreen) {
33+
// Remove any existing event listeners before adding a new one
34+
fullscreen.removeEventListener('mousedown', fullscreenClickHandler)
35+
36+
// Add the event listener
37+
fullscreen.addEventListener('mousedown', fullscreenClickHandler)
38+
} else {
39+
console.log('%cFullscreen button not found.', 'font-size: 15px; color: red;')
40+
}
41+
42+
adjust()
43+
44+
return true
45+
} else {
46+
console.log('%cFailed to find elements (roblox or controlBar).', 'font-size: 15px; color: red;')
47+
return false
1848
}
49+
} else {
50+
console.log('%cFailed to find iframe with the specified ID.', 'font-size: 15px; color: red;')
51+
return false
52+
}
53+
}
54+
55+
function CheckAndAdjust() {
56+
var intervalId = setInterval(function () {
57+
RunTopLogs()
58+
attempts++
59+
if (adjustElements()) {
60+
clearInterval(intervalId)
61+
} else if (attempts >= 10) {
62+
console.log(
63+
'%cNow.GG Script ran 10 times without finding elements. Stopping script.',
64+
'font-size: 15px; color: red;'
65+
)
66+
clearInterval(intervalId)
67+
}
68+
}, 5000)
69+
}
1970

20-
var iframe = top.document.getElementById('iframeId');
71+
function adjust() {
72+
setInterval(function () {
73+
var iframe = top.document.getElementById('iframeId')
2174

2275
if (iframe) {
23-
var innerDoc = iframe.contentWindow.document;
76+
var innerDoc = iframe.contentWindow.document
2477

25-
var roblox = innerDoc.getElementById('js-game-video');
26-
var controlBar = innerDoc.getElementById('ng-control-bar');
78+
var roblox = innerDoc.getElementById('js-game-video')
79+
var controlBar = innerDoc.getElementById('ng-control-bar')
80+
var customClassElement = innerDoc.querySelector('.sc-rUGft.hLgqJJ')
2781

28-
if (roblox && controlBar) {
29-
roblox.style.top = '295px';
30-
controlBar.style.top = '90%';
31-
console.log('%cSuccessfully adjusted Now.GG.', 'font-size: 30px; color: green;');
82+
if (roblox) {
83+
checkAndAdjustStyles(roblox, 'top', ['415px'])
84+
}
3285

33-
adjustmentCompleted = true;
86+
if (controlBar) {
87+
checkAndAdjustStyles(controlBar, 'top', ['91%'])
88+
}
3489

35-
return true;
36-
} else {
37-
console.log('%cFailed to find elements (roblox or controlBar).', 'font-size: 15px; color: red;');
38-
return false;
39-
}
90+
if (customClassElement) {
91+
customClassElement.remove()
92+
console.log('%cRemoved class "sc-rUGft hLgqJJ".', 'font-size: 15px; color: green;')
93+
}
4094
} else {
41-
console.log('%cFailed to find iframe with the specified ID.', 'font-size: 15px; color: red;');
42-
return false;
95+
console.log('%cFailed to find iframe with the specified ID.', 'font-size: 15px; color: red;')
4396
}
97+
}, 3000)
4498
}
4599

46-
function checkAndAdjust() {
47-
var intervalId = setInterval(function () {
48-
runTopLogs();
49-
attempts++;
50-
if (adjustElements()) {
51-
clearInterval(intervalId);
52-
} else if (attempts >= 5) {
53-
console.log('%cNow.GG Script ran 5 times without finding elements. Stopping script.', 'font-size: 15px; color: red;');
54-
clearInterval(intervalId);
55-
}
56-
}, 7000);
100+
function checkAndAdjustStyles(element, property, targetValues) {
101+
if (element) {
102+
var currentStyle = window.getComputedStyle(element)[property]
103+
104+
if (!targetValues.includes(currentStyle)) {
105+
element.style[property] = targetValues[0]
106+
console.log(`%cAdjusted ${property} to ${targetValues[0]}.`, 'font-size: 15px; color: green;')
107+
}
108+
} else {
109+
console.log('%cElement is null. Skipping check and adjustment.', 'font-size: 15px; color: red;')
110+
}
111+
}
112+
113+
function RunTopLogs() {
114+
console.log(
115+
'%cdiscord.gg/interstellar',
116+
'font-weight: bold; font-size: 39px; color: red; text-shadow: 3px 3px 0 rgb(217,31,38), 6px 6px 0 rgb(226,91,14), 9px 9px 0 rgb(245,221,8), 12px 12px 0 rgb(5,148,68), 15px 15px 0 rgb(2,135,206), 18px 18px 0 rgb(4,77,145), 21px 21px 0 rgb(42,21,113); margin-bottom: 12px; padding: 5%;'
117+
)
118+
}
119+
120+
var heightAdjusted = false
121+
122+
function fullscreenClickHandler(event) {
123+
if (event.detail > 1) {
124+
event.preventDefault()
125+
return
126+
}
127+
128+
console.log('%cFullscreen button clicked.', 'font-size: 15px; color: orange;')
129+
130+
console.log('%cAdjusting height to 415px...', 'font-size: 15px; color: orange;')
131+
132+
var iframe = top.document.getElementById('iframeId')
133+
if (iframe) {
134+
var innerDoc = iframe.contentWindow.document
135+
var roblox = innerDoc.getElementById('js-game-video')
136+
137+
setTimeout(function () {
138+
if (roblox) {
139+
roblox.style.top = '415px'
140+
console.log('%cHeight adjusted to 415px.', 'font-size: 15px; color: green;')
141+
heightAdjusted = true
142+
}
143+
}, 3000)
144+
}
145+
146+
var fullscreen = innerDoc.getElementById('ng-fs') || innerDoc.querySelector('.sc-kOcGyv.dkAhwC')
147+
if (fullscreen) {
148+
fullscreen.removeEventListener('mousedown', fullscreenClickHandler)
149+
150+
if (!heightAdjusted) {
151+
fullscreen.addEventListener('mousedown', fullscreenClickHandler)
152+
}
153+
}
57154
}
58155

59-
checkAndAdjust();
60-
console.log('%cNow.GG Adjustment script started. Checking every 7 seconds.', 'font-size: 15px; color: blue;');
156+
CheckAndAdjust()
157+
console.log('%cNow.GG Adjustment script started. Checking every 5 seconds.', 'font-size: 15px; color: blue;')

static/assets/styles/main.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ select {
366366
justify-content: center;
367367
gap: 2.3em;
368368
flex-direction: row;
369+
margin-top: 10px;
369370
}
370371
.pinned-apps {
371372
margin-top: 20px;

0 commit comments

Comments
 (0)