Add NSFW browse control functionality - Done

This commit is contained in:
Will Miao
2025-03-12 22:21:30 +08:00
parent 0cad6b5cbc
commit e992ace11c
8 changed files with 397 additions and 0 deletions

View File

@@ -151,4 +151,15 @@ export function initBackToTop() {
// Initial check
toggleBackToTop();
}
export function getNSFWLevelName(level) {
if (level === 0) return 'Unknown';
if (level >= 32) return 'Blocked';
if (level >= 16) return 'XXX';
if (level >= 8) return 'X';
if (level >= 4) return 'R';
if (level >= 2) return 'PG13';
if (level >= 1) return 'PG';
return 'Unknown';
}