mirror of
https://github.com/ION606/selmer-bot-website.git
synced 2026-05-14 22:16:54 +00:00
Bumped the website/oAuth2 from http to https
This commit is contained in:
+10
-10
@@ -281,7 +281,7 @@
|
|||||||
async function openNewCalWindow(evjs, day) {
|
async function openNewCalWindow(evjs, day) {
|
||||||
const ev = JSON.parse(evjs);
|
const ev = JSON.parse(evjs);
|
||||||
|
|
||||||
await new Promise((res, rej) => { res(window.open('http://www.selmerbot.com/calEvent.html','popUpWindow','loaction=no,width=600,height=300,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')); })
|
await new Promise((res, rej) => { res(window.open('https://www.selmerbot.com/calEvent.html','popUpWindow','loaction=no,width=600,height=300,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')); })
|
||||||
.then((w) => {
|
.then((w) => {
|
||||||
if (!w) { w.close(); return alert("Your browser has JavaScript Disabled!"); }
|
if (!w) { w.close(); return alert("Your browser has JavaScript Disabled!"); }
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
|
|
||||||
|
|
||||||
async function createCalEvent(day) {
|
async function createCalEvent(day) {
|
||||||
await new Promise((res, rej) => { res(window.open('http://www.selmerbot.com/newCalEvent.html','popUpWindow','loaction=no,width=400,height=350,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')); })
|
await new Promise((res, rej) => { res(window.open('https://www.selmerbot.com/newCalEvent.html','popUpWindow','loaction=no,width=400,height=350,resizable=yes,scrollbars=yes,toolbar=yes,menubar=no,location=no,directories=no,status=yes')); })
|
||||||
.then((w) => {
|
.then((w) => {
|
||||||
if (!w) { w.close(); return alert("Your browser has JavaScript Disabled!"); }
|
if (!w) { w.close(); return alert("Your browser has JavaScript Disabled!"); }
|
||||||
|
|
||||||
@@ -387,7 +387,7 @@
|
|||||||
function getSessionData() {
|
function getSessionData() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
var xhrsess = new XMLHttpRequest();
|
var xhrsess = new XMLHttpRequest();
|
||||||
xhrsess.open('post', 'http://www.selmerbot.com/getSessionInfo/', true);
|
xhrsess.open('post', 'https://www.selmerbot.com/getSessionInfo/', true);
|
||||||
xhrsess.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
xhrsess.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
xhrsess.setRequestHeader('session', window.localStorage.getItem('sessionId'));
|
xhrsess.setRequestHeader('session', window.localStorage.getItem('sessionId'));
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@
|
|||||||
if (window.location.href.indexOf('localhost') != -1) {
|
if (window.location.href.indexOf('localhost') != -1) {
|
||||||
window.location = 'https://discord.com/api/oauth2/authorize?client_id=926551095352901632&redirect_uri=http%3A%2F%2Flocalhost%3A53134%2F&response_type=token&scope=identify%20guilds';
|
window.location = 'https://discord.com/api/oauth2/authorize?client_id=926551095352901632&redirect_uri=http%3A%2F%2Flocalhost%3A53134%2F&response_type=token&scope=identify%20guilds';
|
||||||
} else {
|
} else {
|
||||||
window.location = 'https://discord.com/api/oauth2/authorize?client_id=944046902415093760&redirect_uri=http%3A%2F%2Fwww.selmerbot.com%2F&response_type=token&scope=identify%20guilds';
|
window.location = 'https://discord.com/api/oauth2/authorize?client_id=944046902415093760&redirect_uri=https%3A%2F%2Fwww.selmerbot.com%2F&response_type=code&scope=identify%20guilds';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@
|
|||||||
|
|
||||||
//Check if the user has premium
|
//Check if the user has premium
|
||||||
var xhrverify = new XMLHttpRequest();
|
var xhrverify = new XMLHttpRequest();
|
||||||
xhrverify.open('post', 'http://www.selmerbot.com/verifypremium/', true);
|
xhrverify.open('post', 'https://www.selmerbot.com/verifypremium/', true);
|
||||||
xhrverify.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
xhrverify.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
|
|
||||||
//Use the guild Id as the userId
|
//Use the guild Id as the userId
|
||||||
@@ -430,7 +430,7 @@
|
|||||||
|
|
||||||
// //Load the channels
|
// //Load the channels
|
||||||
// var xhr = new XMLHttpRequest();
|
// var xhr = new XMLHttpRequest();
|
||||||
// xhr.open('get', `http://www.selmerbot.com/getChannels/`, true);
|
// xhr.open('get', `https://www.selmerbot.com/getChannels/`, true);
|
||||||
// xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
// xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
// xhr.setRequestHeader('serverNumber', id);
|
// xhr.setRequestHeader('serverNumber', id);
|
||||||
// xhr.onloadend = (e) => {
|
// xhr.onloadend = (e) => {
|
||||||
@@ -531,7 +531,7 @@
|
|||||||
|
|
||||||
|
|
||||||
var xhr2 = new XMLHttpRequest();
|
var xhr2 = new XMLHttpRequest();
|
||||||
xhr2.open('get', 'http://www.selmerbot.com/getCal/', true);
|
xhr2.open('get', 'https://www.selmerbot.com/getCal/', true);
|
||||||
xhr2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
xhr2.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
|
|
||||||
xhr2.setRequestHeader('guildId', id);
|
xhr2.setRequestHeader('guildId', id);
|
||||||
@@ -576,7 +576,7 @@
|
|||||||
|
|
||||||
function logout() {
|
function logout() {
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('post', 'http://www.selmerbot.com/logout/', true);
|
xhr.open('post', 'https://www.selmerbot.com/logout/', true);
|
||||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
xhr.setRequestHeader('sessionid', window.localStorage.getItem('sessionId'));
|
xhr.setRequestHeader('sessionid', window.localStorage.getItem('sessionId'));
|
||||||
|
|
||||||
@@ -657,7 +657,7 @@
|
|||||||
|
|
||||||
//Send the data to the server
|
//Send the data to the server
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('post', 'http://www.selmerbot.com/sendData/', true);
|
xhr.open('post', 'https://www.selmerbot.com/sendData/', true);
|
||||||
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
xhr.setRequestHeader('serverSettings', JSON.stringify(serverSettings));
|
xhr.setRequestHeader('serverSettings', JSON.stringify(serverSettings));
|
||||||
|
|
||||||
@@ -665,7 +665,7 @@
|
|||||||
if (xhr.response == 'DONE') {
|
if (xhr.response == 'DONE') {
|
||||||
//Change the current server data
|
//Change the current server data
|
||||||
var xhrs = new XMLHttpRequest();
|
var xhrs = new XMLHttpRequest();
|
||||||
xhrs.open('post', 'http://www.selmerbot.com/setCurrentServer/', true);
|
xhrs.open('post', 'https://www.selmerbot.com/setCurrentServer/', true);
|
||||||
xhrs.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
xhrs.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
|
||||||
xhrs.setRequestHeader('serverNumber', serverInfo.Id);
|
xhrs.setRequestHeader('serverNumber', serverInfo.Id);
|
||||||
xhrs.setRequestHeader('sessionid', window.localStorage.getItem("sessionId"));
|
xhrs.setRequestHeader('sessionid', window.localStorage.getItem("sessionId"));
|
||||||
|
|||||||
Reference in New Issue
Block a user