Initial commit

This commit is contained in:
2026-05-20 18:25:15 +02:00
commit 95f0b4ff01
288 changed files with 90909 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/** @typedef { import('types/CreditsObject.js').CreditsObject} CreditsObject */
export function Credits(){
return {
/**
* Credits. Preloaded at startup.
* @type {CreditsObject[]}
*/
credits: [],
/**
*
* @param {string|null} jsonCredits
*/
init( jsonCredits= null ){
if( jsonCredits !== null ){
this.credits = JSON.parse(jsonCredits);
}
},
/**
* Add an empty credit.
*/
addEmptyCredits() {
this.credits.push({name: '', description: ''});
},
/**
* Remove a specific credits.
* @param {number} index index of credit.
*/
removeCredits( index ){
this.credits.splice(index, 1);
}
}
}