BetterDiscordAddons/Plugins/ServerHider/ServerHider.plugin.js

543 lines
24 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-08-01 22:55:52 +02:00
* @version 6.2.4
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"}
}
};
2020-09-19 20:49:33 +02:00
this.patchedModules = {
after: {
2021-10-18 18:37:44 +02:00
Guilds: "type"
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-08-01 22:55:52 +02:00
if (e.methodArguments[0].type == "STREAMER_MODE_UPDATE") BDFDB.GuildUtils.rerenderAll(true);
2021-04-21 20:20:36 +02:00
}});
2022-09-27 16:53:10 +02:00
BDFDB.PatchUtils.patch(this, BDFDB.LibraryStores.SortedGuildStore, "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;
}
}});
2019-01-26 22:45:19 +01:00
2021-10-18 18:37:44 +02:00
BDFDB.GuildUtils.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 () {
2021-10-18 18:37:44 +02:00
BDFDB.GuildUtils.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");
2021-10-18 18:37:44 +02:00
BDFDB.GuildUtils.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) {
if (document.querySelector(BDFDB.dotCN.modalwrapper)) return;
if (e.type == "GuildIconNewContextMenu") {
let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "create", group: true});
this.injectItem(e.instance, children, -1);
}
else {
let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "devmode-copy-id", group: true});
this.injectItem(e.instance, children, index);
}
}
onGuildFolderContextMenu (e) {
if (document.querySelector(BDFDB.dotCN.modalwrapper)) return;
2020-05-20 14:40:43 +02:00
let [children, index] = BDFDB.ContextMenuUtils.findItem(e.returnvalue, {id: "devmode-copy-id", group: true});
2020-05-19 19:17:47 +02:00
this.injectItem(e.instance, children, index);
}
2020-09-19 20:49:33 +02:00
injectItem (instance, children, index) {
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
}),
!instance.props.guild && !instance.props.folderId ? null : BDFDB.ContextMenuUtils.createItem(BDFDB.LibraryComponents.MenuItems.MenuItem, {
label: 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: _ => {
2021-11-09 16:44:27 +01:00
if (instance.props.guild) this.toggleItem(hiddenEles && hiddenEles.servers || [], instance.props.guild.id, "servers");
else this.toggleItem(hiddenEles && hiddenEles.folders || [] || [], 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
2020-09-19 20:49:33 +02:00
processGuilds (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 || [];
2020-09-19 20:49:33 +02:00
if (hiddenGuildIds.length || hiddenFolderIds.length) {
2021-11-09 16:44:27 +01:00
let [children, index] = BDFDB.ReactUtils.findParent(e.returnvalue, {props: ["folderNode", "guildNode"], someProps: true});
2020-10-31 21:55:20 +01:00
if (index > -1) for (let i in children) if (children[i] && children[i].props) {
2021-11-09 16:44:27 +01:00
if (children[i].props.folderNode) {
if (hiddenFolderIds.includes(children[i].props.folderNode.id)) children[i] = null;
2020-09-19 20:49:33 +02:00
else {
2021-11-09 16:44:27 +01:00
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-09-19 20:49:33 +02:00
}
else children[i] = null;
2020-02-11 17:05:06 +01:00
}
2019-11-22 14:38:30 +01:00
}
2021-11-09 16:44:27 +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
}
2022-07-11 14:00:45 +02:00
let topBar = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.guildswrapperunreadmentionsbartop]]});
if (topBar) {
let topIsVisible = topBar.props.isVisible;
topBar.props.isVisible = BDFDB.TimeUtils.suppress((...args) => {
args[2] = args[2].filter(id => !hiddenGuildIds.includes(id));
2022-09-27 16:53:10 +02:00
return topIsVisible(...args) || BDFDB.LibraryStores.GuildReadStateStore.getMentionCount(args[0]) == 0;
2022-07-11 14:00:45 +02:00
}, "Error in isVisible of Top Bar in Guild List!");
}
let bottomBar = BDFDB.ReactUtils.findChild(e.returnvalue, {props: [["className", BDFDB.disCN.guildswrapperunreadmentionsbarbottom]]});
if (bottomBar) {
let bottomIsVisible = bottomBar.props.isVisible;
bottomBar.props.isVisible = BDFDB.TimeUtils.suppress((...args) => {
args[2] = args[2].filter(id => !hiddenGuildIds.includes(id));
2022-09-27 16:53:10 +02:00
return bottomIsVisible(...args) || BDFDB.LibraryStores.GuildReadStateStore.getMentionCount(args[0]) == 0;
2022-07-11 14:00:45 +02:00
}, "Error in isVisible of Bottom Bar in Guild List!");
}
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 16:53:10 +02:00
let guilds = BDFDB.LibraryStores.SortedGuildStore.guildFolders.map(n => n.guildIds).flat(10).map(guildId => BDFDB.LibraryStores.GuildStore.getGuild(guildId)).filter(n => n);
let folders = BDFDB.LibraryStores.SortedGuildStore.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,
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildComponents.BlobMask, {
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, {
className: BDFDB.disCN.guildfolder,
2020-02-11 17:05:06 +01:00
children: BDFDB.ReactUtils.createElement("div", {
2020-09-19 20:49:33 +02:00
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,
2020-12-16 16:35:56 +01:00
color: BDFDB.ColorUtils.convert(folder.folderColor, "RGB") || "var(--bdfdb-blurple)"
2020-09-19 20:49:33 +02:00
})
2020-02-11 17:05:06 +01:00
})
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, {
prefix: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.GuildComponents.Guild, {
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,
menu: false,
tooltip: false
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));
2021-10-18 18:37:44 +02:00
BDFDB.GuildUtils.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");
2021-10-18 18:37:44 +02:00
BDFDB.GuildUtils.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
})();