2020-10-20 23:25:34 +02:00
/ * *
* @ name ServerHider
* @ authorId 278543574059057154
* @ invite Jx3TjNS
* @ donate https : //www.paypal.me/MircoWittrien
* @ patreon https : //www.patreon.com/MircoWittrien
* @ website https : //github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/ServerHider
* @ source https : //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/ServerHider/ServerHider.plugin.js
2020-11-12 17:30:48 +01:00
* @ updateUrl https : //raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/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 = ( _ => {
2020-10-09 21:09:35 +02:00
const config = {
2020-09-19 20:49:33 +02:00
"info" : {
"name" : "ServerHider" ,
"author" : "DevilBro" ,
2020-11-16 10:41:44 +01:00
"version" : "6.1.9" ,
2021-02-15 14:02:27 +01:00
"description" : "Allows you to hide certain Servers in your Server List"
2020-10-31 11:49:46 +01:00
} ,
"changeLog" : {
"fixed" : {
2020-11-16 10:41:44 +01:00
"Works again" : "Can discord stop messing with the server list, jeez"
2020-10-31 11:49:46 +01:00
}
2020-02-11 17:05:06 +01:00
}
2020-09-19 20:49:33 +02:00
} ;
2020-11-13 19:47:44 +01:00
2020-10-09 21:09:35 +02:00
return ! window . BDFDB _Global || ( ! window . BDFDB _Global . loaded && ! window . BDFDB _Global . started ) ? class {
2021-01-06 12:38:36 +01:00
getName ( ) { return config . info . name ; }
getAuthor ( ) { return config . info . author ; }
getVersion ( ) { return config . info . version ; }
2021-02-01 17:13:13 +01:00
getDescription ( ) { return ` The Library Plugin needed for ${ config . info . name } is missing. Open the Plugin Settings to download it. \n \n ${ config . info . description } ` ; }
downloadLibrary ( ) {
require ( "request" ) . get ( "https://mwittrien.github.io/BetterDiscordAddons/Library/0BDFDB.plugin.js" , ( e , r , b ) => {
2021-02-02 11:22:26 +01:00
if ( ! e && b && b . indexOf ( ` * @name BDFDB ` ) > - 1 ) require ( "fs" ) . writeFile ( require ( "path" ) . join ( BdApi . Plugins . folder , "0BDFDB.plugin.js" ) , b , _ => BdApi . showToast ( "Finished downloading BDFDB Library" , { type : "success" } ) ) ;
2021-02-01 17:13:13 +01:00
else BdApi . alert ( "Error" , "Could not download BDFDB Library Plugin, try again later or download it manually from GitHub: https://github.com/mwittrien/BetterDiscordAddons/tree/master/Library/" ) ;
} ) ;
}
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 ;
2021-01-14 16:14:44 +01:00
BdApi . showConfirmationModal ( "Library Missing" , ` The Library Plugin needed for ${ config . info . 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
}
2020-09-19 20:49:33 +02:00
if ( ! window . BDFDB _Global . pluginQueue . includes ( config . info . name ) ) window . BDFDB _Global . pluginQueue . push ( config . info . 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" ) ;
2021-01-14 16:14:44 +01: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 ${ config . info . name } is missing. \n Please 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 ] ) => {
return class ServerHider extends Plugin {
2021-01-06 12:38:36 +01:00
onLoad ( ) {
2020-09-19 20:49:33 +02:00
this . patchedModules = {
after : {
Guilds : "render"
}
} ;
}
2021-01-06 12:38:36 +01:00
onStart ( ) {
2020-09-11 19:31:36 +02:00
BDFDB . PatchUtils . patch ( this , BDFDB . LibraryModules . FolderStore , "getGuildFolderById" , { after : e => {
2020-02-11 17:05:06 +01:00
let hiddenGuildIds = BDFDB . DataUtils . load ( this , "hidden" , "servers" ) || [ ] ;
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
2020-09-11 19:31:36 +02:00
BDFDB . PatchUtils . forceAllUpdates ( this ) ;
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 ( ) {
2020-09-11 19:31:36 +02:00
BDFDB . PatchUtils . forceAllUpdates ( this ) ;
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 = { } ) {
let settingsPanel , settingsItems = [ ] ;
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" ) ;
BDFDB . PatchUtils . forceAllUpdates ( this ) ;
} ) ;
} ,
children : BDFDB . LanguageUtils . LanguageStrings . RESET
} ) ) ;
return settingsPanel = BDFDB . PluginUtils . createSettingsPanel ( this , 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 , {
2020-12-21 19:56:36 +01:00
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 , {
2020-12-21 19:56:36 +01:00
label : this . labels . submenu _openhidemenu ,
2020-09-19 20:49:33 +02:00
id : BDFDB . ContextMenuUtils . createItemId ( this . name , "openmenu" ) ,
action : _ => {
this . showHideModal ( ) ;
}
} ) ,
! instance . props . guild && ! instance . props . folderId ? null : BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
2020-12-21 19:56:36 +01:00
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 : _ => {
if ( instance . props . guild ) this . toggleItem ( BDFDB . DataUtils . load ( this , "hidden" , "servers" ) || [ ] , instance . props . guild . id , "servers" ) ;
else this . toggleItem ( BDFDB . DataUtils . load ( this , "hidden" , "folders" ) || [ ] , instance . props . folderId , "folders" ) ;
}
} )
] . 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 ) {
2020-10-31 11:49:46 +01:00
if ( typeof e . returnvalue . props . children == "function" ) {
let childrenRender = e . returnvalue . props . children ;
e . returnvalue . props . children = ( ... args ) => {
2020-11-16 10:41:44 +01:00
let children = childrenRender ( ... args ) ;
this . checkTree ( children ) ;
return children ;
} ;
}
else this . checkTree ( e . returnvalue ) ;
}
checkTree ( returnvalue ) {
let tree = BDFDB . ReactUtils . findChild ( returnvalue , { filter : n => n && n . props && typeof n . props . children == "function" } ) ;
if ( tree ) {
let childrenRender = tree . props . children ;
tree . props . children = ( ... args ) => {
2020-10-31 11:49:46 +01:00
let children = childrenRender ( ... args ) ;
this . handleGuilds ( children ) ;
return children ;
} ;
}
2020-11-16 10:41:44 +01:00
else this . handleGuilds ( returnvalue ) ;
2020-10-31 11:49:46 +01:00
}
handleGuilds ( returnvalue ) {
let hiddenEles = BDFDB . DataUtils . load ( this , "hidden" ) ;
let hiddenGuildIds = hiddenEles . servers || [ ] ;
let hiddenFolderIds = hiddenEles . folders || [ ] ;
2020-09-19 20:49:33 +02:00
if ( hiddenGuildIds . length || hiddenFolderIds . length ) {
2020-11-19 16:51:14 +01:00
let [ children , index ] = BDFDB . ReactUtils . findParent ( returnvalue , { props : [ "folderId" , "guildId" ] , someProps : true } ) ;
2020-10-31 21:55:20 +01:00
if ( index > - 1 ) for ( let i in children ) if ( children [ i ] && children [ i ] . props ) {
2020-10-31 21:47:29 +01:00
if ( children [ i ] . props . folderId ) {
2020-10-31 21:58:49 +01:00
if ( hiddenFolderIds . includes ( children [ i ] . props . folderId ) ) children [ i ] = null ;
2020-09-19 20:49:33 +02:00
else {
2020-10-31 21:47:29 +01:00
let guildIds = [ ] . concat ( children [ i ] . props . guildIds . filter ( guildId => ! hiddenGuildIds . includes ( guildId ) ) ) ;
2020-09-19 20:49:33 +02:00
if ( guildIds . length ) {
2020-10-31 21:47:29 +01:00
children [ i ] . props . hiddenGuildIds = [ ] . concat ( children [ i ] . props . guildIds . filter ( guildId => hiddenGuildIds . includes ( guildId ) ) ) ;
children [ i ] . props . guildIds = guildIds ;
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
}
2020-10-31 21:47:29 +01:00
else if ( children [ i ] . props . guildId && hiddenGuildIds . includes ( children [ i ] . props . guildId ) ) 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 ( ) {
2020-09-19 20:49:33 +02:00
let hiddenGuildIds = BDFDB . DataUtils . load ( this , "hidden" , "servers" ) || [ ] ;
let hiddenFolderIds = BDFDB . DataUtils . load ( this , "hidden" , "folders" ) || [ ] ;
let guilds = BDFDB . LibraryModules . FolderStore . guildFolders . map ( n => n . guildIds ) . flat ( 10 ) . map ( guildId => BDFDB . LibraryModules . GuildStore . getGuild ( guildId ) ) . filter ( n => n ) ;
let folders = BDFDB . LibraryModules . FolderStore . guildFolders . filter ( n => n . folderId ) ;
let foldersAdded = [ ] ;
BDFDB . ModalUtils . open ( this , {
size : "MEDIUM" ,
2020-12-21 19:56:36 +01:00
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 ) => {
let folder = folders . find ( folder => folder . guildIds . includes ( guild . id ) && ! foldersAdded . includes ( folder . folderId ) ) ;
if ( folder ) foldersAdded . push ( folder . folderId ) ;
return [
folder ? [
folders . indexOf ( folder ) == 0 ? null : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormDivider , {
className : BDFDB . disCNS . margintop4 + BDFDB . disCN . marginbottom4
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormDivider , {
className : BDFDB . disCNS . margintop8 + BDFDB . disCN . marginbottom4
} )
] ,
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 ) ,
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 ,
i == 0 && ! folder ? null : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . FormComponents . FormDivider , {
className : BDFDB . disCNS . margintop4 + BDFDB . disCN . marginbottom4
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . ListRow , {
prefix : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . GuildComponents . Guild , {
className : BDFDB . disCN . listavatar ,
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 , {
2020-09-19 20:49:33 +02:00
value : ! hiddenGuildIds . includes ( guild . id ) ,
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 ) ) ;
BDFDB . DataUtils . save ( hiddenGuildIds , this , "hidden" , "servers" ) ;
hiddenFolderIds = [ ] . concat ( enabled ? [ ] : folders . map ( n => n . folderId ) ) ;
BDFDB . DataUtils . save ( hiddenFolderIds , this , "hidden" , "folders" ) ;
2020-11-19 16:51:14 +01:00
let switchInstances = BDFDB . ReactUtils . findOwner ( instance , { name : "BDFDB_Switch" , all : true , unlimited : true } ) ;
2020-09-19 20:49:33 +02:00
for ( let switchIns of switchInstances ) switchIns . props . value = enabled ;
BDFDB . ReactUtils . forceUpdate ( switchInstances ) ;
BDFDB . PatchUtils . forceAllUpdates ( this ) ;
}
} ]
} ) ;
}
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 ) ;
BDFDB . DataUtils . save ( array , this , "hidden" , type ) ;
BDFDB . PatchUtils . forceAllUpdates ( this ) ;
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 ) {
2020-12-21 19:56:36 +01:00
case "bg" : // Bulgarian
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
context _serverhider : "Видимост на сървъра" ,
modal _header : "Управление на сървърния списък" ,
submenu _hidefolder : "Скриване на папката" ,
submenu _hideserver : "Скриване на сървъра" ,
submenu _openhidemenu : "Управление на сървърния списък"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "da" : // Danish
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "de" : // German
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "el" : // Greek
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
context _serverhider : "Ορατότητα διακομιστή" ,
modal _header : "Διαχείριση λίστας διακομιστών" ,
submenu _hidefolder : "Απόκρυψη φακέλου" ,
submenu _hideserver : "Απόκρυψη διακομιστή" ,
submenu _openhidemenu : "Διαχείριση λίστας διακομιστών"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "es" : // Spanish
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "fi" : // Finnish
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "fr" : // French
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "hr" : // Croatian
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "hu" : // Hungarian
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "it" : // Italian
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "ja" : // Japanese
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
context _serverhider : "サーバーの可視性" ,
modal _header : "サーバーリストの管理" ,
submenu _hidefolder : "フォルダを隠す" ,
submenu _hideserver : "サーバーを隠す" ,
submenu _openhidemenu : "サーバーリストの管理"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "ko" : // Korean
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
context _serverhider : "서버 가시성" ,
modal _header : "서버 목록 관리" ,
submenu _hidefolder : "폴더 숨기기" ,
submenu _hideserver : "서버 숨기기" ,
submenu _openhidemenu : "서버 목록 관리"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "lt" : // Lithuanian
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "nl" : // Dutch
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "no" : // Norwegian
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "pl" : // Polish
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "pt-BR" : // Portuguese (Brazil)
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "ro" : // Romanian
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "ru" : // Russian
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
context _serverhider : "Видимость сервера" ,
modal _header : "Управление списком серверов" ,
submenu _hidefolder : "Скрыть папку" ,
submenu _hideserver : "Скрыть сервер" ,
submenu _openhidemenu : "Управление списком серверов"
2020-09-19 20:49:33 +02:00
} ;
2020-12-21 19:56:36 +01:00
case "sv" : // Swedish
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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
} ;
2020-12-21 19:56:36 +01:00
case "th" : // Thai
2020-09-19 20:49:33 +02:00
return {
2020-12-21 19:56:36 +01:00
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)
2020-12-21 19:56:36 +01:00
return {
context _serverhider : "服务器可见性" ,
modal _header : "管理服务器列表" ,
submenu _hidefolder : "隐藏资料夹" ,
submenu _hideserver : "隐藏服务器" ,
submenu _openhidemenu : "管理服务器列表"
} ;
2021-01-15 17:54:22 +01:00
case "zh-TW" : // Chinese (Taiwan)
2020-12-21 19:56:36 +01:00
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
} ;
}
}
} ;
2020-10-09 21:09:35 +02:00
} ) ( window . BDFDB _Global . PluginUtils . buildPlugin ( config ) ) ;
2020-09-19 20:49:33 +02:00
} ) ( ) ;