comments, move functions, scrapbook progress

This commit is contained in:
zefie
2025-07-21 14:35:56 -04:00
parent e2b4aca277
commit 90522cc796
16 changed files with 756 additions and 532 deletions

View File

@@ -9,14 +9,27 @@ class WTVShenanigans {
"DISABLE_HTML_SANITIZER": 5 // disables HTML Sanitizer, allowing all sorts of chaos in email/usenet posts and signatures
}
/**
* Creates an instance of WTVShenanigans.
* @param {Object} minisrv_config - The minisrv configuration object.
*/
constructor(minisrv_config) {
this.minisrv_config = minisrv_config;
}
/**
* Returns the current shenanigans level set in the minisrv configuration.
* @returns {boolean|number} The shenanigans level, or false if shenanigans are disabled.
*/
getShenanigansLevel() {
return this.minisrv_config.config.shenanigans;
}
/**
* Checks if a specific shenanigan is enabled based on the current shenanigans level.
* @param {number} value - The shenanigan level to check against.
* @returns {boolean} True if the shenanigan is enabled, false otherwise.
*/
checkShenanigan(value) {
var level = this.getShenanigansLevel();