This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.html
214 lines (200 loc) · 11.6 KB
/
config.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
<html class="theme-dark">
<head>
<title>rblxRP Config</title>
<link rel="stylesheet" href="discord.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
<style>
body {
background-image: url("assets/darkLoadingTexture.png");
}
.userPopout-xaxa6l {
position: fixed;
top: 50vh;
left: 50vw;
transform: translate(-50%, -50%);
}
.footer {
position: fixed;
bottom: 0;
width: 100%;
color: #888;
text-align: center;
}
</style>
</head>
<body>
<div id="container">
<div aria-label="rblxRP" class="userPopout-xaxa6l" role="dialog" tabindex="-1" aria-modal="true"
style="width: 300px; display:none;">
<div class="headerNormal-3KXFBt">
<div class="banner-2QYc2d popoutBanner-19WKGg" style="background-color: #18191c">
</div>
</div>
<div class="avatarWrapperNormal-26WQIb avatarWrapper-3r9PdD avatarPositionNormal-aZjAsn " role="button"
tabindex="0">
<div class="avatar-37jOim wrapper-3t9DeA" role="img" aria-hidden="false"
style="width: 80px; height: 80px;">
<div class="avatarStack-2Dr8S9"><img
src="assets/rblxrp.png"
alt=" " style="border-radius: 100%;" class="avatar-VxgULZ" aria-hidden="true"></div>
</div>
</div>
<div class="headerTop-3vNv-a">
<div class="headerText-1vVs-U">
<div class="headerTagNoNickname-3qrd77 headerTag-3GFl76 nameTag-m8r81H"><span
class="username-2b1r56 headerTagUsernameNoNickname-2-Y5Ct headerTagUsernameBase-1NqrY5">rblxRP</span><span
class="headerTagDiscriminatorNoNickname-D-AYUN discrimBase-24vY8o"> v3</span></div>
</div>
</div>
<div class="body-3HBlXn thin-1ybCId scrollerBase-289Jih" dir="ltr"
style="overflow: hidden scroll; padding-right: 8px;">
<p id="connstatus"
class="headerTextNormal-2mGWX3 headerText-1HLrL7 flex-1O1GKY marginBottom8-AtZOdT base-1x0h_U size12-3cLvbJ">
Status</p>
<div class="divider-ewBQKj"></div>
<div class="bodyInnerWrapper-26fQXj">
<div class="activityUserPopout-2yItg2 activity-2INFPu newPopoutActivityStyles">
<h3
class="headerTextNormal-2mGWX3 headerText-1HLrL7 flex-1O1GKY marginBottom8-AtZOdT base-1x0h_U size12-3cLvbJ">
Playing a game</h3>
<div class="bodyNormal-2D39hT body-ZAhrcj flex-1O1GKY alignCenter-1dQNNs"
style="transition: 0.5s opacity;">
<div class="assets-VMAukC"><img alt=""
src="https://cdn.discordapp.com/app-assets/626092891667824688//627161141868494898.png"
class="assetsLargeImageUserPopout-3Pp8BK assetsLargeImage-eYwpTX noUserDrag-5Mb43F "><img
alt="http://rblxrp.xyz"
src="assets/rblxrp.png"
class="assetsSmallImageUserPopout-2yc71g assetsSmallImage-3_3Bzj noUserDrag-5Mb43F"
aria-label="http://rblxrp.xyz"></div>
<div class="contentImagesUserPopout-1vLdRA content-3JfFJh" style="flex: 1 1 auto;">
<h3 class="nameNormal-2lqVQK ellipsis-1XUmPN textRow-19NEd_ base-1x0h_U size14-e6ZScH"
title="Roblox"><span class="activityName-1IaRLn">Roblox</span></h3>
<div class="details-38sfDr ellipsis-1XUmPN textRow-19NEd_">
Jailbreak</div>
<div class="state-Tt0LO3 ellipsis-1XUmPN textRow-19NEd_"><span>by
Badimo</span></div>
</div>
</div>
</div>
</div>
<div aria-hidden="true"
style="position: absolute; pointer-events: none; min-height: 0px; min-width: 1px; flex: 0 0 auto; height: 14px;">
</div>
<div class="aboutMeSection-1Fw5Ia">
<h3 class="aboutMeTitle-1IYtPE base-1x0h_U size12-3cLvbJ muted-3-7c5L uppercase-3VWUQ9">Default Icon
</h3>
<div class="aboutMeBody-3GuvKk markup-2BOw-j clamped-IwJfxR">
<select id="icon" class="select-2fjwPw lookFilled-22uAsw">
<option value="rblxrp">rblxRP</option>
<option value="logo_shiny">Shiny Roblox</option>
<option value="logo_red">Red Roblox</option>
<option value="logo_old">Old Logo</option>
</select>
</div>
<br>
<h3 class="aboutMeTitle-1IYtPE base-1x0h_U size12-3cLvbJ muted-3-7c5L uppercase-3VWUQ9">Studio Presence
</h3>
<label for='studio' class="aboutMeBody-3GuvKk markup-2BOw-j clamped-IwJfxR"><input type="checkbox" id="studio">Enable Studio Presence</input>
Please note that enabling this will install a Roblox Studio plugin.
</div>
<br>
<div class="aboutMeBody-3GuvKk markup-2BOw-j clamped-IwJfxR"><center><a href="https://discord.gg/5aQSDGCTX6">Join our Discord</a> • <a
href="https://github.com/rblxRP/rblxRP">GitHub</a> • <a
href="https://app.archbee.io/public/9df1xAuEKf28ejvqOaTdm">Help</a></center>
</div>
</div>
</div>
</div>
<div class="footer">
rblxRP is a community project. It is not affiliated or approved by the Roblox Corporation or Discord Inc.
</div>
</div>
<script>
var socket = new WebSocket("ws://127.0.0.1:5816");
function error(text) {
document.querySelector(".userPopout-xaxa6L").style.display = "block";
document.querySelector(".userPopout-xaxa6L").innerHTML =
`<div class="oauth2Wrapper-mHbF5q"><div class="wrapper-L5YRoB"><div class="header-3a78__ headerFailure-2bMPeV"></div><div class="colorStandard-2KCXvj size16-1P40sf text-23oMQC">${text}</div></div></div>`
}
socket.onopen = function () {
console.log("Connected to rblxRP");
document.querySelector("#icon").onchange = () => {
socket.send(`{"defaultIcon":"${document.querySelector("#icon").value}"}`);
}
document.querySelector("#studio").onchange = () => {
socket.send(`{"studioPresence":${document.querySelector("#studio").checked}}`);
}
};
socket.onmessage = function (event) {
var data = JSON.parse(event.data);
document.querySelector(".userPopout-xaxa6L").style.display = "block";
console.log(data);
document.querySelector(".assetsLargeImage-eYwpTX").src = "assets/" + data.config.defaultIcon + ".png";
document.querySelector("#icon").value = data.config.defaultIcon;
document.querySelector("#studio").checked = data.config.studioPresence;
switch (data.state.type) {
case "none":
document.querySelector(".activityName-1IaRLn").innerText = "Nothing playing"
document.querySelector(".details-38sfDr").innerText = ""
document.querySelector(".state-Tt0LO3").innerText = ""
break;
case "game":
document.querySelector(".activityName-1IaRLn").innerText = "Roblox"
if (!data.state.info.name) setTimeout(() => socket.send("{}"), 100) // refresh because no name likely is the promise hasn't resolved yet.
document.querySelector(".details-38sfDr").innerText = data.state.info.name || data.state.gameId
document.querySelector(".state-Tt0LO3").innerText = "by " + (data.state.info.by || "A Roblox Developer")
if (data.state.info.iconKey && data.state.info.iconKey.startsWith("http"))
document.querySelector(".assetsLargeImage-eYwpTX").src = data.state.info.iconKey
break;
case "studio":
document.querySelector(".activityName-1IaRLn").innerText = "Roblox Studio"
document.querySelector(".details-38sfDr").innerText = data.state.info.name || data.state.providedState.gameName || "Working on a game"
document.querySelector(".state-Tt0LO3").innerText = data.state.providedState.state || "Working on a game"
break;
case "error":
document.querySelector(".activityName-1IaRLn").innerText = "Errored"
document.querySelector(".details-38sfDr").innerText = ""
document.querySelector(".state-Tt0LO3").innerText = ""
break;
case "loading":
document.querySelector(".activityName-1IaRLn").innerText = "Loading..."
document.querySelector(".details-38sfDr").innerText = data.state.message
document.querySelector(".state-Tt0LO3").innerText = ""
break;
}
if (data.discord && data.discord.env && data.discord.env.user) {
document.querySelector(".username-2b1r56").innerText = data.discord.env.user.username
document.querySelector(".discrimBase-24vY8o").innerText = "#" + data.discord.env.user.discriminator
document.querySelector(".avatar-VxgULZ").src =
`https://${data.discord.env.config.cdn_host}/avatars/${data.discord.env.user.id}/${data.discord.env.user.avatar}.webp?size=128`
}
switch (data.discord.status) {
case "connected":
var name = data.discord.env.config.api_endpoint.split(".")[0].replace(/\//g, "")
document.querySelector("#connstatus").innerText = "Connected to Discord " + (name == "discord" ?
"" : name);
break;
case "connecting":
document.querySelector("#connstatus").innerText = "Connecting to Discord...";
break;
case "disconnected":
document.querySelector("#connstatus").innerText = "Disconnected from Discord";
break;
case "errored":
document.querySelector("#connstatus").innerText = "Could not connect to Discord";
break;
}
}
socket.onerror = function (event) {
console.log("Error: ", event);
error(event.toString());
}
socket.onclose = function (event) {
console.log("Disconnected from rblxRP");
error("Disconnected. Please reopen the config page from the menu bar icon.")
}
</script>
</body>
</html>