mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(topbar): add customizable visibility controls for directories and subscriptions
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
/**
|
||||
* Mapping of 4chan board codes to 5chan directory names
|
||||
* Used for displaying board links in the topbar
|
||||
*/
|
||||
export const BOARD_CODE_TO_DIRECTORY: Record<string, string> = {
|
||||
a: 'Anime & Manga',
|
||||
b: 'Random',
|
||||
c: 'Anime/Cute',
|
||||
d: 'Mecha',
|
||||
e: 'Ecchi',
|
||||
f: 'Flash',
|
||||
g: 'Technology',
|
||||
gif: 'Adult GIF',
|
||||
h: 'Hentai',
|
||||
hr: 'High Resolution',
|
||||
k: 'Traditional Games',
|
||||
m: 'Mecha',
|
||||
o: 'Auto',
|
||||
p: 'Photography',
|
||||
r: 'Request',
|
||||
s: 'Sexy Beautiful Women',
|
||||
t: 'Torrents',
|
||||
u: 'Yuri',
|
||||
v: 'Video Games',
|
||||
vg: 'Video Game Generals',
|
||||
vm: 'Video Games/Multiplayer',
|
||||
vmg: 'Video Games/Mobile',
|
||||
vr: 'Retro Games',
|
||||
vrpg: 'Video Games/RPG',
|
||||
vst: 'Video Games/Strategy',
|
||||
w: 'Anime/Wallpapers',
|
||||
wg: 'Worksafe GIF',
|
||||
i: 'Oekaki',
|
||||
ic: 'Artwork/Critique',
|
||||
r9k: 'ROBOT9001',
|
||||
s4s: 'Shit 4chan Says',
|
||||
vip: 'Very Important Posts',
|
||||
cm: 'Cute/Male',
|
||||
hm: 'Handsome Men',
|
||||
lgbt: 'LGBT',
|
||||
y: 'Yaoi',
|
||||
'3': '3DCG',
|
||||
aco: 'Anime/Cute',
|
||||
adv: 'Advertisement',
|
||||
an: 'Animals & Nature',
|
||||
bant: 'International/Random',
|
||||
biz: 'Business & Finance',
|
||||
cgl: 'Cosplay & EGL',
|
||||
ck: 'Food & Cooking',
|
||||
co: 'Comics & Cartoons',
|
||||
diy: 'Do-It-Yourself',
|
||||
fa: 'Fashion',
|
||||
fit: 'Fitness',
|
||||
gd: 'Graphic Design',
|
||||
hc: 'Hardcore',
|
||||
his: 'History & Humanities',
|
||||
int: 'International',
|
||||
jp: 'Otaku Culture',
|
||||
lit: 'Literature',
|
||||
mlp: 'Pony',
|
||||
mu: 'Music',
|
||||
n: 'Transportation',
|
||||
news: 'Current News',
|
||||
out: 'Outdoors',
|
||||
po: 'Papercraft & Origami',
|
||||
pol: 'Politically Incorrect',
|
||||
pw: 'Professional Wrestling',
|
||||
qst: 'Quests',
|
||||
sci: 'Science & Math',
|
||||
soc: 'Cams & Meetups',
|
||||
sp: 'Sports',
|
||||
tg: 'Traditional Games',
|
||||
toy: 'Toys',
|
||||
trv: 'Travel',
|
||||
tv: 'Television & Film',
|
||||
vp: 'Pokémon',
|
||||
vt: 'Virtual YouTubers',
|
||||
wsg: 'Worksafe Requests',
|
||||
wsr: 'Worksafe Requests',
|
||||
x: 'Adult Cartoons',
|
||||
xs: 'Extreme Sports',
|
||||
};
|
||||
|
||||
/**
|
||||
* Board code groups matching 4chan's bracket structure
|
||||
* Each group represents boards displayed together in brackets
|
||||
*/
|
||||
export const BOARD_CODE_GROUPS: string[][] = [
|
||||
// Group 1: [a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg]
|
||||
['a', 'b', 'c', 'd', 'e', 'f', 'g', 'gif', 'h', 'hr', 'k', 'm', 'o', 'p', 'r', 's', 't', 'u', 'v', 'vg', 'vm', 'vmg', 'vr', 'vrpg', 'vst', 'w', 'wg'],
|
||||
// Group 2: [i / ic]
|
||||
['i', 'ic'],
|
||||
// Group 3: [r9k / s4s / vip]
|
||||
['r9k', 's4s', 'vip'],
|
||||
// Group 4: [cm / hm / lgbt / y]
|
||||
['cm', 'hm', 'lgbt', 'y'],
|
||||
// Group 5: [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs]
|
||||
[
|
||||
'3',
|
||||
'aco',
|
||||
'adv',
|
||||
'an',
|
||||
'bant',
|
||||
'biz',
|
||||
'cgl',
|
||||
'ck',
|
||||
'co',
|
||||
'diy',
|
||||
'fa',
|
||||
'fit',
|
||||
'gd',
|
||||
'hc',
|
||||
'his',
|
||||
'int',
|
||||
'jp',
|
||||
'lit',
|
||||
'mlp',
|
||||
'mu',
|
||||
'n',
|
||||
'news',
|
||||
'out',
|
||||
'po',
|
||||
'pol',
|
||||
'pw',
|
||||
'qst',
|
||||
'sci',
|
||||
'soc',
|
||||
'sp',
|
||||
'tg',
|
||||
'toy',
|
||||
'trv',
|
||||
'tv',
|
||||
'vp',
|
||||
'vt',
|
||||
'wsg',
|
||||
'wsr',
|
||||
'x',
|
||||
'xs',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Get all board codes as a flat array
|
||||
*/
|
||||
export const getAllBoardCodes = (): string[] => {
|
||||
return BOARD_CODE_GROUPS.flat();
|
||||
};
|
||||
Reference in New Issue
Block a user