Increase character limits

This commit is contained in:
ZXMushroom63 2024-09-08 15:45:10 +08:00
parent 266eda5797
commit 1f32472c01
3 changed files with 6 additions and 6 deletions

View File

@ -3,9 +3,9 @@ ModAPI.meta contains the API for registering metadata on mods easily.
Methods: Methods:
- `ModAPI.meta.title(title: String)` - `ModAPI.meta.title(title: String)`
- Sets the title of the mod. This is mandatory if any metadata is to be displayed. Character limit of 14. - Sets the title of the mod. This is mandatory if any metadata is to be displayed. Character limit of 16.
- `ModAPI.meta.credits(credits: String)` - `ModAPI.meta.credits(credits: String)`
- Sets the credits of the mod. Character limit of 16. - Sets the credits of the mod. Character limit of 24.
- `ModAPI.meta.description(desc: String)` - `ModAPI.meta.description(desc: String)`
- Sets the description of the mod. Character limit of 64. - Sets the description of the mod. Character limit of 64.
- `ModAPI.meta.icon(iconURL: String)` - `ModAPI.meta.icon(iconURL: String)`

View File

@ -33,7 +33,7 @@ globalThis.modapi_postinit = `(() => {
if (!document.currentScript.hasAttribute("data-hash")) { if (!document.currentScript.hasAttribute("data-hash")) {
return console.log("[ModAPIMeta] Script does not have a hashcode."); return console.log("[ModAPIMeta] Script does not have a hashcode.");
} }
ModAPI.meta._titleMap[document.currentScript.getAttribute("data-hash")] = limitSize(title, 14); ModAPI.meta._titleMap[document.currentScript.getAttribute("data-hash")] = limitSize(title, 16);
} }
ModAPI.meta.icon = function (iconSrc) { ModAPI.meta.icon = function (iconSrc) {
if (!document.currentScript || document.currentScript.getAttribute("data-isMod") !== "true") { if (!document.currentScript || document.currentScript.getAttribute("data-isMod") !== "true") {
@ -51,7 +51,7 @@ globalThis.modapi_postinit = `(() => {
if (!document.currentScript.hasAttribute("data-hash")) { if (!document.currentScript.hasAttribute("data-hash")) {
return console.log("[ModAPIMeta] Script does not have a hashcode."); return console.log("[ModAPIMeta] Script does not have a hashcode.");
} }
ModAPI.meta._developerMap[document.currentScript.getAttribute("data-hash")] = limitSize(cd, 16); ModAPI.meta._developerMap[document.currentScript.getAttribute("data-hash")] = limitSize(cd, 24);
} }
ModAPI.meta.description = function (desc) { ModAPI.meta.description = function (desc) {
if (!document.currentScript || document.currentScript.getAttribute("data-isMod") !== "true") { if (!document.currentScript || document.currentScript.getAttribute("data-isMod") !== "true") {

View File

@ -33,7 +33,7 @@
if (!document.currentScript.hasAttribute("data-hash")) { if (!document.currentScript.hasAttribute("data-hash")) {
return console.log("[ModAPIMeta] Script does not have a hashcode."); return console.log("[ModAPIMeta] Script does not have a hashcode.");
} }
ModAPI.meta._titleMap[document.currentScript.getAttribute("data-hash")] = limitSize(title, 14); ModAPI.meta._titleMap[document.currentScript.getAttribute("data-hash")] = limitSize(title, 16);
} }
ModAPI.meta.icon = function (iconSrc) { ModAPI.meta.icon = function (iconSrc) {
if (!document.currentScript || document.currentScript.getAttribute("data-isMod") !== "true") { if (!document.currentScript || document.currentScript.getAttribute("data-isMod") !== "true") {
@ -51,7 +51,7 @@
if (!document.currentScript.hasAttribute("data-hash")) { if (!document.currentScript.hasAttribute("data-hash")) {
return console.log("[ModAPIMeta] Script does not have a hashcode."); return console.log("[ModAPIMeta] Script does not have a hashcode.");
} }
ModAPI.meta._developerMap[document.currentScript.getAttribute("data-hash")] = limitSize(cd, 16); ModAPI.meta._developerMap[document.currentScript.getAttribute("data-hash")] = limitSize(cd, 24);
} }
ModAPI.meta.description = function (desc) { ModAPI.meta.description = function (desc) {
if (!document.currentScript || document.currentScript.getAttribute("data-isMod") !== "true") { if (!document.currentScript || document.currentScript.getAttribute("data-isMod") !== "true") {