MISC: Accept "noscript" as parameter for skipping loading scripts (#1797)

This commit is contained in:
catloversg 2024-11-25 04:44:30 +07:00 committed by GitHub
parent 05da0efc81
commit 294c9cbf4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -409,7 +409,11 @@ function createAutoexec(server: BaseServer): RunningScript | null {
* into worker scripts so that they will start running * into worker scripts so that they will start running
*/ */
export function loadAllRunningScripts(): void { export function loadAllRunningScripts(): void {
const skipScriptLoad = window.location.href.toLowerCase().includes("?noscripts"); /**
* Accept all parameters containing "?noscript". The "standard" parameter is "?noScripts", but new players may not
* notice the "s" character at the end of "noScripts".
*/
const skipScriptLoad = window.location.href.toLowerCase().includes("?noscript");
if (skipScriptLoad) { if (skipScriptLoad) {
Terminal.warn("Skipped loading player scripts during startup"); Terminal.warn("Skipped loading player scripts during startup");
console.info("Skipping the load of any scripts during startup"); console.info("Skipping the load of any scripts during startup");