Skip to content

Commit 2900dfd

Browse files
committed
Now.GG Fix + Minor Bug Fix + Added NowGG.me
1 parent c774bbd commit 2900dfd

File tree

11 files changed

+339
-53
lines changed

11 files changed

+339
-53
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const routes = [
2323
{ path: '/0', file: 'tabs.html' },
2424
{ path: '/&', file: 'go.html' },
2525
{ path: '/w', file: 'edu.html' },
26+
{ path: '/e', file: 'now.html' },
27+
2628
]
2729

2830
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: 39 additions & 17 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',
@@ -325,29 +339,37 @@ document.addEventListener('DOMContentLoaded', () => {
325339
if (app.local) {
326340
link.onclick = function () {
327341
if (typeof app.say !== 'undefined') {
328-
alert(app.say)
342+
alert(app.say);
329343
}
330-
window.location.href = app.link
331-
return false
332-
}
344+
window.location.href = app.link;
345+
return false;
346+
};
333347
} else if (app.blank) {
334348
link.onclick = function () {
335349
if (typeof app.say !== 'undefined') {
336-
alert(app.say)
350+
alert(app.say);
337351
}
338-
blank(app.link)
339-
return false
340-
}
352+
blank(app.link);
353+
return false;
354+
};
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') {
344-
alert(app.say)
366+
alert(app.say);
345367
}
346-
images(app.link)
347-
return false
348-
}
368+
images(app.link);
369+
return false;
370+
};
349371
}
350-
372+
351373
const image = document.createElement('img')
352374
image.width = 145
353375
image.height = 145

static/assets/scripts/g.js

Lines changed: 39 additions & 18 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',
@@ -1621,30 +1635,37 @@ document.addEventListener('DOMContentLoaded', () => {
16211635
if (app.local) {
16221636
link.onclick = function () {
16231637
if (typeof app.say !== 'undefined') {
1624-
alert(app.say)
1638+
alert(app.say);
16251639
}
1626-
saveToLocal(app.link)
1627-
window.location.href = '/w'
1628-
return false
1629-
}
1640+
window.location.href = app.link;
1641+
return false;
1642+
};
16301643
} else if (app.blank) {
16311644
link.onclick = function () {
16321645
if (typeof app.say !== 'undefined') {
1633-
alert(app.say)
1646+
alert(app.say);
16341647
}
1635-
blank(app.link)
1636-
return false
1637-
}
1648+
blank(app.link);
1649+
return false;
1650+
};
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') {
1641-
alert(app.say)
1662+
alert(app.say);
16421663
}
1643-
images(app.link)
1644-
return false
1645-
}
1664+
images(app.link);
1665+
return false;
1666+
};
16461667
}
1647-
1668+
16481669
const image = document.createElement('img')
16491670
image.width = 145
16501671
image.height = 145

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: 109 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@ function styledLog(message, style) {
22
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

119
var adjustmentCompleted = false;
1210
var attempts = 0;
1311

1412
function adjustElements() {
1513
if (adjustmentCompleted) {
16-
console.log('%cNow.GG Adjustment already completed. Stopping script.', 'font-size: 30px; color: green;');
14+
console.log('%cNow.GG Adjustment already completed. Stopping script.', 'font-size: 15px; color: green;');
1715
return true;
1816
}
1917

@@ -24,13 +22,24 @@ function adjustElements() {
2422

2523
var roblox = innerDoc.getElementById('js-game-video');
2624
var controlBar = innerDoc.getElementById('ng-control-bar');
25+
var fullscreen = innerDoc.getElementById('ng-fs') || innerDoc.querySelector('.sc-kOcGyv.dkAhwC');
2726

2827
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;');
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);
3235

33-
adjustmentCompleted = true;
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();
3443

3544
return true;
3645
} else {
@@ -43,18 +52,101 @@ function adjustElements() {
4352
}
4453
}
4554

46-
function checkAndAdjust() {
55+
function CheckAndAdjust() {
4756
var intervalId = setInterval(function () {
48-
runTopLogs();
57+
RunTopLogs();
4958
attempts++;
5059
if (adjustElements()) {
5160
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;');
61+
} else if (attempts >= 10) {
62+
console.log('%cNow.GG Script ran 10 times without finding elements. Stopping script.', 'font-size: 15px; color: red;');
5463
clearInterval(intervalId);
5564
}
56-
}, 7000);
65+
}, 5000);
66+
}
67+
68+
function adjust() {
69+
setInterval(function () {
70+
var iframe = top.document.getElementById('iframeId');
71+
72+
if (iframe) {
73+
var innerDoc = iframe.contentWindow.document;
74+
75+
var roblox = innerDoc.getElementById('js-game-video');
76+
var controlBar = innerDoc.getElementById('ng-control-bar');
77+
var customClassElement = innerDoc.querySelector('.sc-rUGft.hLgqJJ');
78+
79+
if (roblox) {
80+
checkAndAdjustStyles(roblox, 'top', ['415px']);
81+
}
82+
83+
if (controlBar) {
84+
checkAndAdjustStyles(controlBar, 'top', ['91%']);
85+
}
86+
87+
if (customClassElement) {
88+
customClassElement.remove();
89+
console.log('%cRemoved class "sc-rUGft hLgqJJ".', 'font-size: 15px; color: green;');
90+
}
91+
92+
} else {
93+
console.log('%cFailed to find iframe with the specified ID.', 'font-size: 15px; color: red;');
94+
}
95+
}, 3000);
96+
}
97+
98+
function checkAndAdjustStyles(element, property, targetValues) {
99+
if (element) {
100+
var currentStyle = window.getComputedStyle(element)[property];
101+
102+
if (!targetValues.includes(currentStyle)) {
103+
element.style[property] = targetValues[0];
104+
console.log(`%cAdjusted ${property} to ${targetValues[0]}.`, 'font-size: 15px; color: green;');
105+
}
106+
} else {
107+
console.log('%cElement is null. Skipping check and adjustment.', 'font-size: 15px; color: red;');
108+
}
109+
}
110+
111+
function RunTopLogs() {
112+
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%;');
113+
}
114+
115+
var heightAdjusted = false;
116+
117+
function fullscreenClickHandler(event) {
118+
if (event.detail > 1) {
119+
event.preventDefault();
120+
return;
121+
}
122+
123+
console.log('%cFullscreen button clicked.', 'font-size: 15px; color: orange;');
124+
125+
console.log('%cAdjusting height to 415px...', 'font-size: 15px; color: orange;');
126+
127+
var iframe = top.document.getElementById('iframeId');
128+
if (iframe) {
129+
var innerDoc = iframe.contentWindow.document;
130+
var roblox = innerDoc.getElementById('js-game-video');
131+
132+
setTimeout(function () {
133+
if (roblox) {
134+
roblox.style.top = '415px';
135+
console.log('%cHeight adjusted to 415px.', 'font-size: 15px; color: green;');
136+
heightAdjusted = true;
137+
}
138+
}, 3000);
139+
}
140+
141+
var fullscreen = innerDoc.getElementById('ng-fs') || innerDoc.querySelector('.sc-kOcGyv.dkAhwC');
142+
if (fullscreen) {
143+
fullscreen.removeEventListener('mousedown', fullscreenClickHandler);
144+
145+
if (!heightAdjusted) {
146+
fullscreen.addEventListener('mousedown', fullscreenClickHandler);
147+
}
148+
}
57149
}
58150

59-
checkAndAdjust();
60-
console.log('%cNow.GG Adjustment script started. Checking every 7 seconds.', 'font-size: 15px; color: blue;');
151+
CheckAndAdjust();
152+
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)