stuff
This commit is contained in:
parent
77ce03534b
commit
0f87187e0a
File diff suppressed because one or more lines are too long
|
@ -3,7 +3,7 @@
|
||||||
class ReadAllNotificationsButton {
|
class ReadAllNotificationsButton {
|
||||||
getName () {return "ReadAllNotificationsButton";}
|
getName () {return "ReadAllNotificationsButton";}
|
||||||
|
|
||||||
getVersion () {return "1.4.3";}
|
getVersion () {return "1.4.4";}
|
||||||
|
|
||||||
getAuthor () {return "DevilBro";}
|
getAuthor () {return "DevilBro";}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ class ReadAllNotificationsButton {
|
||||||
|
|
||||||
initConstructor () {
|
initConstructor () {
|
||||||
this.changelog = {
|
this.changelog = {
|
||||||
"fixed":[["Changes","Fixed for the new server classes"]]
|
"fixed":[["Canary/PTB","Fixed the plugin for canary and ptb"]]
|
||||||
};
|
};
|
||||||
|
|
||||||
this.patchModules = {
|
this.patchModules = {
|
||||||
|
@ -39,12 +39,14 @@ class ReadAllNotificationsButton {
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
this.RANbuttonMarkup =
|
this.RANbuttonMarkup =
|
||||||
`<div class="${BDFDB.disCN.guild} RANbutton-frame" id="bd-pub-li" style="height: 20px; margin-bottom: 10px;">
|
!BDFDB.DiscordClassModules.HomeIcon.button ? `<div class="${BDFDB.disCN.guild} RANbutton-frame" id="bd-pub-li" style="height: 20px; margin-bottom: 10px;">
|
||||||
<div class="${BDFDB.disCN.guildinner}" style="height: 20px; border-radius: 4px;">
|
<div class="${BDFDB.disCN.guildinner}" style="height: 20px; border-radius: 4px;">
|
||||||
<a>
|
<a>
|
||||||
<div class="RANbutton" id="bd-pub-button" style="line-height: 20px; font-size: 12px;">read all</div>
|
<div class="RANbutton" id="bd-pub-button" style="line-height: 20px; font-size: 12px;">read all</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>` : `<div class="${BDFDB.disCN.guildouter} RANbutton-frame">
|
||||||
|
<div class="${BDFDB.disCN.homebutton} RANbutton" style="height: 20px;">read all</div>
|
||||||
</div>`;
|
</div>`;
|
||||||
|
|
||||||
this.RAMbuttonMarkup =
|
this.RAMbuttonMarkup =
|
||||||
|
@ -52,6 +54,19 @@ class ReadAllNotificationsButton {
|
||||||
<div class="${BDFDB.disCN.buttoncontents}">Clear Mentions</div>
|
<div class="${BDFDB.disCN.buttoncontents}">Clear Mentions</div>
|
||||||
</button>`;
|
</button>`;
|
||||||
|
|
||||||
|
this.css = `
|
||||||
|
.RANbutton-frame {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.RANbutton {
|
||||||
|
cursor: pointer;
|
||||||
|
border-radius: 4px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.3;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
this.defaults = {
|
this.defaults = {
|
||||||
settings: {
|
settings: {
|
||||||
addClearButton: {value:true, inner:false, description:"Adds a 'Clear Mentions' button to the recent mentions popout"},
|
addClearButton: {value:true, inner:false, description:"Adds a 'Clear Mentions' button to the recent mentions popout"},
|
||||||
|
@ -143,6 +158,7 @@ class ReadAllNotificationsButton {
|
||||||
let guildseparator = wrapper.querySelector(BDFDB.dotCN.guildseparator);
|
let guildseparator = wrapper.querySelector(BDFDB.dotCN.guildseparator);
|
||||||
if (guildseparator) {
|
if (guildseparator) {
|
||||||
let ranbutton = BDFDB.htmlToElement(this.RANbuttonMarkup);
|
let ranbutton = BDFDB.htmlToElement(this.RANbuttonMarkup);
|
||||||
|
guildseparator = BDFDB.containsClass(guildseparator.parentElement, BDFDB.disCN.guildouter) ? guildseparator.parentElement : guildseparator;
|
||||||
guildseparator.parentElement.insertBefore(ranbutton, guildseparator);
|
guildseparator.parentElement.insertBefore(ranbutton, guildseparator);
|
||||||
ranbutton.addEventListener("click", () => {
|
ranbutton.addEventListener("click", () => {
|
||||||
let settings = BDFDB.getAllData(this, "settings");
|
let settings = BDFDB.getAllData(this, "settings");
|
||||||
|
|
Loading…
Reference in New Issue