-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
336 lines (297 loc) · 12.7 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Refresh" content="0; url='https://borg.games/'" />
<link rel="canonical" href="https://borg.games/"/>
<link rel="shortcut icon" href="/favicon.svg" sizes="any" type="image/svg+xml"/>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0d0d0d">
<meta name="msapplication-TileColor" content="#101010">
<meta name="theme-color" content="#000000">
<title>Borg Games - Play Windows games in your browser</title>
<meta name="description" content="Play Minecraft and Factorio in your browser. Works on Macs, Chromebooks, smart TVs, ... everywhere. No downloads, no installs, no hassle.">
<link rel="stylesheet" href="/css/style.css">
</head>
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-16572194743"></script>
<script>
console.debug('gtag');
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'AW-16572194743');
</script>
<body class="sync-pending gog-pending release web no-nodes">
<h1 class="no-video"><span class="dev">DEV MODE -</span> Play in your browser <span id="network"></span>
<noscript><h1>Cloud gaming requires JavaScript</h1></noscript>
</h1>
<div class="video-container">
<video autoplay disablePictureInPicture id="stream"></video>
<h1 id="game-status"></h1>
<button class="action" type="button" id="video-resume" style="display: none">Resume</button>
<div id="video-overlay">
<div class="header">
Resolution: <span id="video-resolution">unknown</span>
</div>
<div class="footer">
<label>
video quality: <span id="video-quality"></span>
<br/>
<input type="range" min="1" max="80" id="video-bitrate" value="2">
</label>
</div>
</div>
<div id="notifications"></div>
</div>
<div class="content no-video">
<h2>Factorio</h2>
<button class="action" type="button" id="factorio-play">Play</button>
<div id="factorio-login">
<div class="no-nodes-message">
<h2>No nodes available - ask a friend to run one!</h2>
<p>
Know a friend with a gaming PC? Ask them to run a node so you could play!
</p>
<button class="action invite" type="button">Invite</button>
<button class="action" type="button" onclick="window.location.href = '/setup'">Setup own node</button>
</div>
<div id="factorio-login-container">
<a href="#" id="mode-switch" data-mode="steam">Use in-game login instead</a>
<form method="post" id="factorio-login-form" class="option login-mode">
<div id="factorio-credentials">
<p>
You must login in the game within a few minutes.
</p>
</div>
</form>
<form id="steam-login-form" class="option selected login-mode">
<p>
To play full game login with your Steam account:
</p>
<p>
<button id="steam-login" type="button">Log in with Steam</button>
</p>
<p>
-or-
</p>
<p>
Scan QR code with Steam Mobile App
</p>
<div id="steam-qr"></div>
</form>
</div>
<button class="action" type="button" id="factorio">Play Full Game</button>
<p></p>
<button class="action" type="button" id="factorio-demo" disabled>Run Demo</button>
</div>
<h2>Minecraft</h2>
<button class="action" type="button" id="minecraft" title="Play Minecraft">Play</button>
<div id="gog-div" class="needs-gog">
<h2>GOG</h2>
<div id="gog-tiles">
<input type="image"
src="https://images.gog-statics.com/ea259a24ad682c437b0b3e2062f56bfbf743a87d3009994bb9fae59cea7f30a1.jpg"
alt="Divinity: Original Sin 2 - Definitive Edition"
onclick="playGogGame('1584823040')"
/>
<input type="image"
src="https://images.gog-statics.com/f40142655077bfa1206119297d987d90dd77256c9504352c0e1579a23928341b.jpg"
alt="Baldur's Gate 3"
onclick="playGogGame('1456460669')"
/>
<input type="image"
src="https://images.gog-statics.com/ddedeef7636157b558d2fac8fa8a6c0d28e6fab0668c6aab7fd28220f29ec734.jpg"
alt="Skyrim: SE"
onclick="playGogGame('1711230643')"
/>
</div>
<div class="dev">
<input type="text" placeholder="GOG Game ID" id="gog-game-id">
<button class="action" type="button" id="gog" title="Play GOG game">Play</button>
</div>
</div>
<div class="mobile needs-sync no-gog">
<a href="connect/GOG.com?return=/" style="font-size: 28px;">
<img src="/img/gogcom-white-regular.png" alt="GOG.com" height="40"
style="margin-bottom: -11px; margin-right: 8px;"/>CONNECT</a>
</div>
<div class="needs-gog">
<img src="/img/gogcom-white-regular.png" alt="GOG.com" height="40"
style="margin-bottom: -11px; margin-right: 8px;"/>
<span style="font-size: 28px">CONNECTED</span>
<p>
<a id="disconnect-gog" href="disconnect/GOG.com?return=/" style="font-size: 28px;">DISCONNECT</a>
</p>
</div>
<div class="dev needs-sync" id="gog-login-prompt">
<h2>Connect your GOG.com account</h2>
<button class="action" type="button" id="gog-login"
title="Connect GOG account"
onclick="document.getElementById('gog-login-dialog').style.display='flex';">Connect</button>
<p class="mute">Currently supported:
<p class="mute">
<span>Divinity: Original Sin 2 - Definitive Edition</span>
<br/>
</p>
</div>
<h2> </h2>
<form style="display: inline-block;" action="https://forms.office.com/r/7LU5EzDLs8">
<button class="action" type="submit" style="font-size: larger;">Request a game</button>
</form>
<h2> </h2>
<a href="/setup">Securely rent your PC out for others to play on</a>
<h4> </h4>
<a href="mailto:[email protected]">🐞 Report an issue 🐞</a>
</div>
<div id="login-dialog" class="modal-dialog">
<div class="solid">
<h1>Choose where to save game progress</h1>
<h2>
<label>
Microsoft OneDrive
<br/>
<br/>
<button id="onedriveLogin" class="action" type="button"
title="Login with OneDrive to save game progress">Login
</button>
</label>
<button id="cancelLogin" class="action" type="button">Cancel</button>
</h2>
</div>
</div>
<div id="mc-login-dialog" class="modal-dialog">
<div class="solid">
<h1>Sign in with your Microsoft account to play Minecraft</h1>
<h2>Copy the code and enter it on the login page</h2>
<h3 class="copy" id="mc-code"></h3>
<a id="mc-login-link" target="_blank">Open the login page</a>
<p></p>
- or -
<button id="mc-trial" class="action" type="button">Play Trial</button>
<i>trial has 5 minute session limit</i>
</div>
</div>
<div id="gog-login-dialog" class="modal-dialog">
<div class="solid">
<h1>Connect your GOG.com account</h1>
<h2>Connect in the Borg app (easy)</h2>
<!-- store icons to Windows, iOS, Android, and FireTV apps -->
<script type="module"
src="https://get.microsoft.com/badge/ms-store-badge.bundled.js"
crossorigin="anonymous"></script>
<ms-store-badge productid="9NTDRRR4814S" id="get-from-store"></ms-store-badge>
<a href="ms-windows-store://pdp/?ProductId=9NTDRRR4814S" id="get-from-store-plain" style="display: none">
<img src="https://get.microsoft.com/images/en-us%20dark.svg" alt="Download Borg node" />
</a>
<script>
setTimeout(() => {
const get = document.getElementById('get-from-store');
if (get.children.length === 0 && !get.shadowRoot) {
document.getElementById('get-from-store-plain').style.display = 'inline-block';
}
}, 3000);
</script>
<noscript><a href="ms-windows-store://pdp/?productid=9NTDRRR4814S">Get from Microsoft Store</a></noscript>
<h2>Manually copy the code from the browser (harder)</h2>
<p>Click the link below, log in, and copy the final page address here</p>
<p>
<input id="gog-code" type="text" class="bad"
placeholder="https://embed.gog.com/on_login_success?..."
style="width: 32em;">
</p>
<p>
<a href="https://auth.gog.com/auth?client_id=46899977096215655&redirect_uri=https%3A%2F%2Fembed.gog.com%2Fon_login_success%3Forigin%3Dclient&response_type=code&layout=client2"
target="_blank">Open the login page</a>
</p>
</div>
</div>
<div class="footer">
<button id="loginButton" class="action" type="button" disabled style="font-size: larger;">LOGIN</button>
<progress id="space"></progress>
<h3 class="about"><a href="/about">© Borg Queen, LLC 2024</a></h3>
</div>
</body>
<script src="https://alcdn.msauth.net/browser/2.38.2/js/msal-browser.min.js"
integrity="sha384-hhkHFODse2T75wPL7oJ0RZ+0CgRa74LNPhgx6wO6DMNEhU3/fSbTZdVzxsgyUelp"
crossorigin="anonymous"></script>
<script src="https://webrtc.github.io/adapter/adapter-9.0.1.js"
integrity="sha384-kOlMOLZNYoP5WSj2ag2vv9BgOnN1jTYirEjM0gTDQOhYuDWx964EPIkhdpbmN+OW"
crossorigin="anonymous"></script>
<script src="/js/qrcode.js"></script>
<script type="module">
import {devMode} from "./js/dev.js";
import {Ephemeral} from "./js/ephemeral.js";
import {Home, showLoginDialog, abortMinecraftLogin} from "./js/home.js";
import {SYNC} from "./js/onedrive.js";
const demo = document.getElementById('factorio-demo');
demo.onclick = function () {
Home.launch({
game: 'factorio?demo=true',
});
};
const full = document.getElementById('factorio');
full.onclick = function () {
Home.launch({
game: 'factorio'
});
};
const fullMinecraft = document.getElementById('minecraft');
fullMinecraft.onclick = async function () {
fullMinecraft.disabled = true;
try {
if (SYNC.isLoggedIn() || await showLoginDialog())
return Home.launch({game: 'minecraft', nodeFilter: { verMin: '0.2.15' }});
return Home.launch({game: 'minecraft?trial=1', nodeFilter: { verMin: '0.2.17' }});
} finally {
fullMinecraft.disabled = false;
}
};
const trialMinecraft = document.getElementById('mc-trial');
trialMinecraft.onclick = async () => {
await abortMinecraftLogin();
Home.launch({game: 'minecraft?trial=1', nodeFilter: {verMin: '0.2.15'}});
}
function launchGogGame(id) {
return Home.launch({
game: 'GOG/' + encodeURIComponent(id),
nodeFilter: {
verMin: '0.2.48',
features: ['CDN'],
},
});
}
const gog = document.getElementById('gog');
gog.onclick = function () {
const id = document.getElementById('gog-game-id').value;
return launchGogGame(id);
};
async function main() {
if (devMode()) {
document.body.classList.remove('release');
console.error('dev mode');
}
await Home.init();
const nodes = await Ephemeral.getNodes();
demo.disabled = nodes.length === 0;
if (!demo.disabled)
demo.title = '';
if (nodes.length > 0)
document.body.classList.remove('no-nodes');
// full.disabled = nodes.length === 0;
// if (!full.disabled)
// full.title = '';
}
window.playGogGame = async id => launchGogGame(id);
main();
</script>
<script>
function toggleDev() {
localStorage.setItem('dev-mode', 1 - (+localStorage.getItem('dev-mode')));
window.location.reload();
}
</script>
</html>