This commit is contained in:
Mirco Wittrien 2019-10-22 11:37:23 +02:00
parent a3ee368be0
commit 4f118d052f
52 changed files with 104 additions and 1 deletions

View File

@ -78,6 +78,7 @@ var BDFDB = {myPlugins: BDFDB && BDFDB.myPlugins || {}, BDv2Api: BDFDB && BDFDB.
if (BDFDB.ObjectUtils.isEmpty(window.PluginUpdates.plugins)) BDFDB.removeEles("#bd-settingspane-container .bd-updatebtn" + BDFDB.dotCN._repofolderbutton);
delete plugin.started;
delete plugin.stopping;
};
BDFDB.PluginUtils.translate = function (plugin) {
if (typeof plugin.setLabelsByLanguage === "function" || typeof plugin.changeLanguageStrings === "function") {

File diff suppressed because one or more lines are too long

View File

@ -204,6 +204,8 @@ class BadgesEverywhere {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".BE-badges");
BDFDB.unloadMessage(this);
}

View File

@ -60,6 +60,8 @@ class BetterFriendCount {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".betterfriendcount-badge");
BDFDB.unloadMessage(this);
}

View File

@ -54,6 +54,8 @@ class BetterNsfwTag {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".NSFW-tag");
BDFDB.unloadMessage(this);
}

View File

@ -117,6 +117,8 @@ class BetterSearchPage {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".BSP-pagination",".BSP-pagination-button",".BSP-pagination-jumpinput");
BDFDB.unloadMessage(this);
}

View File

@ -121,6 +121,8 @@ class CharCounter {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".charcounter");
BDFDB.removeClasses("charcounter-added");
BDFDB.unloadMessage(this);

View File

@ -177,6 +177,8 @@ class ChatAliases {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".autocompleteAliases", ".autocompleteAliasesRow");
BDFDB.unloadMessage(this);
}

View File

@ -190,6 +190,8 @@ class ChatFilter {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
document.querySelectorAll(`${BDFDB.dotCN.messagemarkup}.blocked, ${BDFDB.dotCN.messageaccessory}.censored, ${BDFDB.dotCN.messagemarkup}.blocked, ${BDFDB.dotCN.messageaccessory}.censored`).forEach(message => {this.resetMessage(message);});
BDFDB.unloadMessage(this);

View File

@ -139,6 +139,8 @@ class CompleteTimestamps {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".complete-timestamp-divider");
BDFDB.removeClasses("complete-timestamp");

View File

@ -52,6 +52,8 @@ class CopyRawMessage {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -137,6 +137,8 @@ class CreationDate {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".creationDate");
BDFDB.unloadMessage(this);
}

View File

@ -102,6 +102,8 @@ class DisplayServersAsChannels {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeClasses("DSAC-styled");
BDFDB.removeEles(".DSAC-verification-badge, .DSAC-name, .DSAC-icon");

View File

@ -124,6 +124,8 @@ class EditChannels {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
let data = BDFDB.loadAllData(this, "channels");
BDFDB.removeAllData(this, "channels");
try {this.forceUpdateAll();} catch (err) {}

View File

@ -114,6 +114,8 @@ class EditServers {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
let data = BDFDB.loadAllData(this, "servers");
BDFDB.removeAllData(this, "servers");
try {this.forceUpdateAll();} catch (err) {}

View File

@ -171,6 +171,8 @@ class EditUsers {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
let data = BDFDB.loadAllData(this, "users");
BDFDB.removeAllData(this, "users");
try {this.forceUpdateAll();} catch (err) {}

View File

@ -191,6 +191,8 @@ class EmojiStatistics {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".emoji-tooltip",".emojistatistics-button");
BDFDB.unloadMessage(this);
}

View File

@ -54,6 +54,8 @@ class ForceImagePreviews {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".FIP-embed");
BDFDB.unloadMessage(this);
}

View File

@ -329,6 +329,8 @@ class FriendNotifications {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
clearInterval(this.checkInterval);
BDFDB.unloadMessage(this);
}

View File

@ -92,6 +92,8 @@ class GoogleSearchReplace {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -200,6 +200,8 @@ class GoogleTranslateOption {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
document.querySelectorAll(BDFDB.dotCN.messagegroup + " .GTO-translated-message").forEach(message => {
this.resetMessage(message);
});

View File

@ -74,6 +74,8 @@ class ImageGallery {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
this.closemodal = true;
BDFDB.WebModules.forceAllUpdates(this, "ImageModal");

View File

@ -77,6 +77,8 @@ class ImageZoom {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
for (let img of document.querySelectorAll(BDFDB.dotCNS.imagewrapper + "img")) if (img.ImageZoomMouseDownListener) {
img.removeEventListener("mousedown", img.ImageZoomMouseDownListener);
delete img.ImageZoomMouseDownListener;

View File

@ -138,6 +138,8 @@ class JoinedAtDate {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".joinedAtDate");
BDFDB.unloadMessage(this);
}

View File

@ -145,6 +145,8 @@ class LastMessageDate {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".lastMessageDate");
BDFDB.unloadMessage(this);
}

View File

@ -140,6 +140,8 @@ class MessageUtilities {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -92,6 +92,8 @@ class MoveablePopups {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -279,6 +279,8 @@ class NotificationSounds {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
this.settingsaudio.pause();
}

View File

@ -172,6 +172,8 @@ class OldTitleBar {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".headerbarOTB", ".settingsTitlebarOTB");
BDFDB.removeClasses("hidden-by-OTB", "settingsTitlebarOTB-added");

View File

@ -107,6 +107,8 @@ class OwnerTag {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".owner-tag, .owner-tag-crown");
BDFDB.removeLocalStyle(this.name + "HideCrown");

View File

@ -186,6 +186,8 @@ class PersonalPins {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".popout-personalpins-notes", ".personalpins-sort-popout", ".notes-button");
BDFDB.unloadMessage(this);
}

View File

@ -168,6 +168,8 @@ class PinDMs {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
let dmsscrollerinstance = BDFDB.getReactInstance(document.querySelector(BDFDB.dotCNS.dmchannels + BDFDB.dotCN.scroller));
if (dmsscrollerinstance) {
let dms = dmsscrollerinstance.return.return.return.memoizedProps.children;

View File

@ -315,6 +315,8 @@ class PluginRepo {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
clearInterval(this.updateInterval);
clearTimeout(this.loading.timeout);

View File

@ -120,6 +120,8 @@ class ReadAllNotificationsButton {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".RANbutton-frame", ".RAMbutton");
BDFDB.removeClasses("RAN-added", "RAM-added");
BDFDB.unloadMessage(this);

View File

@ -98,6 +98,8 @@ class RemoveNicknames {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
this.reseting = true;
BDFDB.WebModules.forceAllUpdates(this);

View File

@ -185,6 +185,8 @@ class RepoControls {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".repo-controls","#bd-settingspane-container .trashIcon");
BDFDB.removeClasses("repocontrols-added");

View File

@ -53,6 +53,8 @@ class RevealAllSpoilersOption {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -97,6 +97,8 @@ class ReverseImageSearch {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -117,6 +117,8 @@ class SendLargeMessages {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -265,6 +265,8 @@ class ServerFolders {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(this.foldercontent, BDFDB.dotCN.guildswrapper + ".foldercontent");
let modal = document.querySelector(`.${this.name}-modal`);

View File

@ -133,6 +133,8 @@ class ServerHider {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.readServerList().forEach(info => {
if (info.div.ServerHiderChangeObserver && typeof info.div.ServerHiderChangeObserver.disconnect == "function") info.div.ServerHiderChangeObserver.disconnect();
if (!info.div.getAttribute("folder")) BDFDB.toggleEles(info.div, true);

View File

@ -163,6 +163,8 @@ class ShowHiddenChannels {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".container-hidden");
BDFDB.unloadMessage(this);
}

View File

@ -98,6 +98,8 @@ class ShowImageDetails {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
document.querySelectorAll(".image-details-added").forEach(image => {this.resetImage(image);});
BDFDB.unloadMessage(this);

View File

@ -127,6 +127,8 @@ class SpellCheck {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".spellcheck-overlay");
BDFDB.removeClasses("spellcheck-added");

View File

@ -76,6 +76,8 @@ class StalkerNotifications {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}
@ -104,6 +106,8 @@ class StalkerNotifications {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -56,6 +56,8 @@ class SteamProfileLink {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".urlCheckFrame");
BDFDB.unloadMessage(this);

View File

@ -381,6 +381,8 @@ class ThemeRepo {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
clearInterval(this.updateInterval);
clearTimeout(this.loading.timeout);

View File

@ -56,6 +56,8 @@ class ThemeSettings {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".themes-settings-button",".themes-settings-footer");
BDFDB.unloadMessage(this);
}

View File

@ -68,6 +68,8 @@ class TimedLightDarkMode {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
clearInterval(this.checkInterval);
BDFDB.removeEles(".TLDM-settingsbox");

View File

@ -100,6 +100,8 @@ class TopRoleEverywhere {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.removeEles(".TRE-tag");
BDFDB.unloadMessage(this);
}

View File

@ -116,6 +116,8 @@ class UserNotes {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}

View File

@ -53,6 +53,8 @@ class WriteUpperCase {
stop () {
if (global.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
this.stopping = true;
BDFDB.unloadMessage(this);
}
}