stuff
This commit is contained in:
parent
b0097b681c
commit
25f35a86fd
|
@ -4075,7 +4075,6 @@
|
|||
inputNumberWrapperMini: "numberInputWrapperMini-wtUU31 numberInputWrapper-j4svZS",
|
||||
loadingIcon: "loadingIcon-cOYMPl",
|
||||
loadingIconWrapper: "loadingIconWrapper-PsVJ9m",
|
||||
lineThrough: "lineThrough-MPlPsV",
|
||||
overflowEllipsis: "ellipsis-qlo9sA",
|
||||
popoutWrapper: "popout-xwjvsX",
|
||||
quickSelectWrapper: "quickSelectWrapper-UCfTKz",
|
||||
|
@ -4111,8 +4110,7 @@
|
|||
tableStickyHeader: "stickyHeader-JabwjW header-g67q9_",
|
||||
textScroller: "textScroller-dc9_kz",
|
||||
themedPopout: "themedPopout-1TrfdI",
|
||||
tooltipCustom: "tooltipCustom-hH39_Z",
|
||||
underline: "underline-6nu217"
|
||||
tooltipCustom: "tooltipCustom-hH39_Z"
|
||||
};
|
||||
DiscordClassModules.BDrepo = {
|
||||
bdAddonCard: "bd-card bd-addon-card",
|
||||
|
@ -4477,6 +4475,7 @@
|
|||
DiscordClassModules.TextColor = BDFDB.ModuleUtils.findByProperties("colorStandard", "colorMuted", "colorError");
|
||||
DiscordClassModules.TextColor2 = BDFDB.ModuleUtils.findByProperties("muted", "wrapper", "base");
|
||||
DiscordClassModules.TextSize = BDFDB.ModuleUtils.findByProperties("size10", "size14", "size20");
|
||||
DiscordClassModules.TextStyle = BDFDB.ModuleUtils.findByProperties("strikethrough", "underline", "bold");
|
||||
DiscordClassModules.Tip = BDFDB.ModuleUtils.findByProperties("pro", "inline");
|
||||
DiscordClassModules.Title = BDFDB.ModuleUtils.findByProperties("title", "size18");
|
||||
DiscordClassModules.TitleBar = BDFDB.ModuleUtils.findByProperties("titleBar", "wordmark");
|
||||
|
@ -4682,6 +4681,7 @@
|
|||
badgewrapper: ["NotFound", "badgeWrapper"],
|
||||
bdfdbdev: ["BDFDB", "dev"],
|
||||
bdfdbsupporter: ["BDFDB", "supporter"],
|
||||
bold: ["TextStyle", "bold"],
|
||||
bottag: ["BotTag", "botTag"],
|
||||
bottaginvert: ["BotTag", "botTagInvert"],
|
||||
bottagmember: ["Member", "botTag"],
|
||||
|
@ -5267,6 +5267,7 @@
|
|||
invitestatusoffline: ["GuildInvite", "statusOffline"],
|
||||
invitestatusonline: ["GuildInvite", "statusOnline"],
|
||||
inviteuserselectnone: ["GuildInvite", "userSelectNone"],
|
||||
italics: ["TextStyle", "italics"],
|
||||
justifycenter: ["Flex", "justifyCenter"],
|
||||
justifyend: ["Flex", "justifyEnd"],
|
||||
justifystart: ["Flex", "justifyStart"],
|
||||
|
@ -5278,7 +5279,7 @@
|
|||
layerbase: ["Layers", "baseLayer"],
|
||||
layers: ["Layers", "layers"],
|
||||
layersbg: ["Layers", "bg"],
|
||||
linethrough: ["BDFDB", "lineThrough"],
|
||||
linethrough: ["TextStyle", "strikethrough"],
|
||||
listavatar: ["UserProfile", "listAvatar"],
|
||||
listdiscriminator: ["UserProfile", "listDiscriminator"],
|
||||
listname: ["UserProfile", "listName"],
|
||||
|
@ -5740,6 +5741,7 @@
|
|||
spoilerwarning: ["Spoiler", "spoilerWarning"],
|
||||
splashbackground: ["NotFound", "splashBackground"],
|
||||
standardsidebarview: ["SettingsWindow", "standardSidebarView"],
|
||||
strikethrough: ["TextStyle", "strikeThrough"],
|
||||
status: ["Avatar", "status"],
|
||||
stopanimations: ["NotFound", "stopAnimations"],
|
||||
subtext: ["NotFound", "subtext"],
|
||||
|
@ -5866,7 +5868,7 @@
|
|||
typing: ["Typing", "typing"],
|
||||
typingcooldownwrapper: ["Typing", "cooldownWrapper"],
|
||||
typingtext: ["Typing", "text"],
|
||||
underline: ["BDFDB", "underline"],
|
||||
underline: ["TextStyle", "underline"],
|
||||
unreadbar: ["UnreadBar", "bar"],
|
||||
unreadbaractive: ["UnreadBar", "active"],
|
||||
unreadbarcontainer: ["UnreadBar", "container"],
|
||||
|
@ -5981,11 +5983,6 @@
|
|||
voiceuser: ["VoiceChannel", "voiceUser"],
|
||||
voiceuserlarge: ["VoiceChannel", "userLarge"],
|
||||
voiceusersmall: ["VoiceChannel", "userSmall"],
|
||||
weightbold: ["TextStyle", "weightBold"],
|
||||
weightlight: ["TextStyle", "weightLight"],
|
||||
weightmedium: ["TextStyle", "weightMedium"],
|
||||
weightnormal: ["TextStyle", "weightNormal"],
|
||||
weightsemibold: ["TextStyle", "weightSemiBold"],
|
||||
wrap: ["Flex", "wrap"],
|
||||
wrapreverse: ["Flex", "wrapReverse"]
|
||||
};
|
||||
|
@ -8469,14 +8466,6 @@
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
${BDFDB.dotCN.underline} {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
${BDFDB.dotCN.linethrough} {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
${BDFDB.dotCN.avatarwrapper + BDFDB.dotCN.messageavatar} {
|
||||
overflow: visible;
|
||||
border-radius: 0;
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,31 +1,14 @@
|
|||
//META{"name":"MoveablePopups","authorId":"278543574059057154","invite":"Jx3TjNS","donate":"https://www.paypal.me/MircoWittrien","patreon":"https://www.patreon.com/MircoWittrien","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/MoveablePopups","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/MoveablePopups/MoveablePopups.plugin.js"}*//
|
||||
|
||||
var MoveablePopups = (_ => {
|
||||
var dragging;
|
||||
|
||||
return class MoveablePopups {
|
||||
getName () {return "MoveablePopups";}
|
||||
|
||||
getVersion () {return "1.1.6";}
|
||||
getVersion () {return "1.1.7";}
|
||||
|
||||
getAuthor () {return "DevilBro";}
|
||||
|
||||
getDescription () {return "Adds the feature to move all popups and modals around like on a normal desktop. Ctrl + drag with your left mousebutton to drag element.";}
|
||||
|
||||
constructor () {
|
||||
this.changelog = {
|
||||
"improved":[["New Library Structure & React","Restructured my Library and switched to React rendering instead of DOM manipulation"]]
|
||||
};
|
||||
|
||||
this.patchedModules = {
|
||||
after: {
|
||||
Popouts: "componentDidMount",
|
||||
ReferencePositionLayer: "componentDidMount",
|
||||
Modals: "componentDidMount",
|
||||
ModalLayer: "componentDidMount"
|
||||
}
|
||||
};
|
||||
}
|
||||
getDescription () {return "DISCONTINUED";}
|
||||
|
||||
// Legacy
|
||||
load () {}
|
||||
|
@ -56,7 +39,23 @@ var MoveablePopups = (_ => {
|
|||
if (this.started) return;
|
||||
BDFDB.PluginUtils.init(this);
|
||||
|
||||
BDFDB.ModuleUtils.forceAllUpdates(this);
|
||||
BDFDB.ModalUtils.open(this, {
|
||||
header: this.name,
|
||||
subheader: "Delete?",
|
||||
text: `This plugin is discontinued, click "${BDFDB.LanguageUtils.LanguageStrings.DELETE}" to delete all remaining files created by this plugin.`,
|
||||
buttons: [{
|
||||
color: "RED",
|
||||
contents: BDFDB.LanguageUtils.LanguageStrings.DELETE,
|
||||
close: true,
|
||||
click: _ => {
|
||||
BDFDB.LibraryRequires.fs.unlink(BDFDB.LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), `${this.name}.config.json`), _ => {});
|
||||
BDFDB.LibraryRequires.fs.unlink(BDFDB.LibraryRequires.path.join(BDFDB.BDUtils.getPluginsFolder(), `${this.name}.plugin.js`), _ => {});
|
||||
}
|
||||
}],
|
||||
onClose: _ => {
|
||||
BDFDB.BDUtils.disablePlugin(this.name);
|
||||
}
|
||||
});
|
||||
}
|
||||
else console.error(`%c[${this.getName()}]%c`, "color: #3a71c1; font-weight: 700;", "", "Fatal Error: Could not load BD functions!");
|
||||
}
|
||||
|
@ -66,71 +65,11 @@ var MoveablePopups = (_ => {
|
|||
if (window.BDFDB && typeof BDFDB === "object" && BDFDB.loaded) {
|
||||
this.stopping = true;
|
||||
|
||||
BDFDB.ModuleUtils.forceAllUpdates(this);
|
||||
|
||||
BDFDB.PluginUtils.clear(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Begin of own functions
|
||||
|
||||
processPopouts (e) {
|
||||
BDFDB.ObserverUtils.connect(this, e.node, {name:"popoutObserver", instance:new MutationObserver(changes => {changes.forEach(change => {change.addedNodes.forEach(node => {
|
||||
if (node && BDFDB.DOMUtils.containsClass(node, BDFDB.disCN.popout)) this.makeMoveable(node);
|
||||
})})})}, {childList: true});
|
||||
}
|
||||
|
||||
processReferencePositionLayer (e) {
|
||||
this.makeMoveable(e.node);
|
||||
}
|
||||
|
||||
processModals (e) {
|
||||
BDFDB.ObserverUtils.connect(this, e.node, {name:"modalObserver", instance:new MutationObserver(changes => {changes.forEach(change => {change.addedNodes.forEach(node => {
|
||||
if (node && !node.querySelector(BDFDB.dotCN.downloadlink)) this.makeMoveable(node.querySelector(BDFDB.dotCNC.modalinner + BDFDB.dotCN.layermodal));
|
||||
else if (node.tagName && !node.querySelector(BDFDB.dotCN.downloadlink)) this.makeMoveable(node.querySelector(BDFDB.dotCNC.modalinner + BDFDB.dotCN.layermodal));
|
||||
})})})}, {childList: true});
|
||||
}
|
||||
|
||||
processModalLayer (e) {
|
||||
if (e.node && !e.node.querySelector(BDFDB.dotCN.downloadlink)) this.makeMoveable(e.node.querySelector(BDFDB.dotCNC.modalinner + BDFDB.dotCN.layermodal));
|
||||
}
|
||||
|
||||
makeMoveable (div) {
|
||||
if (!Node.prototype.isPrototypeOf(div)) return;
|
||||
div.removeEventListener("click", div.clickMovablePopups);
|
||||
div.removeEventListener("mousedown", div.mousedownMovablePopups);
|
||||
div.clickMovablePopups = e => {if (dragging) BDFDB.ListenerUtils.stopEvent(e);};
|
||||
div.mousedownMovablePopups = e => {
|
||||
if (!e.ctrlKey) return;
|
||||
div.style.setProperty("position", "fixed", "important");
|
||||
dragging = true;
|
||||
var rects = BDFDB.DOMUtils.getRects(div);
|
||||
var transform = getComputedStyle(div, null).getPropertyValue("transform").replace(/[^0-9,-]/g,"").split(",");
|
||||
var left = rects.left - (transform.length > 4 ? parseFloat(transform[4]) : 0);
|
||||
var top = rects.top - (transform.length > 4 ? parseFloat(transform[5]) : 0);
|
||||
var oldX = e.pageX;
|
||||
var oldY = e.pageY;
|
||||
var mouseup = e2 => {
|
||||
BDFDB.DOMUtils.removeLocalStyle("disableTextSelection");
|
||||
document.removeEventListener("mouseup", mouseup);
|
||||
document.removeEventListener("mousemove", mousemove);
|
||||
BDFDB.TimeUtils.timeout(_ => {dragging = false});
|
||||
};
|
||||
var mousemove = e2 => {
|
||||
left = left - (oldX - e2.pageX);
|
||||
top = top - (oldY - e2.pageY);
|
||||
oldX = e2.pageX;
|
||||
oldY = e2.pageY;
|
||||
div.style.setProperty("left", left + "px", "important");
|
||||
div.style.setProperty("top", top + "px", "important");
|
||||
|
||||
};
|
||||
document.addEventListener("mouseup", mouseup);
|
||||
document.addEventListener("mousemove", mousemove);
|
||||
};
|
||||
div.addEventListener("click", div.clickMovablePopups);
|
||||
div.addEventListener("mousedown", div.mousedownMovablePopups);
|
||||
}
|
||||
}
|
||||
})();
|
|
@ -77,7 +77,6 @@ https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/I
|
|||
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/JoinedAtDate/JoinedAtDate.plugin.js
|
||||
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/LastMessageDate/LastMessageDate.plugin.js
|
||||
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/MessageUtilities/MessageUtilities.plugin.js
|
||||
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/MoveablePopups/MoveablePopups.plugin.js
|
||||
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/NotificationSounds/NotificationSounds.plugin.js
|
||||
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/OldTitleBar/OldTitleBar.plugin.js
|
||||
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/OwnerTag/OwnerTag.plugin.js
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
- [Joined At Date](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/JoinedAtDate) - Displays the Joined At Date of a Member in the UserPopout and UserModal.
|
||||
- [Last Message Date](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/LastMessageDate) - Displays the Date of the last sent Message of a Member for the current Server/DM in the UserPopout and UserModal.
|
||||
- [Message Utilities](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/MessageUtilities) - Offers a number of useful message options.
|
||||
- [Moveable Popups](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/MoveablePopups) - Adds the feature to move all popups and modals around like on a normal desktop. Ctrl + drag with your left mousebutton to drag element.
|
||||
- [Notification Sounds](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/NotificationSounds) - Allows you to replace the native sounds of Discord with your own.
|
||||
- [Old Title Bar](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/OldTitleBar) - Reverts the title bar back to its former self.
|
||||
- [Owner Tag](https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/OwnerTag) - Adds a Tag like Bottags to the Serverowner..
|
||||
|
|
|
@ -493,7 +493,7 @@ var ShowHiddenChannels = (_ => {
|
|||
}
|
||||
})
|
||||
}),
|
||||
labelClassName: role.overwritten && BDFDB.disCN.linethrough,
|
||||
labelClassName: role.overwritten && BDFDB.disCN.strikethrough,
|
||||
label: BDFDB.ReactUtils.createElement("span", {
|
||||
children: role.name,
|
||||
style: {color: role.colorString}
|
||||
|
|
Loading…
Reference in New Issue