This commit is contained in:
Mirco Wittrien 2019-11-01 10:14:50 +01:00
parent 83bda59ecc
commit 2d2b40d2c6
52 changed files with 582 additions and 539 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -190,7 +190,7 @@ class BadgesEverywhere {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -53,7 +53,7 @@ class BetterFriendCount {
BDFDB.ModuleUtils.forceAllUpdates(this, "TabBar");
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -48,7 +48,7 @@ class BetterNsfwTag {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -109,7 +109,7 @@ class BetterSearchPage {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -104,7 +104,7 @@ class CharCounter {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -170,7 +170,7 @@ class ChatAliases {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -310,7 +310,7 @@ class ChatAliases {
label: "Add to ChatAliases",
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-addalias-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.openAddModal(text);
}
})

View File

@ -183,7 +183,7 @@ class ChatFilter {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -302,7 +302,7 @@ class ChatFilter {
label: "Add to ChatFilter",
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-addalias-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.openAddModal(text);
}
})

View File

@ -131,7 +131,7 @@ class CompleteTimestamps {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -45,7 +45,7 @@ class CopyRawMessage {
if (this.started) return;
BDFDB.PluginUtils.init(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -70,7 +70,7 @@ class CopyRawMessage {
hint: BDFDB.BDUtils.isPluginEnabled("MessageUtilities") ? BDFDB.BDUtils.getPlugin("MessageUtilities").getActiveShortcutString("Copy_Raw") : null,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-copyraw-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
BDFDB.LibraryRequires.electron.clipboard.write({text:instance.props.message.content});
}
})

View File

@ -127,7 +127,7 @@ class CreationDate {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -95,7 +95,7 @@ class DisplayServersAsChannels {
if (e.currentTarget.querySelector(BDFDB.dotCN.guildpillwrapper + BDFDB.notCN.dmpill + "+ *") && !document.querySelector(BDFDB.dotCN.guildpillwrapper + BDFDB.notCN.dmpill + "+ *:hover")) BDFDB.DOMUtils.removeLocalStyle("HideAllToolTips" + this.name);
});
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -115,7 +115,7 @@ class EditChannels {
this.forceUpdateAll();
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -152,7 +152,7 @@ class EditChannels {
label: this.labels.submenu_channelsettings_text,
className: `BDFDB-ContextMenuItem ${this.name}-ContextMenuItem ${this.name}-channelsettings-ContextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.showChannelSettings(instance.props.channel);
}
}),
@ -161,7 +161,7 @@ class EditChannels {
className: `BDFDB-ContextMenuItem ${this.name}-ContextMenuItem ${this.name}-resetsettings-ContextMenuItem`,
disabled: !BDFDB.DataUtils.load(this, "channels", instance.props.channel.id),
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
BDFDB.DataUtils.remove(this, "channels", instance.props.channel.id);
this.forceUpdateAll();
}

View File

@ -105,7 +105,7 @@ class EditServers {
this.forceUpdateAll();
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -143,7 +143,7 @@ class EditServers {
label: this.labels.submenu_serversettings_text,
className: `BDFDB-ContextMenuItem ${this.name}-ContextMenuItem ${this.name}-serversettings-ContextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.showServerSettings(instance.props.guild);
}
}),
@ -152,7 +152,7 @@ class EditServers {
className: `BDFDB-ContextMenuItem ${this.name}-ContextMenuItem ${this.name}-resetsettings-ContextMenuItem`,
disabled: !BDFDB.DataUtils.load(this, "servers", instance.props.guild.id),
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
BDFDB.DataUtils.remove(this, "servers", instance.props.guild.id);
this.forceUpdateAll(instance.props.guild.id);
}

View File

@ -161,7 +161,7 @@ class EditUsers {
this.forceUpdateAll();
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
@ -199,7 +199,7 @@ class EditUsers {
label: this.labels.submenu_usersettings_text,
className: `BDFDB-ContextMenuItem ${this.name}-ContextMenuItem ${this.name}-usersettings-ContextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.showUserSettings(instance.props.user);
}
}),
@ -208,7 +208,7 @@ class EditUsers {
className: `BDFDB-ContextMenuItem ${this.name}-ContextMenuItem ${this.name}-resetsettings-ContextMenuItem`,
disabled: !BDFDB.DataUtils.load(this, "users", instance.props.user.id),
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
BDFDB.DataUtils.remove(this, "users", instance.props.user.id);
this.forceUpdateAll();
}

View File

@ -182,7 +182,7 @@ class EmojiStatistics {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -47,7 +47,7 @@ class ForceImagePreviews {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -322,7 +322,7 @@ class FriendNotifications {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -83,7 +83,7 @@ class GoogleSearchReplace {
if (this.started) return;
BDFDB.PluginUtils.init(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -117,7 +117,7 @@ class GoogleSearchReplace {
label: this.defaults.engines[key].name,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-engine-contextMenuItem`,
action: e => {
if (!e.shiftKey) BDFDB.closeContextMenu(menu);
if (!e.shiftKey) BDFDB.ContextMenuUtils.close(menu);
if (key == "_all") {
for (let key2 in engines) if (key2 != "_all" && engines[key2]) window.open(this.defaults.engines[key2].url.replace(this.textUrlReplaceString, encodeURIComponent(text)), "_blank");
}

View File

@ -135,7 +135,7 @@ class GoogleTranslateOption {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -166,7 +166,7 @@ class GoogleTranslateOption {
hint: BDFDB.BDUtils.isPluginEnabled("MessageUtilities") ? BDFDB.BDUtils.getPlugin("MessageUtilities").getActiveShortcutString("__Translate_Message") : null,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-${translated ? "untranslate" : "translate"}-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.translateMessage(instance.props.message, instance.props.target, instance.props.channel);
}
});
@ -188,7 +188,7 @@ class GoogleTranslateOption {
};
if (foundtranslation && foundinput && foundoutput) {
if (document.querySelector(".googletranslate-tooltip")) {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
window.open(this.getGoogleTranslatePageURL(foundinput.id, foundoutput.id, text), "_blank");
}
else createTooltip();

View File

@ -67,7 +67,7 @@ class ImageGallery {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -70,7 +70,7 @@ class ImageZoom {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -133,7 +133,7 @@ class ImageZoom {
className: `BDFDB-contextMenuItemGroup ${this.name}-contextMenuItemGroup`,
children: items
});
BDFDB.openContextMenu(this, e, itemGroup);
BDFDB.ContextMenuUtils.open(this, e, itemGroup);
};
settingslink.addEventListener("click", openContext);
settingslink.addEventListener("contextmenu", openContext);

View File

@ -128,7 +128,7 @@ class JoinedAtDate {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -135,7 +135,7 @@ class LastMessageDate {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -127,7 +127,7 @@ class MessageUtilities {
this.onKeyDown(e, e.which, "onKeyDown");
});
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -84,7 +84,7 @@ class MoveablePopups {
});
BDFDB.ObserverUtils.connect(this, BDFDB.ReactUtils.findDOMNode(BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.app), {name:"Modals"})), {name:"modalObserver", instance:observer}, {childList: true});
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -271,7 +271,7 @@ class NotificationSounds {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -164,7 +164,7 @@ class OldTitleBar {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -100,7 +100,7 @@ class OwnerTag {
this.addHideCSS();
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -176,7 +176,7 @@ class PersonalPins {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
@ -218,7 +218,7 @@ class PersonalPins {
hint: BDFDB.BDUtils.isPluginEnabled("MessageUtilities") ? BDFDB.BDUtils.getPlugin("MessageUtilities").getActiveShortcutString("__Note_Message") : null,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-${note ? "unpin" : "pin"}-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.addMessageToNotes(instance.props.message, instance.props.target, instance.props.channel);
}
});
@ -232,7 +232,7 @@ class PersonalPins {
label: this.labels.context_updateoption_text,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-update-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.updateNoteData(note, newmarkup, newaccessory);
}
});

View File

@ -161,7 +161,7 @@ class PinDMs {
BDFDB.ModuleUtils.forceAllUpdates(this);
delete this.forceAdding;
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -231,7 +231,7 @@ class PinDMs {
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-${pinnedInChannel ? "unpin" : "pin"}channel-contextMenuItem`,
danger: pinnedInChannel,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
if (!pinnedInChannel) {
let dmsscrollerinstance = BDFDB.ReactUtils.getInstance(document.querySelector(BDFDB.dotCNS.dmchannels + BDFDB.dotCN.scroller));
if (dmsscrollerinstance) {
@ -252,7 +252,7 @@ class PinDMs {
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-${pinnedInGuild ? "unpin" : "pin"}guild-contextMenuItem`,
danger: pinnedInGuild,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
if (!pinnedInGuild) {
this.addPinnedRecent(id);
this.updatePinnedPositions("pinnedRecents");
@ -350,14 +350,14 @@ class PinDMs {
label: this.labels.context_pinguild_text,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-pinguild-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
this.addPinnedRecent(instance.props.channel.id);
this.updatePinnedPositions("pinnedRecents");
}
})
]
});
BDFDB.openContextMenu(this, e, itemGroup);
BDFDB.ContextMenuUtils.open(this, e, itemGroup);
}
};
wrapper.addEventListener("contextmenu", wrapper.PinDMsContextMenuListener);
@ -532,7 +532,7 @@ class PinDMs {
danger: true,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-unpinguild-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.DOMUtils.remove(dmdiv);
this.unhideNativeDM(id);
BDFDB.DataUtils.remove(this, "pinnedRecents", id);
@ -541,7 +541,7 @@ class PinDMs {
})
]
});
BDFDB.openContextMenu(this, e, itemGroup);
BDFDB.ContextMenuUtils.open(this, e, itemGroup);
});
dmdiv.addEventListener("mousedown", e => {
let x = e.pageX, y = e.pageY;

View File

@ -307,7 +307,7 @@ class PluginRepo {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
@ -339,7 +339,7 @@ class PluginRepo {
label: "Plugin Repo",
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-repo-contextMenuItem`,
action: e => {
if (!this.loading.is) BDFDB.closeContextMenu(menu);
if (!this.loading.is) BDFDB.ContextMenuUtils.close(menu);
this.openPluginRepoModal();
}
});

View File

@ -113,7 +113,7 @@ class ReadAllNotificationsButton {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -149,7 +149,7 @@ class ReadAllNotificationsButton {
label: this.labels.context_unreadguilds_text,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-unreadguilds-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.GuildUtils.markAsRead(BDFDB.GuildUtils.getUnread());
}
}),
@ -157,7 +157,7 @@ class ReadAllNotificationsButton {
label: this.labels.context_pingedguilds_text,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-pingedguilds-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.GuildUtils.markAsRead(BDFDB.GuildUtils.getPinged());
}
}),
@ -165,7 +165,7 @@ class ReadAllNotificationsButton {
label: this.labels.context_mutedguilds_text,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-mutedguilds-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.GuildUtils.markAsRead(BDFDB.GuildUtils.getMuted());
}
}),
@ -173,7 +173,7 @@ class ReadAllNotificationsButton {
label: this.labels.context_guilds_text,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-guilds-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
this.addPinnedRecent(instance.props.channel.id);
BDFDB.GuildUtils.markAsRead(BDFDB.GuildUtils.getAll());
}
@ -182,13 +182,13 @@ class ReadAllNotificationsButton {
label: this.labels.context_dms_text,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-dms-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.DMUtils.markAsRead(BDFDB.DMUtils.getAll());
}
})
]
});
BDFDB.openContextMenu(this, e, itemGroup);
BDFDB.ContextMenuUtils.open(this, e, itemGroup);
});
BDFDB.DOMUtils.addClass(wrapper, "RAN-added");
}

View File

@ -90,7 +90,7 @@ class RemoveNicknames {
this.reseting = false;
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -177,7 +177,7 @@ class RepoControls {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -46,7 +46,7 @@ class RevealAllSpoilersOption {
if (this.started) return;
BDFDB.PluginUtils.init(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -73,7 +73,7 @@ class RevealAllSpoilersOption {
hint: BDFDB.BDUtils.isPluginEnabled("MessageUtilities") ? BDFDB.BDUtils.getPlugin("MessageUtilities").getActiveShortcutString("__Reveal_Spoilers") : null,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-reveal-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.revealAllSpoilers(messagediv);
}
})

View File

@ -90,7 +90,7 @@ class ReverseImageSearch {
if (this.started) return;
BDFDB.PluginUtils.init(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -152,7 +152,7 @@ class ReverseImageSearch {
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-engine-contextMenuItem`,
danger: key == "_all",
action: e => {
if (!e.shiftKey) BDFDB.closeContextMenu(menu);
if (!e.shiftKey) BDFDB.ContextMenuUtils.close(menu);
if (key == "_all") {
for (let key2 in engines) if (key2 != "_all" && engines[key2]) window.open(this.defaults.engines[key2].url.replace(this.imgUrlReplaceString, encodeURIComponent(url)), "_blank");
}

View File

@ -107,7 +107,7 @@ class SendLargeMessages {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -265,7 +265,7 @@ class ServerFolders {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -350,7 +350,7 @@ class ServerFolders {
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-removefolder-contextMenuItem`,
danger: true,
action: e => {
BDFDB.closeContextMenu(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ContextMenuUtils.close(BDFDB.DOMUtils.getParent(BDFDB.dotCN.contextmenu, e.target));
BDFDB.ModalUtils.confirm(this, `Are you sure you want to remove the folder${folder.folderName ? (" '" + folder.folderName + '"') : ""}?`, () => {this.removeFolder(folderid);});
}
})
@ -366,7 +366,7 @@ class ServerFolders {
label: folders[i].folderName || (this.labels.modal_tabheader1_text + " #" + parseInt(i+1)),
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-addtofolder-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.addGuildToFolder(folders[i].folderId, guildid);
}
}));
@ -384,7 +384,7 @@ class ServerFolders {
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-removefromfolder-contextMenuItem`,
danger: true,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.removeGuildFromFolder(folder.folderId, guildid);
}
})
@ -394,7 +394,7 @@ class ServerFolders {
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-createfolder-contextMenuItem`,
disabled: !openguilds.length,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.openFolderCreationMenu(openguilds, guildid);
}
}),

View File

@ -124,7 +124,7 @@ class ServerHider {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -167,7 +167,7 @@ class ServerHider {
label: this.labels.submenu_openhidemenu_text,
className: `BDFDB-ContextMenuItem ${this.name}-ContextMenuItem ${this.name}-hidemenu-ContextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.showServerModal();
}
}),
@ -176,7 +176,7 @@ class ServerHider {
className: `BDFDB-ContextMenuItem ${this.name}-ContextMenuItem ${this.name}-hideserver-ContextMenuItem`,
disabled: !(instance.props.guild && !instance.props.target.getAttribute("folder")),
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.toggleServer(instance.props.guild, instance.props.target, false);
}
})

View File

@ -156,7 +156,7 @@ class ShowHiddenChannels {
BDFDB.ModuleUtils.forceAllUpdates(this, "Channels");
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -91,7 +91,7 @@ class ShowImageDetails {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -120,7 +120,7 @@ class SpellCheck {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {
@ -175,7 +175,7 @@ class SpellCheck {
label: suggestion,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-suggestion-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.replaceWord(textarea, word, suggestion);
}
}));
@ -195,7 +195,7 @@ class SpellCheck {
hint: word,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-addword-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.addToOwnDictionary(word);
}
}),

View File

@ -69,7 +69,7 @@ class StalkerNotifications {
});
});
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -48,7 +48,7 @@ class SteamProfileLink {
if (news && news.url && news.url.includes("steam")) this.openInSteam(e, news.url);
});
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}

View File

@ -373,7 +373,7 @@ class ThemeRepo {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
@ -399,7 +399,7 @@ class ThemeRepo {
label: "Theme Repo",
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-repo-contextMenuItem`,
action: e => {
if (!this.loading.is) BDFDB.closeContextMenu(menu);
if (!this.loading.is) BDFDB.ContextMenuUtils.close(menu);
this.openThemeRepoModal();
}
});

View File

@ -49,7 +49,7 @@ class ThemeSettings {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -61,7 +61,7 @@ class TimedLightDarkMode {
this.startInterval();
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -93,7 +93,7 @@ class TopRoleEverywhere {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {

View File

@ -108,7 +108,7 @@ class UserNotes {
if (this.started) return;
BDFDB.PluginUtils.init(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
@ -133,7 +133,7 @@ class UserNotes {
label: BDFDB.LanguageUtils.LanguageStrings.USERS + " " + BDFDB.LanguageUtils.LanguageStrings.NOTE,
className: `BDFDB-contextMenuItem ${this.name}-contextMenuItem ${this.name}-usernote-contextMenuItem`,
action: e => {
BDFDB.closeContextMenu(menu);
BDFDB.ContextMenuUtils.close(menu);
this.openNotesModal(instance.props.user);
}
})

View File

@ -46,7 +46,7 @@ class WriteUpperCase {
BDFDB.ModuleUtils.forceAllUpdates(this);
}
else console.error(`%c[${this.getName()}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
}
stop () {