mirror of
https://github.com/ION606/selmer-bot-website.git
synced 2026-05-14 22:16:54 +00:00
Changed most data storage to server-side
This commit is contained in:
+9
-2
@@ -152,7 +152,7 @@
|
||||
|
||||
<script>
|
||||
window.onload = () => {
|
||||
if (!window.localStorage.getItem('serverInfo')) {
|
||||
if (!window.localStorage.getItem('sessionId')) {
|
||||
document.getElementById('guildslink').href = '';
|
||||
document.getElementById('guildslink').style = 'cursor: no-drop;';
|
||||
|
||||
@@ -164,7 +164,14 @@
|
||||
|
||||
function logout() {
|
||||
window.localStorage.clear();
|
||||
window.location.href = 'index.html';
|
||||
window.sessionStorage.clear();
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('post', 'http://www.selmerbot.com/logout/', true);
|
||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xhr.setRequestHeader('sessionid', window.localStorage.getItem('sessionId'));
|
||||
|
||||
xhr.onloadend = (e) => { window.location.href = 'index.html'; }
|
||||
xhr.send();
|
||||
}
|
||||
|
||||
//Get the redirect link <!-- NOTE: "response_type=token" ALWAYS!!! http://www.selmerbot.com/ -->
|
||||
|
||||
Reference in New Issue
Block a user