diff options
Diffstat (limited to 'app/functions.js')
-rw-r--r-- | app/functions.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/functions.js b/app/functions.js new file mode 100644 index 0000000..d736464 --- /dev/null +++ b/app/functions.js @@ -0,0 +1,15 @@ +// Function ported from /includes/header.php (line 18) +// Ported function has matched behavior. +function getMiniName(name) { + let parts = name.split(" "); + + if (parts[0].length > 3 && !parts[0].endsWith("e") && parts[0] !== "Filly") { + if (parts[0].includes("/")) { + return parts[0].split("/")[0]; + } else { + return parts[0]; + } + } else { + return name; + } +}
\ No newline at end of file |