BetterDiscordAddons/Plugins/ServerHider/ServerHider.plugin.js

510 lines
22 KiB
JavaScript
Raw Normal View History

2020-10-20 23:25:34 +02:00
/**
* @name ServerHider
2021-03-05 13:26:41 +01:00
* @author DevilBro
2020-10-20 23:25:34 +02:00
* @authorId 278543574059057154
2022-12-02 10:44:04 +01:00
* @version 6.2.6
2021-03-05 13:26:41 +01:00
* @description Allows you to hide certain Servers in your Server List
2020-10-20 23:25:34 +02:00
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
2021-03-09 15:10:55 +01:00
* @website https://mwittrien.github.io/
* @source https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ServerHider/
2021-03-10 09:17:37 +01:00
* @updateUrl https://mwittrien.github.io/BetterDiscordAddons/Plugins/ServerHider/ServerHider.plugin.js
2020-10-20 23:25:34 +02:00
*/
2018-10-11 10:21:26 +02:00
2020-09-19 20:49:33 +02:00
module.exports = (_ => {
2022-09-01 14:40:11 +02:00
const changeLog = {
2022-09-02 12:37:10 +02:00
2020-09-19 20:49:33 +02:00
};
2020-11-13 19:47:44 +01:00
2022-02-05 21:14:17 +01:00
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
2022-09-01 14:55:22 +02:00
constructor (meta) {for (let key in meta) this[key] = meta[key];}
getName () {return this.name;}
getAuthor () {return this.author;}
getVersion () {return this.version;}
getDescription () {return `The Library Plugin needed for ${this.name} is missing. Open the Plugin Settings to download it. \n\n${this.description}`;}
2021-02-01 17:13:13 +01:00
downloadLibrary () {
require("request").get("https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js", (e, r, b) => {
2021-03-05 13:14:18 +01:00
if (!e && b && r.statusCode == 200) require("fs").writeFile(require("path").join(BdApi.Plugins.folder, "0BDFDB.plugin.js"), b, _ => BdApi.showToast("Finished downloading BDFDB Library", {type: "success"}));
2021-03-06 14:59:48 +01:00
else BdApi.alert("Error", "Could not download BDFDB Library Plugin. Try again later or download it manually from GitHub: https://mwittrien.github.io/downloader/?library");
2021-02-01 17:13:13 +01:00
});
}
2020-09-19 20:49:33 +02:00
2021-01-06 12:38:36 +01:00
load () {
2020-11-19 16:51:14 +01:00
if (!window.BDFDB_Global || !Array.isArray(window.BDFDB_Global.pluginQueue)) window.BDFDB_Global = Object.assign({}, window.BDFDB_Global, {pluginQueue: []});
2020-09-19 20:49:33 +02:00
if (!window.BDFDB_Global.downloadModal) {
window.BDFDB_Global.downloadModal = true;
2022-09-01 14:55:22 +02:00
BdApi.showConfirmationModal("Library Missing", `The Library Plugin needed for ${this.name} is missing. Please click "Download Now" to install it.`, {
2020-09-19 20:49:33 +02:00
confirmText: "Download Now",
cancelText: "Cancel",
onCancel: _ => {delete window.BDFDB_Global.downloadModal;},
2020-09-20 08:15:13 +02:00
onConfirm: _ => {
delete window.BDFDB_Global.downloadModal;
2021-02-01 17:13:13 +01:00
this.downloadLibrary();
2020-09-20 08:15:13 +02:00
}
2020-09-19 20:49:33 +02:00
});
2020-02-11 17:05:06 +01:00
}
2022-09-01 14:55:22 +02:00
if (!window.BDFDB_Global.pluginQueue.includes(this.name)) window.BDFDB_Global.pluginQueue.push(this.name);
2020-10-09 21:09:35 +02:00
}
2021-01-06 12:38:36 +01:00
start () {this.load();}
stop () {}
getSettingsPanel () {
2020-11-28 23:12:09 +01:00
let template = document.createElement("template");
2022-09-01 14:55:22 +02:00
template.innerHTML = `<div style="color: var(--header-primary); font-size: 16px; font-weight: 300; white-space: pre; line-height: 22px;">The Library Plugin needed for ${this.name} is missing.\nPlease click <a style="font-weight: 500;">Download Now</a> to install it.</div>`;
2021-02-01 17:13:13 +01:00
template.content.firstElementChild.querySelector("a").addEventListener("click", this.downloadLibrary);
2020-11-28 23:12:09 +01:00
return template.content.firstElementChild;
}
2020-10-09 21:09:35 +02:00
} : (([Plugin, BDFDB]) => {
2021-11-09 16:44:27 +01:00
let hiddenEles;
2020-10-09 21:09:35 +02:00
return class ServerHider extends Plugin {
2021-01-06 12:38:36 +01:00
onLoad () {
2021-04-21 20:20:36 +02:00
this.defaults = {
general: {
onlyHideInStream: {value: false, description: "Only hide selected Servers while in Streamer Mode"}
}
};
2022-10-13 12:59:46 +02:00
this.modulePatches = {
after: [
"GuildsBar"
]
2020-09-19 20:49:33 +02:00
};
}
2021-01-06 12:38:36 +01:00
onStart () {
2021-11-09 16:44:27 +01:00
hiddenEles = BDFDB.DataUtils.load(this, "hidden");
2021-04-21 20:20:36 +02:00
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.DispatchApiUtils, "dispatch", {after: e => {
2022-10-10 15:53:50 +02:00
if (e.methodArguments[0].type == "STREAMER_MODE_UPDATE") BDFDB.DiscordUtils.rerenderAll(true);
2021-04-21 20:20:36 +02:00
}});
2022-09-27 21:28:54 +02:00
BDFDB.PatchUtils.patch(this, BDFDB.LibraryModules.SortedGuildUtils, "getGuildFolderById", {after: e => {
2022-07-11 14:00:45 +02:00
let hiddenGuildIds = hiddenEles.servers || [];
2020-02-11 17:05:06 +01:00
if (e.returnValue && hiddenGuildIds.length) {
let folder = Object.assign({}, e.returnValue);
folder.guildIds = [].concat(folder.guildIds).filter(n => !hiddenGuildIds.includes(n));
folder.hiddenGuildIds = [].concat(folder.guildIds).filter(n => hiddenGuildIds.includes(n));
return folder;
}
}});
2022-12-02 10:44:04 +01:00
BDFDB.PatchUtils.patch(this, BDFDB.LibraryStores.GuildReadStateStore, "getMutableGuildStates", {after: e => {
2022-12-02 10:44:45 +01:00
if (!e.returnValue || this.settings.general.onlyHideInStream && !BDFDB.LibraryStores.StreamerModeStore.enabled) return;
2022-12-02 10:44:04 +01:00
let hiddenGuildIds = hiddenEles && hiddenEles.servers || [];
if (hiddenGuildIds.length) for (let id in e.returnValue) if (hiddenGuildIds.includes(id)) e.returnValue[id] = Object.assign({}, e.returnValue[id], {mentionCount: 0, mentionCounts: {}});
}});
2019-01-26 22:45:19 +01:00
2022-10-10 15:53:50 +02:00
BDFDB.DiscordUtils.rerenderAll();
2020-02-11 17:05:06 +01:00
}
2020-09-19 20:49:33 +02:00
2021-01-06 12:38:36 +01:00
onStop () {
2022-10-10 15:53:50 +02:00
BDFDB.DiscordUtils.rerenderAll();
2020-02-11 17:05:06 +01:00
}
2018-10-11 10:21:26 +02:00
2020-09-19 20:49:33 +02:00
getSettingsPanel (collapseStates = {}) {
2021-04-21 20:20:36 +02:00
let settingsPanel;
return settingsPanel = BDFDB.PluginUtils.createSettingsPanel(this, {
collapseStates: collapseStates,
children: _ => {
let settingsItems = [];
for (let key in this.defaults.general) settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsSaveItem, {
type: "Switch",
plugin: this,
keys: ["general", key],
label: this.defaults.general[key].description,
2022-07-11 14:00:45 +02:00
value: this.settings.general[key]
2021-04-21 20:20:36 +02:00
}));
2020-09-19 20:49:33 +02:00
2021-04-21 20:20:36 +02:00
settingsItems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SettingsItem, {
type: "Button",
color: BDFDB.LibraryComponents.Button.Colors.RED,
label: "Unhide all Servers/Folders",
onClick: _ => {
BDFDB.ModalUtils.confirm(this, "Are you sure you want to unhide all Servers and Folders?", _ => {
BDFDB.DataUtils.save([], this, "hidden");
2022-10-10 15:53:50 +02:00
BDFDB.DiscordUtils.rerenderAll(true);
2021-04-21 20:20:36 +02:00
});
},
children: BDFDB.LanguageUtils.LanguageStrings.RESET
}));
return settingsItems;
}
});
2020-02-11 17:05:06 +01:00
}
2020-09-19 20:49:33 +02:00
onGuildContextMenu (e) {
2022-10-13 12:59:46 +02:00
if (document.querySelector(BDFDB.dotCN.modalwrapper) || !BDFDB.DOMUtils.getParent(BDFDB.dotCN.guilds, e.instance.props.target)) return;
2020-05-20 14:40:43 +02:00
let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "devmode-copy-id", group: true});
2020-09-19 20:49:33 +02:00
children.splice(index > -1 ? index : children.length, 0, BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuGroup, {
children: [
BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: this.labels.context_serverhider,
2020-09-19 20:49:33 +02:00
id: BDFDB.ContextMenuUtils.createItemId(this.name, "submenu-hide"),
children: BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuGroup, {
children: [
BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: this.labels.submenu_openhidemenu,
2020-09-19 20:49:33 +02:00
id: BDFDB.ContextMenuUtils.createItemId(this.name, "openmenu"),
2021-11-09 16:44:27 +01:00
action: _ => this.showHideModal()
2020-09-19 20:49:33 +02:00
}),
2022-10-13 12:59:46 +02:00
!e.instance.props.guild && !e.instance.props.folderId ? null : BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: e.instance.props.guild ? this.labels.submenu_hideserver : this.labels.submenu_hidefolder,
2020-09-19 20:49:33 +02:00
id: BDFDB.ContextMenuUtils.createItemId(this.name, "hide"),
action: _ => {
2022-10-13 12:59:46 +02:00
if (e.instance.props.guild) this.toggleItem(hiddenEles && hiddenEles.servers || [], e.instance.props.guild.id, "servers");
else this.toggleItem(hiddenEles && hiddenEles.folders || [] || [], e.instance.props.folderId, "folders");
2020-09-19 20:49:33 +02:00
}
})
].filter(n => n)
})
2020-05-19 19:17:47 +02:00
})
2020-09-19 20:49:33 +02:00
]
}));
}
2020-10-31 11:49:46 +01:00
2022-10-13 12:59:46 +02:00
processGuildsBar (e) {
2022-09-27 14:54:19 +02:00
if (this.settings.general.onlyHideInStream && !BDFDB.LibraryStores.StreamerModeStore.enabled) return;
2020-10-31 11:49:46 +01:00
let hiddenGuildIds = hiddenEles.servers || [];
let hiddenFolderIds = hiddenEles.folders || [];
2022-12-02 10:44:04 +01:00
if (!hiddenGuildIds.length && !hiddenFolderIds.length) return;
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: ["folderNode", "guildNode"], someProps: true});
if (index > -1) for (let i in children) if (children[i] && children[i].props) {
if (children[i].props.folderNode) {
if (hiddenFolderIds.includes(children[i].props.folderNode.id)) children[i] = null;
else {
let guilds = [].concat(children[i].props.folderNode.children.filter(guild => !hiddenGuildIds.includes(guild.id)));
if (guilds.length) {
children[i].props.hiddenGuildIds = [].concat(children[i].props.folderNode.children.filter(guild => hiddenGuildIds.includes(guild.id)));
children[i].props.folderNode = Object.assign({}, children[i].props.folderNode, {children: guilds});
2020-02-11 17:05:06 +01:00
}
2022-12-02 10:44:04 +01:00
else children[i] = null;
2019-11-22 14:38:30 +01:00
}
2022-07-11 14:00:45 +02:00
}
2022-12-02 10:44:04 +01:00
else if (children[i].props.guildNode && hiddenGuildIds.includes(children[i].props.guildNode.id)) children[i] = null;
2019-11-22 14:26:12 +01:00
}
}
2019-01-26 22:45:19 +01:00
2021-01-06 12:38:36 +01:00
showHideModal () {
2021-11-09 16:44:27 +01:00
let switchInstances = {};
let hiddenGuildIds = hiddenEles && hiddenEles.servers || [];
let hiddenFolderIds = hiddenEles && hiddenEles.folders || [];
2022-09-27 21:28:54 +02:00
let guilds = BDFDB.LibraryModules.SortedGuildUtils.guildFolders.map(n => n.guildIds).flat(10).map(guildId => BDFDB.LibraryStores.GuildStore.getGuild(guildId)).filter(n => n);
let folders = BDFDB.LibraryModules.SortedGuildUtils.guildFolders.filter(n => n.folderId);
2020-09-19 20:49:33 +02:00
let foldersAdded = [];
BDFDB.ModalUtils.open(this, {
size: "MEDIUM",
header: this.labels.modal_header,
2021-01-23 18:50:24 +01:00
subHeader: "",
2020-09-19 20:49:33 +02:00
contentClassName: BDFDB.disCN.listscroller,
children: guilds.map((guild, i) => {
2021-11-09 16:44:27 +01:00
let folder = folders.find(folder => folder.guildIds.includes(guild.id));
let firstGuildInFolder = folder && !foldersAdded.includes(folder.folderId);
if (firstGuildInFolder) foldersAdded.push(folder.folderId);
2020-09-19 20:49:33 +02:00
return [
2021-11-09 16:44:27 +01:00
firstGuildInFolder ? [
!(folders.indexOf(folder) == 0 && i == 0) && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
className: BDFDB.disCNS.margintop4 + BDFDB.disCN.marginbottom4
}),
2020-09-19 20:49:33 +02:00
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ListRow, {
prefix: BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN.listavatar,
2022-10-13 12:59:46 +02:00
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
className: BDFDB.disCN.guildfoldericonwrapper,
children: BDFDB.ReactUtils.createElement("div", {
className: BDFDB.disCN.guildfoldericonwrapperexpanded,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.SvgIcon, {
name: BDFDB.LibraryComponents.SvgIcon.Names.FOLDER,
color: BDFDB.ColorUtils.convert(folder.folderColor, "RGB") || "var(--bdfdb-blurple)"
2019-11-22 14:26:12 +01:00
})
})
})
2020-09-19 20:49:33 +02:00
}),
label: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextScroller, {
children: folder.folderName || `${BDFDB.LanguageUtils.LanguageStrings.SERVER_FOLDER_PLACEHOLDER} #${folders.indexOf(folder) + 1}`
}),
suffix: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Switch, {
value: !hiddenFolderIds.includes(folder.folderId),
2021-11-09 16:44:27 +01:00
onChange: value => this.toggleItem(hiddenFolderIds, folder.folderId, "folders", value)
2019-11-22 14:26:12 +01:00
})
2020-09-19 20:49:33 +02:00
})
] : null,
2021-11-09 16:44:27 +01:00
(i > 0 || folder) && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, {
2020-09-19 20:49:33 +02:00
className: BDFDB.disCNS.margintop4 + BDFDB.disCN.marginbottom4
}),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ListRow, {
2022-10-13 12:59:46 +02:00
prefix: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildIconComponents.Icon, {
2021-11-09 16:44:27 +01:00
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.listavatar, folder && BDFDB.disCN.marginleft8),
2020-09-19 20:49:33 +02:00
guild: guild,
2022-10-13 12:59:46 +02:00
size: BDFDB.LibraryComponents.GuildIconComponents.Icon.Sizes.MEDIUM
2020-02-11 17:05:06 +01:00
}),
label: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TextScroller, {
2020-09-19 20:49:33 +02:00
children: guild.name
2020-02-11 17:05:06 +01:00
}),
suffix: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Switch, {
2021-11-09 16:44:27 +01:00
ref: instance => {if (instance) switchInstances[guild.id] = instance;},
2020-09-19 20:49:33 +02:00
value: !hiddenGuildIds.includes(guild.id),
2021-11-09 16:44:27 +01:00
onChange: value => this.toggleItem(hiddenGuildIds, guild.id, "servers", value)
2019-11-22 14:26:12 +01:00
})
2020-02-11 17:05:06 +01:00
})
2020-09-19 20:49:33 +02:00
];
}).flat(10).filter(n => n),
buttons: [{
contents: BDFDB.LanguageUtils.LanguageStrings.OKAY,
color: "BRAND",
close: true
}, {
contents: BDFDB.LanguageUtils.LanguageStrings.FORM_LABEL_ALL,
color: "TRANSPARENT",
look: "LINK",
2021-01-23 18:50:24 +01:00
onClick: (modal, instance) => {
2020-09-19 20:49:33 +02:00
let enabled = hiddenGuildIds.includes(guilds[0].id);
hiddenGuildIds = [].concat(enabled ? [] : guilds.map(n => n.id));
hiddenFolderIds = [].concat(enabled ? [] : folders.map(n => n.folderId));
2021-11-09 16:44:27 +01:00
hiddenEles = {servers: hiddenGuildIds, folders: hiddenFolderIds};
BDFDB.DataUtils.save(hiddenEles, this, "hidden");
for (let i in switchInstances) switchInstances[i].props.value = enabled;
BDFDB.ReactUtils.forceUpdate(BDFDB.ObjectUtils.toArray(switchInstances));
2022-10-10 15:53:50 +02:00
BDFDB.DiscordUtils.rerenderAll(true);
2020-09-19 20:49:33 +02:00
}
}]
});
}
toggleItem (array, id, type, force) {
if (!id) return;
if (force || (force === undefined && array.includes(id))) BDFDB.ArrayUtils.remove(array, id, true);
else array.push(id);
2021-11-09 16:44:27 +01:00
hiddenEles = Object.assign({}, hiddenEles, {[type]: array});
BDFDB.DataUtils.save(hiddenEles, this, "hidden");
2022-10-10 15:53:50 +02:00
BDFDB.DiscordUtils.rerenderAll(true);
2020-02-11 17:05:06 +01:00
}
2020-07-26 16:39:51 +02:00
2021-01-06 12:38:36 +01:00
setLabelsByLanguage () {
2020-09-19 20:49:33 +02:00
switch (BDFDB.LanguageUtils.getLanguage().id) {
case "bg": // Bulgarian
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Видимост на сървъра",
modal_header: "Управление на сървърния списък",
submenu_hidefolder: "Скриване на папката",
submenu_hideserver: "Скриване на сървъра",
submenu_openhidemenu: "Управление на сървърния списък"
2020-09-19 20:49:33 +02:00
};
case "da": // Danish
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Server synlighed",
modal_header: "Administration af serverliste",
submenu_hidefolder: "Skjul mappe",
submenu_hideserver: "Skjul server",
submenu_openhidemenu: "Administrer serverliste"
2020-09-19 20:49:33 +02:00
};
case "de": // German
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Serversichtbarkeit",
modal_header: "Serverlistenverwaltung",
submenu_hidefolder: "Ordner ausblenden",
submenu_hideserver: "Server ausblenden",
submenu_openhidemenu: "Serverliste verwalten"
2020-09-19 20:49:33 +02:00
};
case "el": // Greek
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Ορατότητα διακομιστή",
modal_header: "Διαχείριση λίστας διακομιστών",
submenu_hidefolder: "Απόκρυψη φακέλου",
submenu_hideserver: "Απόκρυψη διακομιστή",
submenu_openhidemenu: "Διαχείριση λίστας διακομιστών"
2020-09-19 20:49:33 +02:00
};
case "es": // Spanish
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Visibilidad del servidor",
modal_header: "Gestión de la lista de servidores",
submenu_hidefolder: "Ocultar carpeta",
submenu_hideserver: "Ocultar servidor",
submenu_openhidemenu: "Administrar lista de servidores"
2020-09-19 20:49:33 +02:00
};
case "fi": // Finnish
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Palvelimen näkyvyys",
modal_header: "Palvelinluettelon hallinta",
submenu_hidefolder: "Piilota kansio",
submenu_hideserver: "Piilota palvelin",
submenu_openhidemenu: "Hallitse palvelinluetteloa"
2020-09-19 20:49:33 +02:00
};
case "fr": // French
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Visibilité du serveur",
modal_header: "Gestion de la liste des serveurs",
submenu_hidefolder: "Masquer le dossier",
submenu_hideserver: "Masquer le serveur",
submenu_openhidemenu: "Gérer la liste des serveurs"
2020-09-19 20:49:33 +02:00
};
case "hr": // Croatian
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Vidljivost poslužitelja",
modal_header: "Upravljanje popisom poslužitelja",
submenu_hidefolder: "Sakrij mapu",
submenu_hideserver: "Sakrij poslužitelj",
submenu_openhidemenu: "Upravljanje popisom poslužitelja"
2020-09-19 20:49:33 +02:00
};
case "hu": // Hungarian
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Szerver láthatósága",
modal_header: "Szerverlista kezelése",
submenu_hidefolder: "Mappa elrejtése",
submenu_hideserver: "Szerver elrejtése",
submenu_openhidemenu: "Szerverlista kezelése"
2020-09-19 20:49:33 +02:00
};
case "it": // Italian
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Visibilità del server",
modal_header: "Gestione dell'elenco dei server",
submenu_hidefolder: "Nascondi cartella",
submenu_hideserver: "Nascondi server",
submenu_openhidemenu: "Gestisci elenco server"
2020-09-19 20:49:33 +02:00
};
case "ja": // Japanese
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "サーバーの可視性",
modal_header: "サーバーリストの管理",
submenu_hidefolder: "フォルダを隠す",
submenu_hideserver: "サーバーを隠す",
submenu_openhidemenu: "サーバーリストの管理"
2020-09-19 20:49:33 +02:00
};
case "ko": // Korean
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "서버 가시성",
modal_header: "서버 목록 관리",
submenu_hidefolder: "폴더 숨기기",
submenu_hideserver: "서버 숨기기",
submenu_openhidemenu: "서버 목록 관리"
2020-09-19 20:49:33 +02:00
};
case "lt": // Lithuanian
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Serverio matomumas",
modal_header: "Serverių sąrašo tvarkymas",
submenu_hidefolder: "Slėpti aplanką",
submenu_hideserver: "Slėpti serverį",
submenu_openhidemenu: "Tvarkyti serverių sąrašą"
2020-09-19 20:49:33 +02:00
};
case "nl": // Dutch
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Zichtbaarheid van de server",
modal_header: "Serverlijst beheren",
submenu_hidefolder: "Verberg map",
submenu_hideserver: "Verberg server",
submenu_openhidemenu: "Beheer serverlijst"
2020-09-19 20:49:33 +02:00
};
case "no": // Norwegian
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Server synlighet",
modal_header: "Administrere serverliste",
submenu_hidefolder: "Skjul mappe",
submenu_hideserver: "Skjul server",
submenu_openhidemenu: "Administrer serverliste"
2020-09-19 20:49:33 +02:00
};
case "pl": // Polish
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Widoczność serwera",
modal_header: "Zarządzanie listą serwerów",
submenu_hidefolder: "Ukryj folder",
submenu_hideserver: "Ukryj serwer",
submenu_openhidemenu: "Zarządzaj listą serwerów"
2020-09-19 20:49:33 +02:00
};
case "pt-BR": // Portuguese (Brazil)
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Visibilidade do servidor",
modal_header: "Gerenciando a lista de servidores",
submenu_hidefolder: "Ocultar pasta",
submenu_hideserver: "Esconder Servidor",
submenu_openhidemenu: "Gerenciar lista de servidores"
2020-09-19 20:49:33 +02:00
};
case "ro": // Romanian
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Vizibilitatea serverului",
modal_header: "Gestionarea listei serverelor",
submenu_hidefolder: "Ascundeți dosarul",
submenu_hideserver: "Ascundeți serverul",
submenu_openhidemenu: "Gestionați lista serverelor"
2020-09-19 20:49:33 +02:00
};
case "ru": // Russian
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Видимость сервера",
modal_header: "Управление списком серверов",
submenu_hidefolder: "Скрыть папку",
submenu_hideserver: "Скрыть сервер",
submenu_openhidemenu: "Управление списком серверов"
2020-09-19 20:49:33 +02:00
};
case "sv": // Swedish
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "Servers synlighet",
modal_header: "Hantera serverlista",
submenu_hidefolder: "Dölj mapp",
submenu_hideserver: "Dölj server",
submenu_openhidemenu: "Hantera serverlista"
2020-09-19 20:49:33 +02:00
};
case "th": // Thai
2020-09-19 20:49:33 +02:00
return {
context_serverhider: "การเปิดเผยเซิร์ฟเวอร์",
modal_header: "การจัดการรายชื่อเซิร์ฟเวอร์",
submenu_hidefolder: "ซ่อนโฟลเดอร์",
submenu_hideserver: "ซ่อนเซิร์ฟเวอร์",
submenu_openhidemenu: "จัดการรายชื่อเซิร์ฟเวอร์"
};
case "tr": // Turkish
return {
context_serverhider: "Sunucu Görünürlüğü",
modal_header: "Sunucu Listesini Yönetme",
submenu_hidefolder: "Klasörü Gizle",
submenu_hideserver: "Sunucuyu Gizle",
submenu_openhidemenu: "Sunucu Listesini Yönetin"
};
case "uk": // Ukrainian
return {
context_serverhider: "Видимість сервера",
modal_header: "Керування списком серверів",
submenu_hidefolder: "Сховати папку",
submenu_hideserver: "Сховати сервер",
submenu_openhidemenu: "Керування списком серверів"
};
case "vi": // Vietnamese
return {
context_serverhider: "Hiển thị Máy chủ",
modal_header: "Quản lý danh sách máy chủ",
submenu_hidefolder: "Ẩn thư mục",
submenu_hideserver: "Ẩn máy chủ",
submenu_openhidemenu: "Quản lý danh sách máy chủ"
};
2021-01-15 17:54:22 +01:00
case "zh-CN": // Chinese (China)
return {
context_serverhider: "服务器可见性",
modal_header: "管理服务器列表",
submenu_hidefolder: "隐藏资料夹",
submenu_hideserver: "隐藏服务器",
submenu_openhidemenu: "管理服务器列表"
};
2021-01-15 17:54:22 +01:00
case "zh-TW": // Chinese (Taiwan)
return {
context_serverhider: "服務器可見性",
modal_header: "管理服務器列表",
submenu_hidefolder: "隱藏資料夾",
submenu_hideserver: "隱藏服務器",
submenu_openhidemenu: "管理服務器列表"
};
default: // English
return {
context_serverhider: "Server Visibility",
modal_header: "Managing Server List",
submenu_hidefolder: "Hide Folder",
submenu_hideserver: "Hide Server",
submenu_openhidemenu: "Manage Server List"
2020-09-19 20:49:33 +02:00
};
}
}
};
2022-09-01 14:40:11 +02:00
})(window.BDFDB_Global.PluginUtils.buildPlugin(changeLog));
2020-09-19 20:49:33 +02:00
})();