diff --git a/Library/_res/0BDFDB.data.json b/Library/_res/0BDFDB.data.json index 743341772c..89ee6cfff8 100644 --- a/Library/_res/0BDFDB.data.json +++ b/Library/_res/0BDFDB.data.json @@ -394,10 +394,12 @@ "Thin": {"props": ["AdvancedScrollerThin", "AdvancedScrollerAuto"], "value": "AdvancedScrollerThin"} } }, + "SliderMarkerPositions": {"props": ["MarkerPositions"], "value": "MarkerPositions"}, "Spinner": {"name": "Spinner"}, "Status": {"name": "Status"}, "StatusPickerPopout": {"strings": ["\"StatusPickerPopout\""], "value": "default"}, "TextElement": {"name": "Text"}, + "UserBadgeKeys": {"props": ["BadgeKeys"], "value": "BadgeKeys"}, "UserBadges": {"props": ["BadgeSizes"]}, "UserPopout": {"name": "UserPopoutContainer"}, "UserSummaryItem": {"name": "UserSummaryItem"}, @@ -2872,6 +2874,7 @@ "searchpopoutselected": ["SearchPopout", "selected"], "searchpopoutuser": ["SearchPopout", "user"], "searchresultschannelname": ["SearchResultsGroup", "channelName"], + "searchresultsblocked": ["SearchResultsGroup", "resultsBlocked"], "searchresultsgroup": ["SearchResultsGroup", "searchResultGroup"], "searchresultsmessage": ["SearchResultsMessage", "message"], "searchresultspagination": ["NotFound", "searchResultsPagination"], @@ -2948,6 +2951,8 @@ "slidergrabber": ["Slider", "grabber"], "sliderinput": ["Slider", "input"], "slidermark": ["Slider", "mark"], + "slidermarkabove": ["Slider", "markAbove"], + "slidermarkbelow": ["Slider", "markBelow"], "slidermarkdash": ["Slider", "markDash"], "slidermarkdashsimple": ["Slider", "markDashSimple"], "slidermarkvalue": ["Slider", "markValue"], diff --git a/Plugins/ShowBadgesInChat/ShowBadgesInChat.plugin.js b/Plugins/ShowBadgesInChat/ShowBadgesInChat.plugin.js index ad3b1962b4..eb3785ee24 100644 --- a/Plugins/ShowBadgesInChat/ShowBadgesInChat.plugin.js +++ b/Plugins/ShowBadgesInChat/ShowBadgesInChat.plugin.js @@ -91,10 +91,10 @@ module.exports = (_ => { } }; - for (let key of Object.keys(BDFDB.LibraryModules.UserBadgeKeys).filter(n => isNaN(parseInt(n)))) { + for (let key of Object.keys(BDFDB.LibraryComponents.UserBadgeKeys).filter(n => isNaN(parseInt(n)))) { let basicKey = key.replace(/_LEVEL_\d+/g, ""); if (!this.defaults.badges[basicKey]) this.defaults.badges[basicKey] = {value: true, keys: []}; - this.defaults.badges[basicKey].keys.push(BDFDB.LibraryModules.UserBadgeKeys[key]); + this.defaults.badges[basicKey].keys.push(BDFDB.LibraryComponents.UserBadgeKeys[key]); } this.css = ` @@ -397,7 +397,7 @@ module.exports = (_ => { } else for (let key of this.defaults.badges[flag].keys) { let userFlag = flag == "PREMIUM" || flag == "GUILD_BOOSTER" ? 0 : BDFDB.DiscordConstants.UserFlags[flag]; - let keyName = BDFDB.LibraryModules.UserBadgeKeys[key]; + let keyName = BDFDB.LibraryComponents.UserBadgeKeys[key]; if (userFlag == null && keyName) userFlag = BDFDB.DiscordConstants.UserFlags[keyName] != null ? BDFDB.DiscordConstants.UserFlags[keyName] : BDFDB.DiscordConstants.UserFlags[Object.keys(BDFDB.DiscordConstants.UserFlags).find(f => f.indexOf(keyName) > -1 || keyName.indexOf(f) > -1)]; if (userFlag != null) { let id; diff --git a/Plugins/TimedLightDarkMode/TimedLightDarkMode.plugin.js b/Plugins/TimedLightDarkMode/TimedLightDarkMode.plugin.js index 28484c78cf..df47372456 100644 --- a/Plugins/TimedLightDarkMode/TimedLightDarkMode.plugin.js +++ b/Plugins/TimedLightDarkMode/TimedLightDarkMode.plugin.js @@ -2,7 +2,7 @@ * @name TimedLightDarkMode * @author DevilBro * @authorId 278543574059057154 - * @version 1.1.1 + * @version 1.1.2 * @description Adds a Time Slider to the Appearance Settings * @invite Jx3TjNS * @donate https://www.paypal.me/MircoWittrien @@ -17,7 +17,7 @@ module.exports = (_ => { "info": { "name": "TimedLightDarkMode", "author": "DevilBro", - "version": "1.1.1", + "version": "1.1.2", "description": "Adds a Time Slider to the Appearance Settings" } }; @@ -128,15 +128,17 @@ module.exports = (_ => { if (slider) BDFDB.DOMUtils.toggleClass(slider, BDFDB.disCN.sliderdisabled, !value); } }), - BDFDB.ReactUtils.elementToReact(BDFDB.DOMUtils.create(`
00:00
03:00
06:00
09:00
12:00
15:00
18:00
21:00
24:00
`), node => { - if (Node.prototype.isPrototypeOf(node)) { - slider = node; - this.updateSlider(slider, values); - BDFDB.ListenerUtils.addToChildren(slider, "mousedown", BDFDB.dotCN._timedlightdarkmodetimergrabber, event => {this.dragSlider(event.currentTarget);}); - BDFDB.ListenerUtils.addToChildren(slider, "mouseenter", BDFDB.dotCN._timedlightdarkmodedategrabber, event => {this.showCurrentTime(event.currentTarget);}); - } + BDFDB.ReactUtils.elementToReact(BDFDB.DOMUtils.create(`
${[["0%", "00:00"], ["12.5%", "03:00"], ["25%", "06:00"], ["37.5%", "09:00"], ["50%", "12:00"], ["62.5%", "15:00"], ["75%", "18:00"], ["87.5%", "21:00"], ["100%", "24:00"]].map(n => `
${n[1]}
`).join("")}
`), node => { + if (!Node.prototype.isPrototypeOf(node)) return; + slider = node; + this.updateSlider(slider, values); + BDFDB.ListenerUtils.addToChildren(slider, "mousedown", BDFDB.dotCN._timedlightdarkmodetimergrabber, event => this.dragSlider(event.currentTarget)); + BDFDB.ListenerUtils.addToChildren(slider, "mouseenter", BDFDB.dotCN._timedlightdarkmodedategrabber, event => this.showCurrentTime(event.currentTarget)); }) ] + }), + BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.FormComponents.FormDivider, { + className: BDFDB.disCNS.margintop20 + BDFDB.disCN.marginbottom8 }) ].flat(10).filter(n => n); } @@ -186,7 +188,6 @@ module.exports = (_ => { let track = grabber.parentNode; if (BDFDB.DOMUtils.containsClass(track.parentNode, BDFDB.disCN.sliderdisabled)) return; let timer = grabber.getAttribute("timer"); - let input = track.parentNode.querySelector(`${BDFDB.dotCN.sliderinput}[timer="${timer}"]`); BDFDB.DOMUtils.appendLocalStyle("disableTextSelection", `*{user-select: none !important;}`); @@ -208,7 +209,6 @@ module.exports = (_ => { let mouseMove = e => { sY = e.clientX > sMaxX ? sMaxX - sHalfW : (e.clientX < sMinX ? sMinX - sHalfW : e.clientX - sHalfW); value = BDFDB.NumberUtils.mapRange([sMinX - sHalfW, sMaxX - sHalfW], [0, 100], sY); - input.value = value; grabber.style.setProperty("left", value + "%"); tooltipContent.innerText = this.getTime(value, true); tooltip.update();