2020-10-20 23:25:34 +02:00
/ * *
* @ name ReadAllNotificationsButton
2021-03-05 13:26:41 +01:00
* @ author DevilBro
2020-10-20 23:25:34 +02:00
* @ authorId 278543574059057154
2021-05-22 16:56:13 +02:00
* @ version 1.6 . 8
2021-03-05 13:26:41 +01:00
* @ description Adds a Clear Button to the Server List and the Mentions Popout
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/ReadAllNotificationsButton/
2021-03-10 09:17:37 +01:00
* @ updateUrl https : //mwittrien.github.io/BetterDiscordAddons/Plugins/ReadAllNotificationsButton/ReadAllNotificationsButton.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" : "ReadAllNotificationsButton" ,
"author" : "DevilBro" ,
2021-05-22 16:56:13 +02:00
"version" : "1.6.8" ,
2021-03-05 11:21:21 +01:00
"description" : "Adds a Clear Button to the Server List and the Mentions Popout"
2020-09-19 20:49:33 +02:00
}
} ;
2020-11-13 19:47:44 +01:00
2021-06-15 13:42:02 +02:00
return ( window . Lightcord || window . LightCord ) ? class {
getName ( ) { return config . info . name ; }
getAuthor ( ) { return config . info . author ; }
getVersion ( ) { return config . info . version ; }
getDescription ( ) { return "Do not use LightCord!" ; }
load ( ) { BdApi . alert ( "Attention!" , "By using LightCord you are risking your Discord Account, due to using a 3rd Party Client. Switch to an official Discord Client (https://discord.com/) with the proper BD Injection (https://betterdiscord.app/)" ) ; }
start ( ) { }
stop ( ) { }
} : ! 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-03-05 12:33:36 +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 ;
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
} ) ;
}
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 ] ) => {
2021-02-04 19:46:29 +01:00
var _this ;
2020-09-19 20:49:33 +02:00
var blacklist , clearing ;
var settings = { } ;
2021-02-04 19:46:29 +01:00
const ReadAllButtonComponent = class ReadAllButton extends BdApi . React . Component {
clearClick ( ) {
if ( settings . includeGuilds ) this . clearGuilds ( settings . includeMuted ? this . getGuilds ( ) : this . getUnread ( ) ) ;
if ( settings . includeDMs ) BDFDB . DMUtils . markAsRead ( this . getPingedDMs ( ) ) ;
}
clearGuilds ( guildIds ) {
BDFDB . GuildUtils . markAsRead ( guildIds . filter ( id => id && ! blacklist . includes ( id ) ) ) ;
}
getGuilds ( ) {
return BDFDB . LibraryModules . FolderStore . getFlattenedGuilds ( ) . map ( g => g . id ) . filter ( n => n ) ;
}
getUnread ( ) {
return this . getGuilds ( ) . filter ( id => BDFDB . LibraryModules . UnreadGuildUtils . hasUnread ( id ) || BDFDB . LibraryModules . UnreadGuildUtils . getMentionCount ( id ) > 0 ) ;
}
getPinged ( ) {
return this . getGuilds ( ) . filter ( id => BDFDB . LibraryModules . UnreadGuildUtils . getMentionCount ( id ) > 0 ) ;
}
getMuted ( ) {
return this . getGuilds ( ) . filter ( id => BDFDB . LibraryModules . MutedUtils . isGuildOrCategoryOrChannelMuted ( id ) ) ;
}
getPingedDMs ( ) {
return BDFDB . LibraryModules . ChannelStore . getSortedPrivateChannels ( ) . map ( c => c . id ) . filter ( id => id && BDFDB . LibraryModules . UnreadChannelUtils . getMentionCount ( id ) > 0 ) ;
}
render ( ) {
return BDFDB . ReactUtils . createElement ( "div" , {
className : BDFDB . disCNS . guildouter + BDFDB . disCN . _readallnotificationsbuttonframe ,
children : BDFDB . ReactUtils . createElement ( "div" , {
className : BDFDB . disCNS . guildiconwrapper + BDFDB . disCN . _readallnotificationsbuttoninner ,
children : BDFDB . ReactUtils . createElement ( "div" , {
className : BDFDB . disCNS . guildiconchildwrapper + BDFDB . disCN . _readallnotificationsbuttonbutton ,
children : "read all" ,
onClick : _ => {
if ( ! settings . confirmClear ) this . clearClick ( ) ;
2021-03-05 12:33:36 +01:00
else BDFDB . ModalUtils . confirm ( _this , _this . labels . modal _confirmnotifications , _ => this . clearClick ( ) ) ;
2021-02-04 19:46:29 +01:00
} ,
onContextMenu : event => {
BDFDB . ContextMenuUtils . open ( _this , event , BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuGroup , {
children : [
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : _this . labels . context _unreadguilds ,
id : BDFDB . ContextMenuUtils . createItemId ( _this . name , "mark-unread-read" ) ,
2021-02-04 19:54:17 +01:00
action : _ => this . clearGuilds ( this . getUnread ( ) )
2021-02-04 19:46:29 +01:00
} ) ,
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : _this . labels . context _pingedguilds ,
id : BDFDB . ContextMenuUtils . createItemId ( _this . name , "mark-pinged-read" ) ,
2021-02-04 19:54:17 +01:00
action : _ => this . clearGuilds ( this . getPinged ( ) )
2021-02-04 19:46:29 +01:00
} ) ,
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : _this . labels . context _mutedguilds ,
id : BDFDB . ContextMenuUtils . createItemId ( _this . name , "mark-muted-read" ) ,
2021-02-04 19:54:17 +01:00
action : _ => this . clearGuilds ( this . getMuted ( ) )
2021-02-04 19:46:29 +01:00
} ) ,
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : _this . labels . context _guilds ,
id : BDFDB . ContextMenuUtils . createItemId ( _this . name , "mark-all-read" ) ,
2021-02-04 19:54:17 +01:00
action : _ => this . clearGuilds ( this . getGuilds ( ) )
2021-02-04 19:46:29 +01:00
} ) ,
BDFDB . ContextMenuUtils . createItem ( BDFDB . LibraryComponents . MenuItems . MenuItem , {
label : _this . labels . context _dms ,
id : BDFDB . ContextMenuUtils . createItemId ( _this . name , "mark-dms-read" ) ,
2021-02-04 19:54:17 +01:00
action : _ => BDFDB . DMUtils . markAsRead ( this . getPingedDMs ( ) )
2021-02-04 19:46:29 +01:00
} )
]
} ) ) ;
}
} )
} )
} ) ;
}
} ;
2020-03-19 14:14:56 +01:00
2020-10-09 21:09:35 +02:00
return class ReadAllNotificationsButton extends Plugin {
2021-01-06 12:38:36 +01:00
onLoad ( ) {
2021-02-04 19:46:29 +01:00
_this = this ;
2020-09-19 20:49:33 +02:00
this . defaults = {
settings : {
2020-11-19 16:51:14 +01:00
addClearButton : { value : true , inner : false , description : "Add a 'Clear Mentions' button to the recent mentions popout" } ,
confirmClear : { value : false , inner : false , description : "Ask for your confirmation before clearing reads" } ,
includeGuilds : { value : true , inner : true , description : "unread Servers" } ,
includeMuted : { value : false , inner : true , description : "muted unread Servers" } ,
includeDMs : { value : false , inner : true , description : "unread DMs" }
2020-09-19 20:49:33 +02:00
}
} ;
this . patchedModules = {
after : {
Guilds : "render" ,
2020-11-20 16:52:10 +01:00
RecentMentions : "default" ,
2020-09-19 20:49:33 +02:00
RecentsHeader : "default"
}
} ;
this . css = `
$ { BDFDB . dotCN . messagespopouttabbar } {
flex : 1 0 auto ;
}
$ { BDFDB . dotCN . messagespopouttabbar } ~ * {
margin - left : 10 px ;
}
$ { BDFDB . dotCN . _readallnotificationsbuttonframe } {
2020-10-30 16:12:46 +01:00
height : 24 px ;
2020-09-19 20:49:33 +02:00
margin - bottom : 10 px ;
}
$ { BDFDB . dotCN . _readallnotificationsbuttonframe } : active {
transform : translateY ( 1 px ) ;
}
2020-10-30 16:12:46 +01:00
$ { BDFDB . dotCN . _readallnotificationsbuttoninner } {
height : 24 px ;
}
2020-09-19 20:49:33 +02:00
$ { BDFDB . dotCN . _readallnotificationsbuttonbutton } {
border - radius : 4 px ;
2020-10-30 16:12:46 +01:00
height : 24 px ;
2020-09-19 20:49:33 +02:00
font - size : 12 px ;
line - height : 1.3 ;
white - space : nowrap ;
2020-10-30 16:12:46 +01:00
cursor : pointer ;
2020-09-19 20:49:33 +02:00
}
` ;
}
2020-04-19 20:39:58 +02:00
2021-01-06 12:38:36 +01:00
onStart ( ) {
2020-09-19 20:49:33 +02:00
let loadedBlacklist = BDFDB . DataUtils . load ( this , "blacklist" ) ;
this . saveBlacklist ( ! BDFDB . ArrayUtils . is ( loadedBlacklist ) ? [ ] : loadedBlacklist ) ;
2019-01-26 22:45:19 +01:00
2020-09-19 20:49:33 +02:00
this . forceUpdateAll ( ) ;
}
2020-02-04 08:20:40 +01:00
2021-01-06 12:38:36 +01:00
onStop ( ) {
2020-09-19 20:49:33 +02:00
this . forceUpdateAll ( ) ;
}
getSettingsPanel ( collapseStates = { } ) {
let settingsPanel , settingsItems = [ ] ;
settingsItems . push ( BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . CollapseContainer , {
title : "Settings" ,
collapseStates : collapseStates ,
children : Object . keys ( settings ) . filter ( key => ! this . defaults . settings [ key ] . inner ) . map ( key => BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsSaveItem , {
2020-03-19 14:14:56 +01:00
type : "Switch" ,
plugin : this ,
keys : [ "settings" , key ] ,
label : this . defaults . settings [ key ] . description ,
value : settings [ key ]
2020-12-15 10:35:30 +01:00
} ) ) . concat ( BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsPanelList , {
2020-09-19 20:49:33 +02:00
title : "When left clicking the 'read all' button mark following Elements as read:" ,
2020-12-15 13:27:07 +01:00
first : false ,
last : true ,
2020-09-19 20:49:33 +02:00
children : Object . keys ( settings ) . filter ( key => this . defaults . settings [ key ] . inner ) . map ( key => BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsSaveItem , {
type : "Switch" ,
plugin : this ,
keys : [ "settings" , key ] ,
label : this . defaults . settings [ key ] . description ,
value : settings [ key ]
} ) )
2020-03-19 14:14:56 +01:00
} ) )
2020-09-19 20:49:33 +02:00
} ) ) ;
2020-03-19 14:14:56 +01:00
2020-09-19 20:49:33 +02:00
settingsItems . push ( BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . CollapseContainer , {
title : "Server Black List" ,
collapseStates : collapseStates ,
children : [
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsGuildList , {
className : BDFDB . disCN . marginbottom20 ,
disabled : BDFDB . DataUtils . load ( this , "blacklist" ) ,
onClick : disabledGuilds => {
this . saveBlacklist ( disabledGuilds ) ;
}
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Button" ,
color : BDFDB . LibraryComponents . Button . Colors . GREEN ,
label : "Enable for all Servers" ,
onClick : _ => {
this . batchSetGuilds ( settingsPanel , collapseStates , true ) ;
} ,
children : BDFDB . LanguageUtils . LanguageStrings . ENABLE
} ) ,
BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SettingsItem , {
type : "Button" ,
color : BDFDB . LibraryComponents . Button . Colors . PRIMARY ,
label : "Disable for all Servers" ,
onClick : _ => {
this . batchSetGuilds ( settingsPanel , collapseStates , false ) ;
} ,
children : BDFDB . LanguageUtils . LanguageStrings . DISABLE
} )
]
} ) ) ;
return settingsPanel = BDFDB . PluginUtils . createSettingsPanel ( this , settingsItems ) ;
2020-02-04 08:20:40 +01:00
}
2018-10-11 10:21:26 +02:00
2021-01-06 12:38:36 +01:00
onSettingsClosed ( ) {
2020-09-19 20:49:33 +02:00
if ( this . SettingsUpdated ) {
delete this . SettingsUpdated ;
this . forceUpdateAll ( ) ;
}
}
2021-01-06 12:38:36 +01:00
forceUpdateAll ( ) {
2020-09-19 20:49:33 +02:00
settings = BDFDB . DataUtils . get ( this , "settings" ) ;
2020-02-04 08:20:40 +01:00
2020-09-19 20:49:33 +02:00
BDFDB . PatchUtils . forceAllUpdates ( this ) ;
2020-02-04 08:20:40 +01:00
}
2020-10-30 16:12:46 +01:00
2020-09-19 20:49:33 +02:00
processGuilds ( e ) {
2020-10-30 16:12:46 +01:00
if ( typeof e . returnvalue . props . children == "function" ) {
let childrenRender = e . returnvalue . props . children ;
e . returnvalue . props . children = ( ... args ) => {
2020-11-16 09:59:51 +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-30 16:12:46 +01:00
let children = childrenRender ( ... args ) ;
2021-05-22 16:56:13 +02:00
this . handleGuilds ( children ) ;
2020-10-30 16:12:46 +01:00
return children ;
} ;
}
2021-05-22 16:56:13 +02:00
else this . handleGuilds ( returnvalue ) ;
2020-10-30 16:12:46 +01:00
}
2021-05-22 16:56:13 +02:00
handleGuilds ( returnvalue ) {
2020-10-30 16:12:46 +01:00
let [ children , index ] = BDFDB . ReactUtils . findParent ( returnvalue , { name : "ConnectedUnreadDMs" } ) ;
2021-02-04 19:46:29 +01:00
if ( index > - 1 ) children . splice ( index + 1 , 0 , BDFDB . ReactUtils . createElement ( ReadAllButtonComponent , { } ) ) ;
2020-09-19 20:49:33 +02:00
}
2019-01-26 22:45:19 +01:00
2020-11-20 16:52:10 +01:00
processRecentMentions ( e ) {
if ( e . instance . props . header && e . instance . props . header . props ) e . instance . props . header . props . messages = e . returnvalue . props . messages ;
2020-02-04 08:20:40 +01:00
}
2020-09-19 20:49:33 +02:00
processRecentsHeader ( e ) {
if ( settings . addClearButton && e . instance . props . tab == "Recent Mentions" ) e . returnvalue . props . children . push ( BDFDB . ReactUtils . createElement ( "div" , {
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . TooltipContainer , {
text : ` ${ BDFDB . LanguageUtils . LanguageStrings . CLOSE } ( ${ BDFDB . LanguageUtils . LanguageStrings . FORM _LABEL _ALL } ) ` ,
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . Clickable , {
2021-05-22 16:56:13 +02:00
className : BDFDB . disCNS . messagespopoutbutton + BDFDB . disCNS . messagespopoutbuttonsecondary + BDFDB . disCN . messagespopoutbuttonsize32 ,
2020-09-19 20:49:33 +02:00
children : BDFDB . ReactUtils . createElement ( BDFDB . LibraryComponents . SvgIcon , {
nativeClass : true ,
name : BDFDB . LibraryComponents . SvgIcon . Names . CLOSE ,
width : 16 ,
height : 16
} ) ,
onClick : _ => {
let clear = _ => {
2021-01-26 21:14:48 +01:00
if ( clearing ) return BDFDB . NotificationUtils . toast ( ` ${ this . labels . toast _alreadyclearing } - ${ BDFDB . LanguageUtils . LibraryStrings . please _wait } ` , { type : "danger" } ) ;
2020-11-18 17:59:44 +01:00
let messages = [ ] . concat ( e . instance . props . messages ) . filter ( n => n ) ;
2020-09-19 20:49:33 +02:00
if ( messages . length ) {
clearing = true ;
2021-01-26 21:14:48 +01:00
let toastInterval ;
let loadingString = ` ${ this . labels . toast _clearing } - ${ BDFDB . LanguageUtils . LibraryStrings . please _wait } ` ;
let currentLoadingString = loadingString ;
let toast = BDFDB . NotificationUtils . toast ( currentLoadingString , {
timeout : 0 ,
onClose : _ => { BDFDB . TimeUtils . clear ( toastInterval ) ; }
} ) ;
toastInterval = BDFDB . TimeUtils . interval ( _ => {
currentLoadingString = currentLoadingString . endsWith ( "....." ) ? loadingString : currentLoadingString + "." ;
toast . update ( currentLoadingString ) ;
} , 500 ) ;
2020-09-19 20:49:33 +02:00
for ( let i = 0 ; i < messages . length ; i ++ ) BDFDB . TimeUtils . timeout ( _ => {
BDFDB . LibraryModules . RecentMentionUtils . deleteRecentMention ( messages [ i ] . id ) ;
if ( i == messages . length - 1 ) {
clearing = false ;
toast . close ( ) ;
2021-01-26 21:14:48 +01:00
BDFDB . NotificationUtils . toast ( this . labels . toastcleared , { type : "success" } ) ;
2020-09-19 20:49:33 +02:00
}
} , i * 1000 ) ;
}
} ;
2021-01-26 21:14:48 +01:00
if ( settings . confirmClear ) BDFDB . ModalUtils . confirm ( this , this . labels . modal _confirmmentions , clear ) ;
2020-09-19 20:49:33 +02:00
else clear ( ) ;
}
} )
2020-04-19 20:39:58 +02:00
} )
2020-09-19 20:49:33 +02:00
} ) ) ;
2020-03-19 14:14:56 +01:00
}
2020-06-09 10:14:35 +02:00
2020-09-19 20:49:33 +02:00
batchSetGuilds ( settingsPanel , collapseStates , value ) {
if ( ! value ) {
for ( let id of BDFDB . LibraryModules . FolderStore . getFlattenedGuildIds ( ) ) blacklist . push ( id ) ;
this . saveBlacklist ( BDFDB . ArrayUtils . removeCopies ( blacklist ) ) ;
}
else this . saveBlacklist ( [ ] ) ;
BDFDB . PluginUtils . refreshSettingsPanel ( this , settingsPanel , collapseStates ) ;
}
saveBlacklist ( savedBlacklist ) {
blacklist = savedBlacklist ;
BDFDB . DataUtils . save ( savedBlacklist , this , "blacklist" ) ;
2020-02-04 08:20:40 +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 _dms : "Директно съобщение" ,
context _guilds : "Всички сървъри" ,
context _mutedguilds : "Приглушени сървъри" ,
context _pingedguilds : "Pinged сървъри" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Непрочетени сървъри" ,
modal _confirmmentions : "Наистина ли искате да изтриете всички непрочетени споменавания?" ,
modal _confirmnotifications : "Наистина ли искате да изтриете всички непрочетени известия?" ,
toast _alreadyclearing : "Изтрива някои споменавания вече" ,
toast _cleared : "Всички последни споменавания бяха изтрити" ,
toast _clearing : "Изчиства всички скорошни споменавания"
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 _dms : "Direkte beskeder" ,
context _guilds : "Alle servere" ,
context _mutedguilds : "Dæmpede servere" ,
context _pingedguilds : "Pingede servere" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Ulæste servere" ,
modal _confirmmentions : "Er du sikker på, at du vil slette alle ulæste omtaler?" ,
modal _confirmnotifications : "Er du sikker på, at du vil slette alle ulæste meddelelser?" ,
toast _alreadyclearing : "Sletter allerede nogle omtaler" ,
toast _cleared : "Alle nylige omtaler er blevet slettet" ,
toast _clearing : "Rydder alle nylige omtaler"
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 _dms : "Direktnachrichten" ,
context _guilds : "Alle Server" ,
context _mutedguilds : "Stummgeschaltete Server" ,
context _pingedguilds : "Gepingte Server" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Ungelesene Server" ,
modal _confirmmentions : "Möchten Sie wirklich alle ungelesenen Erwähnungen löschen?" ,
modal _confirmnotifications : "Möchten Sie wirklich alle ungelesenen Benachrichtigungen löschen?" ,
toast _alreadyclearing : "Löscht bereits einige Erwähnungen" ,
toast _cleared : "Alle kürzlich Erwähnungen wurden gelöscht" ,
toast _clearing : "Löscht alle letzten Erwähnungen"
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 _dms : "Αμεσα μηνύματα" ,
context _guilds : "Όλοι ο ι διακομιστές" ,
context _mutedguilds : "Σίγαση διακομιστών" ,
context _pingedguilds : "Διακομιστές Ping" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Μη αναγνωσμένοι διακομιστές" ,
modal _confirmmentions : "Είστε βέβαιοι ότι θέλετε ν α διαγράψετε όλες τις μη αναγνωσμένες αναφορές;" ,
modal _confirmnotifications : "Είστε βέβαιοι ότι θέλετε ν α διαγράψετε όλες τις μη αναγνωσμένες ειδοποιήσεις;" ,
toast _alreadyclearing : "Διαγράφει ήδη κάποιες αναφορές" ,
toast _cleared : "Όλες ο ι πρόσφατες αναφορές έχουν διαγραφεί" ,
toast _clearing : "Διαγράφει όλες τις πρόσφατες αναφορές"
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 _dms : "Mensajes directos" ,
context _guilds : "Todos los servidores" ,
context _mutedguilds : "Servidores silenciados" ,
context _pingedguilds : "Servidores con ping" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Servidores no leídos" ,
modal _confirmmentions : "¿Estás seguro de que deseas eliminar todas las menciones no leídas?" ,
modal _confirmnotifications : "¿Está seguro de que desea eliminar todas las notificaciones no leídas?" ,
toast _alreadyclearing : "Elimina algunas menciones ya" ,
toast _cleared : "Se han eliminado todas las menciones recientes" ,
toast _clearing : "Borra todas las menciones recientes"
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 _dms : "Suorat viestit" ,
context _guilds : "Kaikki palvelimet" ,
context _mutedguilds : "Mykistetyt palvelimet" ,
context _pingedguilds : "Pinged-palvelimet" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Lukemattomat palvelimet" ,
modal _confirmmentions : "Haluatko varmasti poistaa kaikki lukemattomat maininnat?" ,
modal _confirmnotifications : "Haluatko varmasti poistaa kaikki lukemattomat ilmoitukset?" ,
toast _alreadyclearing : "Poistaa jo joitain mainintoja" ,
toast _cleared : "Kaikki viimeisimmät maininnat on poistettu" ,
toast _clearing : "Tyhjentää kaikki viimeisimmät maininnat"
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 _dms : "Messages directs" ,
context _guilds : "Tous les serveurs" ,
context _mutedguilds : "Serveurs muets" ,
context _pingedguilds : "Serveurs ping" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Serveurs non lus" ,
modal _confirmmentions : "Voulez-vous vraiment supprimer toutes les mentions non lues?" ,
modal _confirmnotifications : "Voulez-vous vraiment supprimer toutes les notifications non lues?" ,
toast _alreadyclearing : "Supprime déjà certaines mentions" ,
toast _cleared : "Toutes les mentions récentes ont été supprimées" ,
toast _clearing : "Efface toutes les mentions récentes"
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 _dms : "Direktna poruka" ,
context _guilds : "Svi poslužitelji" ,
context _mutedguilds : "Prigušeni poslužitelji" ,
context _pingedguilds : "Pingirani poslužitelji" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Nepročitani poslužitelji" ,
modal _confirmmentions : "Jeste li sigurni da želite izbrisati sva nepročitana spominjanja?" ,
modal _confirmnotifications : "Jeste li sigurni da želite izbrisati sve nepročitane obavijesti?" ,
toast _alreadyclearing : "Briše već spomenute" ,
toast _cleared : "Sva nedavna spominjanja su izbrisana" ,
toast _clearing : "Briše sva nedavna spominjanja"
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 _dms : "Közvetlen üzenet" ,
context _guilds : "Minden szerver" ,
context _mutedguilds : "Némított szerverek" ,
context _pingedguilds : "Pingelt szerverek" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Olvasatlan szerverek" ,
modal _confirmmentions : "Biztosan törli az összes olvasatlan említést?" ,
modal _confirmnotifications : "Biztosan törli az összes olvasatlan értesítést?" ,
toast _alreadyclearing : "Néhány említést már töröl" ,
toast _cleared : "Az összes közelmúltbeli említést törölték" ,
toast _clearing : "Törli az összes közelmúltbeli említést"
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 _dms : "Messaggi diretti" ,
context _guilds : "Tutti i server" ,
context _mutedguilds : "Server disattivati" ,
context _pingedguilds : "Server sottoposti a ping" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Server non letti" ,
modal _confirmmentions : "Sei sicuro di voler eliminare tutte le menzioni non lette?" ,
modal _confirmnotifications : "Sei sicuro di voler eliminare tutte le notifiche non lette?" ,
toast _alreadyclearing : "Elimina già alcune menzioni" ,
toast _cleared : "Tutte le menzioni recenti sono state eliminate" ,
toast _clearing : "Cancella tutte le menzioni recenti"
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 _dms : "ダイレクトメッセージ" ,
context _guilds : "すべてのサーバー" ,
context _mutedguilds : "ミュートされたサーバー" ,
context _pingedguilds : "pingされたサーバー" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "未読サーバー" ,
modal _confirmmentions : "未読のメンションをすべて削除してもよろしいですか?" ,
modal _confirmnotifications : "未読の通知をすべて削除してもよろしいですか?" ,
toast _alreadyclearing : "すでにいくつかの言及を削除します" ,
toast _cleared : "最近の言及はすべて削除されました" ,
toast _clearing : "最近の言及をすべてクリアします"
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 _dms : "쪽지" ,
context _guilds : "모든 서버" ,
context _mutedguilds : "음소거 된 서버" ,
context _pingedguilds : "핑된 서버" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "읽지 않은 서버" ,
modal _confirmmentions : "읽지 않은 모든 멘션을 삭제 하시겠습니까?" ,
modal _confirmnotifications : "읽지 않은 모든 알림을 삭제 하시겠습니까?" ,
toast _alreadyclearing : "이미 일부 멘션을 삭제합니다." ,
toast _cleared : "모든 최근 멘션이 삭제되었습니다." ,
toast _clearing : "최근 멘션을 모두 지 웁니다."
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 _dms : "Tiesioginiai pranešimai" ,
context _guilds : "Visi serveriai" ,
context _mutedguilds : "Nutildyti serveriai" ,
context _pingedguilds : "„Pinged“ serveriai" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Neskaityti serveriai" ,
modal _confirmmentions : "Ar tikrai norite ištrinti visus neperskaitytus paminėjimus?" ,
modal _confirmnotifications : "Ar tikrai norite ištrinti visus neperskaitytus pranešimus?" ,
toast _alreadyclearing : "Kai kurie paminėjimai jau ištrinami" ,
toast _cleared : "Visi naujausi paminėjimai buvo ištrinti" ,
toast _clearing : "Išvalo visus naujausius paminėjimus"
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 _dms : "Directe berichten" ,
context _guilds : "Alle servers" ,
context _mutedguilds : "Gedempte servers" ,
context _pingedguilds : "Gepingde servers" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Ongelezen servers" ,
modal _confirmmentions : "Weet u zeker dat u alle ongelezen vermeldingen wilt verwijderen?" ,
modal _confirmnotifications : "Weet u zeker dat u alle ongelezen meldingen wilt verwijderen?" ,
toast _alreadyclearing : "Verwijdert al enkele vermeldingen" ,
toast _cleared : "Alle recente vermeldingen zijn verwijderd" ,
toast _clearing : "Wist alle recente vermeldingen"
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 _dms : "Direktemeldinger" ,
context _guilds : "Alle servere" ,
context _mutedguilds : "Dempede servere" ,
context _pingedguilds : "Pingede servere" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Uleste servere" ,
modal _confirmmentions : "Er du sikker på at du vil slette alle uleste omtaler?" ,
modal _confirmnotifications : "Er du sikker på at du vil slette alle uleste varsler?" ,
toast _alreadyclearing : "Sletter allerede noen omtaler" ,
toast _cleared : "Alle nylige omtaler er slettet" ,
toast _clearing : "Fjerner alle nylige omtaler"
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 _dms : "Bezpośrednie wiadomości" ,
context _guilds : "Wszystkie serwery" ,
context _mutedguilds : "Wyciszone serwery" ,
context _pingedguilds : "Serwery pingowane" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Nieprzeczytane serwery" ,
modal _confirmmentions : "Czy na pewno chcesz usunąć wszystkie nieprzeczytane wzmianki?" ,
modal _confirmnotifications : "Czy na pewno chcesz usunąć wszystkie nieprzeczytane powiadomienia?" ,
toast _alreadyclearing : "Usuwa już niektóre wzmianki" ,
toast _cleared : "Wszystkie ostatnie wzmianki zostały usunięte" ,
toast _clearing : "Usuwa wszystkie ostatnie wzmianki"
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 _dms : "Mensagens diretas" ,
context _guilds : "Todos os servidores" ,
context _mutedguilds : "Servidores Silenciados" ,
context _pingedguilds : "Servidores com ping" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Servidores não lidos" ,
modal _confirmmentions : "Tem certeza de que deseja excluir todas as menções não lidas?" ,
modal _confirmnotifications : "Tem certeza de que deseja excluir todas as notificações não lidas?" ,
toast _alreadyclearing : "Exclui algumas menções já" ,
toast _cleared : "Todas as menções recentes foram excluídas" ,
toast _clearing : "Limpa todas as menções recentes"
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 _dms : "Mesaje directe" ,
context _guilds : "Toate serverele" ,
context _mutedguilds : "Servere mutate" ,
context _pingedguilds : "Servere pinged" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Servere necitite" ,
modal _confirmmentions : "Sigur doriți să ștergeți toate mențiunile necitite?" ,
modal _confirmnotifications : "Sigur doriți să ștergeți toate notificările necitite?" ,
toast _alreadyclearing : "Șterge deja câteva mențiuni" ,
toast _cleared : "Toate mențiunile recente au fost șterse" ,
toast _clearing : "Șterge toate mențiunile recente"
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 _dms : "Прямые сообщения" ,
context _guilds : "В с е серверы" ,
context _mutedguilds : "Отключенные серверы" ,
context _pingedguilds : "Проверенные серверы" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Непрочитанные серверы" ,
modal _confirmmentions : "Вы уверены, что хотите удалить все непрочитанные упоминания?" ,
modal _confirmnotifications : "Вы действительно хотите удалить все непрочитанные уведомления?" ,
toast _alreadyclearing : "Удаляет уже некоторые упоминания" ,
toast _cleared : "В с е недавние упоминания были удалены" ,
toast _clearing : "Удаляет все недавние упоминания"
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 _dms : "Direktmeddelanden" ,
context _guilds : "Alla servrar" ,
context _mutedguilds : "Dämpade servrar" ,
context _pingedguilds : "Pingade servrar" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Olästa servrar" ,
modal _confirmmentions : "Är du säker på att du vill ta bort alla olästa omnämnanden?" ,
modal _confirmnotifications : "Är du säker på att du vill ta bort alla olästa aviseringar?" ,
toast _alreadyclearing : "Raderar några omnämnanden redan" ,
toast _cleared : "Alla nya omnämnanden har tagits bort" ,
toast _clearing : "Rensar alla senaste omnämnanden"
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 _dms : "ข้อความโดยตรง" ,
context _guilds : "เซิร์ฟเวอร์ทั้งหมด" ,
context _mutedguilds : "เซิร์ฟเวอร์ที่ปิดเสียง" ,
context _pingedguilds : "เซิร์ฟเวอร์ Pinged" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "เซิร์ฟเวอร์ที่ยังไม่ได้อ่าน" ,
modal _confirmmentions : "แน่ใจไหมว่าต้องการลบข้อความที่ยังไม่ได้อ่านทั้งหมด" ,
modal _confirmnotifications : "แน่ใจไหมว่าต้องการลบการแจ้งเตือนที่ยังไม่ได้อ่านทั้งหมด" ,
toast _alreadyclearing : "ลบการกล่าวถึงบางส่วนแล้ว" ,
toast _cleared : "ลบการกล่าวถึงล่าสุดทั้งหมดแล้ว" ,
toast _clearing : "ล้างการพูดถึงล่าสุดทั้งหมด"
2020-12-21 19:56:36 +01:00
} ;
case "tr" : // Turkish
return {
context _dms : "Direkt Mesajlar" ,
context _guilds : "Tüm Sunucular" ,
context _mutedguilds : "Sessiz Sunucular" ,
context _pingedguilds : "Ping Gönderilen Sunucular" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Okunmamı ş Sunucular" ,
modal _confirmmentions : "Okunmamı ş tüm bahisleri silmek istediğinizden emin misiniz?" ,
modal _confirmnotifications : "Okunmamı ş tüm bildirimleri silmek istediğinizden emin misiniz?" ,
toast _alreadyclearing : "Zaten bazı bahsetmeleri siler" ,
toast _cleared : "Son bahsedenlerin tümü silindi" ,
toast _clearing : "Tüm son bahsedilenleri temizler"
2020-12-21 19:56:36 +01:00
} ;
case "uk" : // Ukrainian
return {
context _dms : "Прямі повідомлення" ,
context _guilds : "У с і сервери" ,
context _mutedguilds : "Приглушені сервери" ,
context _pingedguilds : "Pinged сервери" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Непрочитані сервери" ,
modal _confirmmentions : "Ви впевнені, що хочете видалити всі непрочитані згадки?" ,
modal _confirmnotifications : "Ви впевнені, що хочете видалити всі непрочитані сповіщення?" ,
toast _alreadyclearing : "Видаляє деякі згадки вже" ,
toast _cleared : "У с і останні згадування були видалені" ,
toast _clearing : "Очищає всі останні згадування"
2020-12-21 19:56:36 +01:00
} ;
case "vi" : // Vietnamese
return {
context _dms : "Tin nhắn trực tiếp" ,
context _guilds : "Tất cả máy chủ" ,
context _mutedguilds : "Máy chủ bị tắt tiếng" ,
context _pingedguilds : "Máy chủ Pinged" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Máy chủ chưa đọc" ,
modal _confirmmentions : "Bạn có chắc chắn muốn xóa tất cả các đề cập chưa đọc không?" ,
modal _confirmnotifications : "Bạn có chắc chắn muốn xóa tất cả các thông báo chưa đọc không?" ,
toast _alreadyclearing : "Đã xóa một số đề cập" ,
toast _cleared : "Tất cả các đề cập gần đây đã bị xóa" ,
toast _clearing : "Xóa tất cả các đề cập gần đây"
2020-12-21 19:56:36 +01:00
} ;
2021-01-15 17:54:22 +01:00
case "zh-CN" : // Chinese (China)
2020-12-21 19:56:36 +01:00
return {
context _dms : "直接讯息" ,
context _guilds : "所有服务器" ,
context _mutedguilds : "静音服务器" ,
context _pingedguilds : "绑定服务器" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "未读服务器" ,
modal _confirmmentions : "您确定要删除所有未读的提及吗?" ,
modal _confirmnotifications : "您确定要删除所有未读的通知吗?" ,
toast _alreadyclearing : "已删除一些提及" ,
toast _cleared : "最近所有提及的内容均已删除" ,
toast _clearing : "清除所有最近提及的内容"
2020-12-21 19:56:36 +01:00
} ;
2021-01-15 17:54:22 +01:00
case "zh-TW" : // Chinese (Taiwan)
2020-12-21 19:56:36 +01:00
return {
context _dms : "直接訊息" ,
context _guilds : "所有服務器" ,
context _mutedguilds : "靜音服務器" ,
context _pingedguilds : "綁定服務器" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "未讀服務器" ,
modal _confirmmentions : "您確定要刪除所有未讀的提及嗎?" ,
modal _confirmnotifications : "您確定要刪除所有未讀的通知嗎?" ,
toast _alreadyclearing : "已刪除一些提及" ,
toast _cleared : "最近所有提及的內容均已刪除" ,
toast _clearing : "清除所有最近提及的內容"
2020-12-21 19:56:36 +01:00
} ;
default : // English
return {
context _dms : "Direct Messages" ,
context _guilds : "All Servers" ,
context _mutedguilds : "Muted Servers" ,
context _pingedguilds : "Pinged Servers" ,
2021-01-26 21:14:48 +01:00
context _unreadguilds : "Unread Servers" ,
modal _confirmmentions : "Are you sure you want to delete all unread Mentions?" ,
modal _confirmnotifications : "Are you sure you want to delete all unread Notifications?" ,
toast _alreadyclearing : "Already clearing some Mentions" ,
toast _cleared : "All recent Mentions have been cleared" ,
toast _clearing : "Clearing all recent Mentions"
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
} ) ( ) ;