Update EmojiStatistics.plugin.js
This commit is contained in:
parent
a841655735
commit
9ec8ff66bc
|
@ -3,13 +3,17 @@
|
||||||
class EmojiStatistics {
|
class EmojiStatistics {
|
||||||
getName () {return "EmojiStatistics";}
|
getName () {return "EmojiStatistics";}
|
||||||
|
|
||||||
getVersion () {return "2.8.0";}
|
getVersion () {return "2.8.1";}
|
||||||
|
|
||||||
getAuthor () {return "DevilBro";}
|
getAuthor () {return "DevilBro";}
|
||||||
|
|
||||||
getDescription () {return "Adds some helpful options to show you more information about emojis and emojiservers.";}
|
getDescription () {return "Adds some helpful options to show you more information about emojis and emojiservers.";}
|
||||||
|
|
||||||
initConstructor () {
|
initConstructor () {
|
||||||
|
this.changelog = {
|
||||||
|
"fixed":[["Picker","Fixed the issue where the picker wouldn't close on clicking the Statistics Button"]]
|
||||||
|
};
|
||||||
|
|
||||||
this.labels = {};
|
this.labels = {};
|
||||||
|
|
||||||
this.patchModules = {
|
this.patchModules = {
|
||||||
|
@ -250,7 +254,8 @@ class EmojiStatistics {
|
||||||
let emojiStatisticsButton = BDFDB.htmlToElement(`<div class="emojistatistics-button"></div>`);
|
let emojiStatisticsButton = BDFDB.htmlToElement(`<div class="emojistatistics-button"></div>`);
|
||||||
emojipickerdiversityselector.parentElement.insertBefore(emojiStatisticsButton, emojipickerdiversityselector);
|
emojipickerdiversityselector.parentElement.insertBefore(emojiStatisticsButton, emojipickerdiversityselector);
|
||||||
emojiStatisticsButton.addEventListener("click", () => {
|
emojiStatisticsButton.addEventListener("click", () => {
|
||||||
let close = BDFDB.getReactValue(instance, "_reactInternalFiber.return.return.return.return.return.stateNode.close");
|
let close = BDFDB.getReactValue(instance, "_reactInternalFiber.return.return.return.return.stateNode.close");
|
||||||
|
console.log(instance);
|
||||||
if (close) close();
|
if (close) close();
|
||||||
this.showEmojiInformationModal();
|
this.showEmojiInformationModal();
|
||||||
});
|
});
|
||||||
|
@ -349,12 +354,19 @@ class EmojiStatistics {
|
||||||
|
|
||||||
createCopyOfServer (info) {
|
createCopyOfServer (info) {
|
||||||
let serverCopy = info.div.cloneNode(true);
|
let serverCopy = info.div.cloneNode(true);
|
||||||
|
BDFDB.removeEles(serverCopy.querySelectorAll(BDFDB.dotCNC.guildpill + BDFDB.dotCNC.guildbadgewrapper + "mask"));
|
||||||
|
serverCopy.style.setProperty("margin", "0");
|
||||||
|
serverCopy.style.setProperty("width", "48px");
|
||||||
|
serverCopy.style.setProperty("height", "48px");
|
||||||
|
serverCopy.style.setProperty("overflow", "hidden");
|
||||||
|
serverCopy.style.setProperty("border-radius", "50%");
|
||||||
|
serverCopy.querySelector("foreignObject").removeAttribute("mask");
|
||||||
BDFDB.toggleEles(serverCopy, true);
|
BDFDB.toggleEles(serverCopy, true);
|
||||||
BDFDB.removeClass(serverCopy, BDFDB.disCN.guildunread, BDFDB.disCN.guildselected);
|
serverCopy.addEventListener("click", e => {
|
||||||
serverCopy.style.setProperty("pointer-events", "none", "important");
|
BDFDB.stopEvent(e);
|
||||||
let serverInner = serverCopy.querySelector(BDFDB.dotCN.guildinner);
|
info.div.querySelector("a").click();
|
||||||
serverInner.style.removeProperty("background-color");
|
});
|
||||||
serverInner.style.removeProperty("border-radius");
|
serverCopy.addEventListener("contextmenu", e => {BDFDB.openGuildContextMenu(info.div, e);});
|
||||||
return serverCopy;
|
return serverCopy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue