Skip to content

Commit 1ece3b2

Browse files
1 parent d95d931 commit 1ece3b2

2 files changed

Lines changed: 0 additions & 99 deletions

File tree

appdata/settings.html

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3153,63 +3153,6 @@ <h1>Connect to a network</h1>
31533153
</small>
31543154
</segr>
31553155
</div>
3156-
<div id="rotursets" class="tabcontent advancedsettab">
3157-
<h1><span class="material-symbols-rounded advancedsetsbackbtn" onclick="openCity(event, 'network');">
3158-
arrow_back
3159-
</span> RoturTW</h1>
3160-
3161-
3162-
<div id="rotursettings">
3163-
<h1>Account</h1>
3164-
<segr id="rtrinitspace">
3165-
<div class="single_setting" class="spread">
3166-
<b>Initialize rotur</b>
3167-
<button onclick="loginOnceRotur()">Start</button>
3168-
</div>
3169-
<small>RoturTW is a third party service, which offers APIs. NovaOS supports it but isn't affiliated
3170-
or
3171-
endorsing. Visit rotur.dev for details.</small>
3172-
</segr>
3173-
3174-
<segr id="rtrsignedinsec" style="display:none;">
3175-
<div class="single_setting" class="spread">
3176-
<b id="rtruserstatsi">Signed in</b>
3177-
<button onclick="signoutrtrsets()">Sign Out</button>
3178-
</div>
3179-
</segr>
3180-
<script>
3181-
async function loginOnceRotur() {
3182-
await window.parent.attemptConnection();
3183-
window.parent.roturExtension.login_prompt({ STYLE_URL: "https://adthoughtsglobal.github.io/nova-dev-repl-rl/libs/roturstyle.css" });
3184-
}
3185-
async function signoutrtrsets() {
3186-
await window.parent.logoutofrtr();
3187-
loaduprtour()
3188-
}
3189-
function loaduprtour() {
3190-
const roturExtension = window.parent.roturExtension;
3191-
3192-
if (roturExtension && roturExtension.loggedIn()) {
3193-
document.getElementById("rtrinitspace").style.display = "none";
3194-
document.getElementById("rtrsignedinsec").style.display = "block";
3195-
document.getElementById("rtruserstatsi").innerText = "Signed in as " + roturExtension.user.username;
3196-
} else {
3197-
document.getElementById("rtrinitspace").style.display = "block";
3198-
document.getElementById("rtrsignedinsec").style.display = "none";
3199-
}
3200-
}
3201-
3202-
async function initrotur() {
3203-
let rtrstats = await window.parent.setuprotur();
3204-
3205-
document.getElementById("rtrinitspace").style.display = "none";
3206-
}
3207-
3208-
</script>
3209-
3210-
</segr>
3211-
</div>
3212-
</div>
32133156

32143157
<div id="advancedthemesets" class="tabcontent advancedsettab">
32153158
<h1><span class="material-symbols-rounded advancedsetsbackbtn" onclick="openCity(event, 'exp');">

scripts/rotur.js

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -386,46 +386,6 @@ class RoturExtension {
386386
firstLogin() {
387387
return false;
388388
}
389-
390-
login_prompt({ STYLE_URL }) {
391-
if (!this.is_connected) { console.error("Not Connected"); return; }
392-
if (this.authenticated) { console.error("Already Logged In"); return; }
393-
394-
const e = document.createElement("iframe");
395-
e.id = "rotur-auth";
396-
e.src = `https://rotur.dev/auth?system=novaOS&styles=${encodeURIComponent(STYLE_URL)}`;
397-
Object.assign(e.style, {
398-
width: "70%",
399-
height: "80%",
400-
border: "none",
401-
pointerEvents: "auto",
402-
position: "absolute",
403-
top: "10%",
404-
right: "14.5%",
405-
border: "var(--box-crisp)",
406-
borderRadius: "1em",
407-
zIndex: 999
408-
});
409-
410-
document.body.appendChild(e);
411-
412-
const _roturAuthHandler = (a) => {
413-
console.log("Rotur Auth Message Received", a);
414-
if ("https://rotur.dev" === a.origin && "rotur-auth-token" === a.data?.type) {
415-
t.remove()
416-
window.removeEventListener("message", _roturAuthHandler);
417-
this.loginToken({ TOKEN: a.data.token });
418-
setSetting("roturLink", JSON.stringify({
419-
"type": "token",
420-
"token": a.data.token
421-
}));
422-
}
423-
};
424-
425-
window.addEventListener("message", _roturAuthHandler);
426-
return "Auth window opened";
427-
}
428-
429389
login() { }
430390
loginMd5() { }
431391

@@ -1710,8 +1670,6 @@ function roturTWEventCall(data) {
17101670
} else if (targettype == "token") {
17111671
await roturExtension.loginToken({ TOKEN: JSON.parse(localroturdata).token })
17121672
}
1713-
} else {
1714-
roturExtension.login_prompt({ STYLE_URL: "https://adthoughtsglobal.github.io/nova-dev-repl-rl/libs/roturstyle.css" });
17151673
}
17161674
})();
17171675
}

0 commit comments

Comments
 (0)