mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-09 19:48:37 +01:00
workaround by using .mjs
This commit is contained in:
parent
85f08be29b
commit
d07b64e8d9
@ -169,6 +169,6 @@ script-src 'self' https://*.cloudflare.com/ https://alcdn.msauth.net/ https://*.
|
|||||||
<script src="https://alcdn.msauth.net/browser/2.15.0/js/msal-browser.min.js" integrity="sha384-/weuqUPkC0P9JxnstihEV1GHdWrheU9Qo3MbdTuxxKJM8l/cSTE5zGP5VBIM4TZN"
|
<script src="https://alcdn.msauth.net/browser/2.15.0/js/msal-browser.min.js" integrity="sha384-/weuqUPkC0P9JxnstihEV1GHdWrheU9Qo3MbdTuxxKJM8l/cSTE5zGP5VBIM4TZN"
|
||||||
crossorigin="anonymous"></script>
|
crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<script type="module" src="js/page.js"></script>
|
<script type="module" src="js/page.mjs"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import {getCorsProxy} from "./cors_proxy.js";
|
import {getCorsProxy} from "./cors_proxy.mjs";
|
||||||
import {checkFetchSuccess, filterNot, isSuccess} from "./util.js";
|
import {checkFetchSuccess, filterNot, isSuccess} from "./util.mjs";
|
||||||
import {addToast, refreshAccountList} from "./page.js";
|
import {addToast, refreshAccountList} from "./page.mjs";
|
||||||
|
|
||||||
let activeAccounts = [];
|
let activeAccounts = [];
|
||||||
|
|
||||||
@ -301,4 +301,4 @@ function getTokenPopup(username, request) {
|
|||||||
console.warn(error);
|
console.warn(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
import {refreshCorsStatus} from "./page.js";
|
import {refreshCorsStatus} from "./page.mjs";
|
||||||
|
|
||||||
function defaultCors() {
|
function defaultCors() {
|
||||||
return "https://crp123-cors.herokuapp.com/";
|
return "https://crp123-cors.herokuapp.com/";
|
@ -1,6 +1,6 @@
|
|||||||
// Minecraft.id
|
// Minecraft.id
|
||||||
import {icanhazepoch, icanhazip} from "./util.js";
|
import {icanhazepoch, icanhazip} from "./util.mjs";
|
||||||
import {getCorsProxy, setCorsProxy} from "./cors_proxy.js";
|
import {getCorsProxy, setCorsProxy} from "./cors_proxy.mjs";
|
||||||
import {
|
import {
|
||||||
findAccountByMs,
|
findAccountByMs,
|
||||||
getActiveAccounts,
|
getActiveAccounts,
|
||||||
@ -8,8 +8,8 @@ import {
|
|||||||
loginMc,
|
loginMc,
|
||||||
loginMs, MicrosoftAccount,
|
loginMs, MicrosoftAccount,
|
||||||
MojangAccount
|
MojangAccount
|
||||||
} from "./account_manager.js";
|
} from "./account_manager.mjs";
|
||||||
import {connect, getWsUrl, removeToken, sendSocket, setWsUrl, unlisten} from "./websocket.js";
|
import {connect, getWsUrl, removeToken, sendSocket, setWsUrl, unlisten} from "./websocket.mjs";
|
||||||
|
|
||||||
let mcIdUsername = null;
|
let mcIdUsername = null;
|
||||||
let mcauth_code = null;
|
let mcauth_code = null;
|
||||||
@ -78,7 +78,7 @@ function swCacheFiles() {
|
|||||||
action: "cache",
|
action: "cache",
|
||||||
urls: performance.getEntriesByType("resource")
|
urls: performance.getEntriesByType("resource")
|
||||||
.map(it => it.name)
|
.map(it => it.name)
|
||||||
.filter(it => it.endsWith(".js") || it.endsWith(".css") || it.endsWith(".png"))
|
.filter(it => it.endsWith(".mjs") || it.endsWith(".js") || it.endsWith(".css") || it.endsWith(".png"))
|
||||||
})); // https://stackoverflow.com/questions/46830493/is-there-any-way-to-cache-all-files-of-defined-folder-path-in-service-worker
|
})); // https://stackoverflow.com/questions/46830493/is-there-any-way-to-cache-all-files-of-defined-folder-path-in-service-worker
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
import {getCorsProxy} from "./cors_proxy.js";
|
import {getCorsProxy} from "./cors_proxy.mjs";
|
||||||
|
|
||||||
export function isSuccess(status) {
|
export function isSuccess(status) {
|
||||||
return status >= 200 && status < 300;
|
return status >= 200 && status < 300;
|
||||||
@ -27,4 +27,4 @@ export function icanhazepoch() {
|
|||||||
|
|
||||||
export function filterNot(array, item) {
|
export function filterNot(array, item) {
|
||||||
return array.filter(it => it !== item);
|
return array.filter(it => it !== item);
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import {authNotification} from "./notification.js";
|
import {authNotification} from "./notification.mjs";
|
||||||
import {checkFetchSuccess} from "./util.js";
|
import {checkFetchSuccess} from "./util.mjs";
|
||||||
import {findAccountByMcName} from "./account_manager.js";
|
import {findAccountByMcName} from "./account_manager.mjs";
|
||||||
import {addListeningList, addToast, renderActions, resetHtml, setListenVisible, setWsStatus} from "./page.js";
|
import {addListeningList, addToast, renderActions, resetHtml, setListenVisible, setWsStatus} from "./page.mjs";
|
||||||
|
|
||||||
let wsUrl = getWsUrl();
|
let wsUrl = getWsUrl();
|
||||||
let socket = null;
|
let socket = null;
|
||||||
@ -135,4 +135,4 @@ export function sendSocket(msg) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
socket.send(msg);
|
socket.send(msg);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user