Added translations for mission names/summaries.
Mission dropdown is now by mst id and mission id is selected in modal. Added skip button for moving to next chapter within mstid.
This commit is contained in:
parent
df7e0358e0
commit
cd7ea54fb2
10 changed files with 3148 additions and 53 deletions
31
Js/Common.js
31
Js/Common.js
|
@ -45,6 +45,37 @@ class commonFunctions {
|
|||
});
|
||||
}
|
||||
|
||||
static readQueryParameters() {
|
||||
let params = {};
|
||||
let indexOfStart = window.location.href.indexOf("?");
|
||||
let toCheck = window.location.href.slice(indexOfStart + 1);
|
||||
let name = "";
|
||||
let value = "";
|
||||
let nameStep = true;
|
||||
for(let i = 0; i < toCheck.length; ++i) {
|
||||
if(toCheck[i] === "=") {
|
||||
name = name.toLowerCase();
|
||||
params[decodeURIComponent(name)] = "";
|
||||
nameStep = false
|
||||
continue;
|
||||
}
|
||||
if(toCheck[i] === "&") {
|
||||
params[name] = decodeURIComponent(value);
|
||||
name = "";
|
||||
value = "";
|
||||
nameStep = true;
|
||||
continue;
|
||||
}
|
||||
if(nameStep) {
|
||||
name += toCheck[i];
|
||||
} else {
|
||||
value += toCheck[i];
|
||||
}
|
||||
}
|
||||
params[name] = decodeURIComponent(value);
|
||||
return params;
|
||||
}
|
||||
|
||||
static readLine(line, headers) {
|
||||
if(line.startsWith('//')) {
|
||||
return {comment: line};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue