From 6254555cfadd4f4dbf867f08b6caf48b8b6e245c Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Thu, 21 Nov 2019 11:38:04 +0100 Subject: [PATCH] stuff --- Plugins/ChatAliases/ChatAliases.plugin.js | 2 +- Plugins/ChatFilter/ChatFilter.plugin.js | 2 +- Plugins/EditChannels/EditChannels.plugin.js | 4 ++-- Plugins/EditServers/EditServers.plugin.js | 4 ++-- Plugins/EditUsers/EditUsers.plugin.js | 4 ++-- .../GoogleTranslateOption.plugin.js | 8 ++++---- Plugins/PluginRepo/PluginRepo.plugin.js | 2 +- .../RevealAllSpoilersOption.plugin.js | 4 ++-- Plugins/ServerFolders/ServerFolders.plugin.js | 10 +++++----- Plugins/ServerHider/ServerHider.plugin.js | 4 ++-- Plugins/SpellCheck/SpellCheck.plugin.js | 4 ++-- Plugins/ThemeRepo/ThemeRepo.plugin.js | 2 +- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Plugins/ChatAliases/ChatAliases.plugin.js b/Plugins/ChatAliases/ChatAliases.plugin.js index 22e73f91c4..75db497ef4 100644 --- a/Plugins/ChatAliases/ChatAliases.plugin.js +++ b/Plugins/ChatAliases/ChatAliases.plugin.js @@ -312,7 +312,7 @@ class ChatAliases { children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: "Add to ChatAliases", - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.openAddModal(text); } diff --git a/Plugins/ChatFilter/ChatFilter.plugin.js b/Plugins/ChatFilter/ChatFilter.plugin.js index 50882d1b71..5191a0165a 100644 --- a/Plugins/ChatFilter/ChatFilter.plugin.js +++ b/Plugins/ChatFilter/ChatFilter.plugin.js @@ -304,7 +304,7 @@ class ChatFilter { children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: "Add to ChatFilter", - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.openAddModal(text); } diff --git a/Plugins/EditChannels/EditChannels.plugin.js b/Plugins/EditChannels/EditChannels.plugin.js index ebfd81e756..6cd5141446 100644 --- a/Plugins/EditChannels/EditChannels.plugin.js +++ b/Plugins/EditChannels/EditChannels.plugin.js @@ -154,7 +154,7 @@ class EditChannels { children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.submenu_channelsettings_text, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.showChannelSettings(instance.props.channel); } @@ -162,7 +162,7 @@ class EditChannels { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.submenu_resetsettings_text, disabled: !BDFDB.DataUtils.load(this, "channels", instance.props.channel.id), - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); BDFDB.DataUtils.remove(this, "channels", instance.props.channel.id); this.forceUpdateAll(); diff --git a/Plugins/EditServers/EditServers.plugin.js b/Plugins/EditServers/EditServers.plugin.js index 4b735243a5..d6ebac1c7a 100644 --- a/Plugins/EditServers/EditServers.plugin.js +++ b/Plugins/EditServers/EditServers.plugin.js @@ -145,7 +145,7 @@ class EditServers { children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.submenu_serversettings_text, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.showServerSettings(instance.props.guild); } @@ -153,7 +153,7 @@ class EditServers { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.submenu_resetsettings_text, disabled: !BDFDB.DataUtils.load(this, "servers", instance.props.guild.id), - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); BDFDB.DataUtils.remove(this, "servers", instance.props.guild.id); this.forceUpdateAll(instance.props.guild.id); diff --git a/Plugins/EditUsers/EditUsers.plugin.js b/Plugins/EditUsers/EditUsers.plugin.js index f165fe8507..b1d20f38aa 100644 --- a/Plugins/EditUsers/EditUsers.plugin.js +++ b/Plugins/EditUsers/EditUsers.plugin.js @@ -201,7 +201,7 @@ class EditUsers { children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.submenu_usersettings_text, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.showUserSettings(instance.props.user); } @@ -209,7 +209,7 @@ class EditUsers { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.submenu_resetsettings_text, disabled: !BDFDB.DataUtils.load(this, "users", instance.props.user.id), - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); BDFDB.DataUtils.remove(this, "users", instance.props.user.id); this.forceUpdateAll(); diff --git a/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js b/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js index 55d50cfdc8..787e68b344 100644 --- a/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js +++ b/Plugins/GoogleTranslateOption/GoogleTranslateOption.plugin.js @@ -163,7 +163,7 @@ class GoogleTranslateOption { const translateUntranslateItem = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: translated ? this.labels.context_messageuntranslateoption_text : this.labels.context_messagetranslateoption_text, hint: BDFDB.BDUtils.isPluginEnabled("MessageUtilities") ? BDFDB.BDUtils.getPlugin("MessageUtilities").getActiveShortcutString("__Translate_Message") : null, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.translateMessage(instance.props.message, instance.props.target, instance.props.channel); } @@ -177,8 +177,8 @@ class GoogleTranslateOption { var foundtranslation, foundinput, foundoutput; const searchTranslationItem = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.context_googletranslateoption_text, - action: e => { - var item = BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenuitem, e.target); + action: event => { + var item = BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenuitem, event.target); if (item) { var createTooltip = () => { BDFDB.TooltipUtils.create(item, `From ${foundinput.name}:\n${text}\n\nTo ${foundoutput.name}:\n${foundtranslation}`, {type:"right", selector:"googletranslate-tooltip"}); @@ -214,7 +214,7 @@ class GoogleTranslateOption { children.splice(index + 1, 0, BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels[translated ? "popout_untranslateoption_text" : "popout_translateoption_text"], className: BDFDB.disCN.optionpopoutitem, - action: e => { + action: _ => { this.translateMessage(instance.props.message, instance.props.target, instance.props.channel); instance.props.onClose(); } diff --git a/Plugins/PluginRepo/PluginRepo.plugin.js b/Plugins/PluginRepo/PluginRepo.plugin.js index d72e1b1628..1a8cc2067f 100644 --- a/Plugins/PluginRepo/PluginRepo.plugin.js +++ b/Plugins/PluginRepo/PluginRepo.plugin.js @@ -342,7 +342,7 @@ class PluginRepo { BDFDB.TimeUtils.timeout(() => {for (let child of returnvalue.props.children) if (child && child.props && child.props.label == "BandagedBD" && Array.isArray(child.props.render)) { const repoItem = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: "Plugin Repo", - action: e => { + action: _ => { if (!this.loading.is) BDFDB.ContextMenuUtils.close(menu); this.openPluginRepoModal(); } diff --git a/Plugins/RevealAllSpoilersOption/RevealAllSpoilersOption.plugin.js b/Plugins/RevealAllSpoilersOption/RevealAllSpoilersOption.plugin.js index 232ac7d841..b28c9cf9c4 100644 --- a/Plugins/RevealAllSpoilersOption/RevealAllSpoilersOption.plugin.js +++ b/Plugins/RevealAllSpoilersOption/RevealAllSpoilersOption.plugin.js @@ -3,7 +3,7 @@ class RevealAllSpoilersOption { getName () {return "RevealAllSpoilersOption";} - getVersion () {return "1.0.2";} + getVersion () {return "1.0.3";} getAuthor () {return "DevilBro";} @@ -69,7 +69,7 @@ class RevealAllSpoilersOption { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: "Reveal all Spoilers", hint: BDFDB.BDUtils.isPluginEnabled("MessageUtilities") ? BDFDB.BDUtils.getPlugin("MessageUtilities").getActiveShortcutString("__Reveal_Spoilers") : null, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(e.instance); this.revealAllSpoilers(messagediv); } diff --git a/Plugins/ServerFolders/ServerFolders.plugin.js b/Plugins/ServerFolders/ServerFolders.plugin.js index fa1f2582ef..c3b8e6ce80 100644 --- a/Plugins/ServerFolders/ServerFolders.plugin.js +++ b/Plugins/ServerFolders/ServerFolders.plugin.js @@ -349,8 +349,8 @@ class ServerFolders { children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.foldercontext_removefolder_text, danger: true, - action: e => { - BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target)); + action: _ => { + BDFDB.ContextMenuUtils.close(instance); BDFDB.ModalUtils.confirm(this, `Are you sure you want to remove the folder${folder.folderName ? (" '" + folder.folderName + '"') : ""}?`, () => {this.removeFolder(folderid);}); } }) @@ -364,7 +364,7 @@ class ServerFolders { let addtofolderitems = [], openguilds = BDFDB.LibraryModules.FolderStore.getSortedGuilds().filter(n => !n.folderId).map(n => n.guilds[0]); for (let i = 0; i < folders.length; i++) addtofolderitems.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: folders[i].folderName || (this.labels.modal_tabheader1_text + " #" + parseInt(i+1)), - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.addGuildToFolder(folders[i].folderId, guildid); } @@ -379,7 +379,7 @@ class ServerFolders { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.serversubmenu_removefromfolder_text, danger: true, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.removeGuildFromFolder(folder.folderId, guildid); } @@ -388,7 +388,7 @@ class ServerFolders { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.serversubmenu_createfolder_text, disabled: !openguilds.length, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.openFolderCreationMenu(openguilds, guildid); } diff --git a/Plugins/ServerHider/ServerHider.plugin.js b/Plugins/ServerHider/ServerHider.plugin.js index dbd00e5f85..ccab410377 100644 --- a/Plugins/ServerHider/ServerHider.plugin.js +++ b/Plugins/ServerHider/ServerHider.plugin.js @@ -167,7 +167,7 @@ class ServerHider { children: [ BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.submenu_openhidemenu_text, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.showServerModal(); } @@ -175,7 +175,7 @@ class ServerHider { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.submenu_hideserver_text, disabled: !(instance.props.guild && !instance.props.target.getAttribute("folder")), - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.toggleServer(instance.props.guild, instance.props.target, false); } diff --git a/Plugins/SpellCheck/SpellCheck.plugin.js b/Plugins/SpellCheck/SpellCheck.plugin.js index 236d690591..94058c382b 100644 --- a/Plugins/SpellCheck/SpellCheck.plugin.js +++ b/Plugins/SpellCheck/SpellCheck.plugin.js @@ -178,7 +178,7 @@ class SpellCheck { let similarWords = this.getSimilarWords(word.toLowerCase().trim()); for (let suggestion of similarWords.sort()) items.push(BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: suggestion, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.replaceWord(textarea, word, suggestion); } @@ -194,7 +194,7 @@ class SpellCheck { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: this.labels.context_spellcheck_text, hint: word, - action: e => { + action: _ => { BDFDB.ContextMenuUtils.close(menu); this.addToOwnDictionary(word); } diff --git a/Plugins/ThemeRepo/ThemeRepo.plugin.js b/Plugins/ThemeRepo/ThemeRepo.plugin.js index 5088d3f4a1..a784a35dce 100644 --- a/Plugins/ThemeRepo/ThemeRepo.plugin.js +++ b/Plugins/ThemeRepo/ThemeRepo.plugin.js @@ -402,7 +402,7 @@ class ThemeRepo { BDFDB.TimeUtils.timeout(() => {for (let child of returnvalue.props.children) if (child && child.props && child.props.label == "BandagedBD" && Array.isArray(child.props.render)) { const repoItem = BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.ContextMenuItem, { label: "Theme Repo", - action: e => { + action: _ => { if (!this.loading.is) BDFDB.ContextMenuUtils.close(menu); this.openThemeRepoModal(); }