This commit is contained in:
Mirco Wittrien 2019-04-24 08:08:33 +02:00
parent 4a79690a57
commit 943d455fd1
4 changed files with 11 additions and 57 deletions

View File

@ -48,54 +48,28 @@ class OldTitleBar {
this.dividerMarkup = `<div class="buttonOTB dividerOTB ${BDFDB.disCN.channelheaderdivider}"></div>`; this.dividerMarkup = `<div class="buttonOTB dividerOTB ${BDFDB.disCN.channelheaderdivider}"></div>`;
this.reloadButtonMarkup = this.reloadButtonMarkup =
BDFDB.DiscordClassModules.HeaderBar.iconMargin ? `<span class="${BDFDB.disCN.channelheadericonmargin} buttonOTB reloadButtonOTB"> `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} buttonOTB reloadButtonOTB">
<svg class="${BDFDB.disCNS.channelheadericoninactive + BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg">
<g fill="none" class="${BDFDB.disCN.channelheadericonforeground}" fill-rule="evenodd">
<path fill="currentColor" transform="translate(4,4)" d="M17.061,7.467V0l-2.507,2.507C13.013,0.96,10.885,0,8.528,0C3.813,0,0.005,3.819,0.005,8.533s3.808,8.533,8.523,8.533c3.973,0,7.301-2.72,8.245-6.4h-2.219c-0.88,2.485-3.237,4.267-6.027,4.267c-3.536,0-6.4-2.864-6.4-6.4s2.864-6.4,6.4-6.4c1.765,0,3.349,0.736,4.507,1.893l-3.44,3.44H17.061z"/>
</g>
</svg>
</span>`
: `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} buttonOTB reloadButtonOTB">
<svg class="${BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg"> <svg class="${BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg">
<path fill="currentColor" stroke="none" transform="translate(4,4)" d="M17.061,7.467V0l-2.507,2.507C13.013,0.96,10.885,0,8.528,0C3.813,0,0.005,3.819,0.005,8.533s3.808,8.533,8.523,8.533c3.973,0,7.301-2.72,8.245-6.4h-2.219c-0.88,2.485-3.237,4.267-6.027,4.267c-3.536,0-6.4-2.864-6.4-6.4s2.864-6.4,6.4-6.4c1.765,0,3.349,0.736,4.507,1.893l-3.44,3.44H17.061z"/> <path fill="currentColor" stroke="none" transform="translate(4,4)" d="M17.061,7.467V0l-2.507,2.507C13.013,0.96,10.885,0,8.528,0C3.813,0,0.005,3.819,0.005,8.533s3.808,8.533,8.523,8.533c3.973,0,7.301-2.72,8.245-6.4h-2.219c-0.88,2.485-3.237,4.267-6.027,4.267c-3.536,0-6.4-2.864-6.4-6.4s2.864-6.4,6.4-6.4c1.765,0,3.349,0.736,4.507,1.893l-3.44,3.44H17.061z"/>
</svg> </svg>
</div>`; </div>`;
this.minButtonMarkup = this.minButtonMarkup =
BDFDB.DiscordClassModules.HeaderBar.iconMargin ? `<span class="${BDFDB.disCN.channelheadericonmargin} buttonOTB minButtonOTB"> `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} buttonOTB minButtonOTB">
<svg class="${BDFDB.disCNS.channelheadericoninactive + BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26">
<g fill="none" class="${BDFDB.disCN.channelheadericonforeground}" fill-rule="evenodd">
<path stroke-width="2" stroke="currentColor" fill="none" d="M6 18 l13 0"/>
</g>
</svg>
</span>`
: `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} buttonOTB minButtonOTB">
<svg class="${BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26"> <svg class="${BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26">
<path stroke-width="2" stroke="currentColor" fill="none" d="M6 18 l13 0"/> <path stroke-width="2" stroke="currentColor" fill="none" d="M6 18 l13 0"/>
</svg> </svg>
</div>`; </div>`;
this.maxButtonMarkup = this.maxButtonMarkup =
BDFDB.DiscordClassModules.HeaderBar.iconMargin ? `<span class="${BDFDB.disCN.channelheadericonmargin} buttonOTB maxButtonOTB"> `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} buttonOTB maxButtonOTB">
<svg class="${BDFDB.disCNS.channelheadericoninactive + BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26">
<g fill="none" class="${BDFDB.disCN.channelheadericonforeground}" fill-rule="evenodd"></g>
</svg>
</span>`
: `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} buttonOTB maxButtonOTB">
<svg class="${BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26"><g></g></svg> <svg class="${BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26"><g></g></svg>
</div>`; </div>`;
this.maxButtonInnerMin = `<path stroke-width="2" stroke="currentColor" fill="none" d="M6 6 l13 0 l0 13 l-13 0 l0 -13"/>`; this.maxButtonInnerMin = `<path stroke-width="2" stroke="currentColor" fill="none" d="M6 6 l13 0 l0 13 l-13 0 l0 -13"/>`;
this.maxButtonInnerMax = `<path stroke-width="2" stroke="currentColor" fill="none" d="M6 9 l10 0 l0 10 l-10 0 l0 -10 m3 -3 l10 0 l0 10"/>`; this.maxButtonInnerMax = `<path stroke-width="2" stroke="currentColor" fill="none" d="M6 9 l10 0 l0 10 l-10 0 l0 -10 m3 -3 l10 0 l0 10"/>`;
this.closeButtonMarkup = this.closeButtonMarkup =
BDFDB.DiscordClassModules.HeaderBar.iconMargin ? `<span class="${BDFDB.disCN.channelheadericonmargin} buttonOTB closeButtonOTB"> `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} buttonOTB closeButtonOTB">
<svg class="${BDFDB.disCNS.channelheadericoninactive + BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26">
<g fill="none" class="${BDFDB.disCN.channelheadericonforeground}" fill-rule="evenodd">
<path stroke-width="2" stroke="currentColor" d="M6 6 l13 13 m0 -13 l-13 13"/>
</g>
</svg>
</span>`
: `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} buttonOTB closeButtonOTB">
<svg class="${BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26"> <svg class="${BDFDB.disCN.channelheadericon}" xmlns="http://www.w3.org/2000/svg" width="26" height="26">
<path stroke-width="2" stroke="currentColor" fill="none" d="M6 6 l13 13 m0 -13 l-13 13"/> <path stroke-width="2" stroke="currentColor" fill="none" d="M6 6 l13 13 m0 -13 l-13 13"/>
</svg> </svg>
@ -228,7 +202,7 @@ class OldTitleBar {
if (BDFDB.getData("addOldBar", this, "settings")) { if (BDFDB.getData("addOldBar", this, "settings")) {
var headerbar = BDFDB.htmlToElement(`<span class="headerbarOTB ${BDFDB.disCNS.flex + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCN.nowrap}"></span>`); var headerbar = BDFDB.htmlToElement(`<span class="headerbarOTB ${BDFDB.disCNS.flex + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCN.nowrap}"></span>`);
this.createButtons(headerbar); this.createButtons(headerbar);
let headerbaricon = BDFDB.DiscordClassModules.HeaderBar.toolbar ? document.querySelector(BDFDB.dotCN.channelheadertoolbar + " > " + BDFDB.dotCN.channelheadericonwrapper) : document.querySelector(BDFDB.dotCN.channelheadertoolbar2 + " > " + BDFDB.dotCN.channelheadericonmargin); let headerbaricon = document.querySelector(BDFDB.dotCN.channelheadertoolbar + " > " + BDFDB.dotCN.channelheadericonwrapper);
if (headerbaricon) headerbaricon.parentElement.appendChild(headerbar); if (headerbaricon) headerbaricon.parentElement.appendChild(headerbar);
this.changeMaximizeButtons(); this.changeMaximizeButtons();
} }

View File

@ -24,18 +24,7 @@ class PersonalPins {
}; };
this.notesButtonMarkup = this.notesButtonMarkup =
BDFDB.DiscordClassModules.HeaderBar.iconMargin ? `<span class="${BDFDB.disCN.channelheadericonmargin} notes-button"> `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} notes-button">
<svg class="${BDFDB.disCNS.channelheadericoninactive + BDFDB.disCN.channelheadericon}" name="Note" width="16" height="16" viewBox="0 0 26 26">
<g fill="currentColor" fill-rule="evenodd" transform="translate(3,2)">
<path class="${BDFDB.disCN.channelheadericonforeground}" d="M 4.618, 0 c -0.316, 0 -0.573, 0.256 -0.573, 0.573 v 1.145 c 0, 0.316, 0.256, 0.573, 0.573, 0.573 s 0.573 -0.256, 0.573 -0.573 V 0.573 C 5.191, 0.256, 4.935, 0, 4.618, 0 z"/>
<path class="${BDFDB.disCN.channelheadericonforeground}" d="M 8.053, 0 c -0.316, 0 -0.573, 0.256 -0.573, 0.573 v 1.145 c 0, 0.316, 0.256, 0.573, 0.573, 0.573 s 0.573 -0.256, 0.573 -0.573 V 0.573 C 8.626, 0.256, 8.37, 0, 8.053, 0 z"/>
<path class="${BDFDB.disCN.channelheadericonforeground}" d="M 11.489, 0 c -0.316, 0 -0.573, 0.256 -0.573, 0.573 v 1.145 c 0, 0.316, 0.256, 0.573, 0.573, 0.573 c 0.316, 0, 0.573 -0.256, 0.573 -0.573 V 0.573 C 12.061, 0.256, 11.805, 0, 11.489, 0 z "/>
<path class="${BDFDB.disCN.channelheadericonforeground}" d="M 14.924, 0 c -0.316, 0 -0.573, 0.256 -0.573, 0.573 v 1.145 c 0, 0.316, 0.256, 0.573, 0.573, 0.573 c 0.316, 0, 0.573 -0.256, 0.573 -0.573 V 0.573 C 15.496, 0.256, 15.24, 0, 14.924, 0 z"/>
<path class="${BDFDB.disCN.channelheadericonforeground}" d="M 16.641, 1.25 V 1.718 c 0, 0.947 -0.77, 1.718 -1.718, 1.718 c -0.947, 0 -1.718 -0.77 -1.718 -1.718 c 0, 0.947 -0.77, 1.718 -1.718, 1.718 c -0.947, 0 -1.718 -0.77 -1.718 -1.718 c 0, 0.947 -0.77, 1.718 -1.718, 1.718 c -0.947, 0 -1.718 -0.77 -1.718 -1.718 c 0, 0.947 -0.77, 1.718 -1.718, 1.718 c -0.947, 0 -1.718 -0.77 -1.718 -1.718 V 1.25 C 2.236, 1.488, 1.756, 2.117, 1.756, 2.863 v 14.962 c 0, 0.947, 0.77, 1.718, 1.718, 1.718 h 12.595 c 0.947, 0, 1.718 -0.77, 1.718 -1.718 V 2.863 C 17.786, 2.117, 17.306, 1.488, 16.641, 1.25 z M 14.924, 16.679 H 4.618 c -0.316, 0 -0.573 -0.256 -0.573 -0.573 c 0 -0.316, 0.256 -0.573, 0.573 -0.573 h 10.305 c 0.316, 0, 0.573, 0.256, 0.573, 0.573 C 15.496, 16.423, 15.24, 16.679, 14.924, 16.679 z M 14.924, 13.244 H 4.618 c -0.316, 0 -0.573 -0.256 -0.573 -0.573 c 0 -0.316, 0.256 -0.573, 0.573 -0.573 h 10.305 c 0.316, 0, 0.573, 0.256, 0.573, 0.573 C 15.496, 12.988, 15.24, 13.244, 14.924, 13.244 z M 14.924, 9.733 H 4.618 c -0.316, 0 -0.573 -0.256 -0.573 -0.573 s 0.256 -0.573, 0.573 -0.573 h 10.305 c 0.316, 0, 0.573, 0.256, 0.573, 0.573 S 15.24, 9.733, 14.924, 9.733 z M 14.924, 6.298 H 4.618 c -0.316, 0 -0.573 -0.256 -0.573 -0.573 s 0.256 -0.573, 0.573 -0.573 h 10.305 c 0.316, 0, 0.573, 0.256, 0.573, 0.573 S 15.24, 6.298, 14.924, 6.298 z"/>
</g>
</svg>
</span>`
: `<div class="${BDFDB.disCNS.channelheadericonwrapper + BDFDB.disCN.channelheadericonclickable} notes-button">
<svg class="${BDFDB.disCN.channelheadericon}" name="Note" width="24" height="24" viewBox="-1 -1 23 23"> <svg class="${BDFDB.disCN.channelheadericon}" name="Note" width="24" height="24" viewBox="-1 -1 23 23">
<path fill="currentColor" d="M 4.618, 0 c -0.316, 0 -0.573, 0.256 -0.573, 0.573 v 1.145 c 0, 0.316, 0.256, 0.573, 0.573, 0.573 s 0.573 -0.256, 0.573 -0.573 V 0.573 C 5.191, 0.256, 4.935, 0, 4.618, 0 z"/> <path fill="currentColor" d="M 4.618, 0 c -0.316, 0 -0.573, 0.256 -0.573, 0.573 v 1.145 c 0, 0.316, 0.256, 0.573, 0.573, 0.573 s 0.573 -0.256, 0.573 -0.573 V 0.573 C 5.191, 0.256, 4.935, 0, 4.618, 0 z"/>
<path fill="currentColor" d="M 8.053, 0 c -0.316, 0 -0.573, 0.256 -0.573, 0.573 v 1.145 c 0, 0.316, 0.256, 0.573, 0.573, 0.573 s 0.573 -0.256, 0.573 -0.573 V 0.573 C 8.626, 0.256, 8.37, 0, 8.053, 0 z"/> <path fill="currentColor" d="M 8.053, 0 c -0.316, 0 -0.573, 0.256 -0.573, 0.573 v 1.145 c 0, 0.316, 0.256, 0.573, 0.573, 0.573 s 0.573 -0.256, 0.573 -0.573 V 0.573 C 8.626, 0.256, 8.37, 0, 8.053, 0 z"/>

View File

@ -3,7 +3,7 @@
class ReadAllNotificationsButton { class ReadAllNotificationsButton {
getName () {return "ReadAllNotificationsButton";} getName () {return "ReadAllNotificationsButton";}
getVersion () {return "1.4.4";} getVersion () {return "1.4.5";}
getAuthor () {return "DevilBro";} getAuthor () {return "DevilBro";}
@ -11,7 +11,7 @@ class ReadAllNotificationsButton {
initConstructor () { initConstructor () {
this.changelog = { this.changelog = {
"fixed":[["Canary/PTB","Fixed the plugin for canary and ptb"]] "fixed":[["New classes","Fixed the plugin for the new class update"]]
}; };
this.patchModules = { this.patchModules = {
@ -39,13 +39,7 @@ class ReadAllNotificationsButton {
</div>`; </div>`;
this.RANbuttonMarkup = this.RANbuttonMarkup =
!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.guildouter} RANbutton-frame">
<div class="${BDFDB.disCN.guildinner}" style="height: 20px; border-radius: 4px;">
<a>
<div class="RANbutton" id="bd-pub-button" style="line-height: 20px; font-size: 12px;">read all</div>
</a>
</div>
</div>` : `<div class="${BDFDB.disCN.guildouter} RANbutton-frame">
<div class="${BDFDB.disCN.homebutton} RANbutton" style="height: 20px;">read all</div> <div class="${BDFDB.disCN.homebutton} RANbutton" style="height: 20px;">read all</div>
</div>`; </div>`;
@ -158,8 +152,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.parentElement.insertBefore(ranbutton, guildseparator.parentElement);
guildseparator.parentElement.insertBefore(ranbutton, guildseparator);
ranbutton.addEventListener("click", () => { ranbutton.addEventListener("click", () => {
let settings = BDFDB.getAllData(this, "settings"); let settings = BDFDB.getAllData(this, "settings");
if (settings.includeGuilds) BDFDB.markGuildAsRead(settings.includeMuted ? BDFDB.readServerList() : BDFDB.readUnreadServerList()); if (settings.includeGuilds) BDFDB.markGuildAsRead(settings.includeMuted ? BDFDB.readServerList() : BDFDB.readUnreadServerList());
@ -188,7 +181,7 @@ class ReadAllNotificationsButton {
processDirectMessage (instance, wrapper, methodnames) { processDirectMessage (instance, wrapper, methodnames) {
let ranbutton = document.querySelector(".RANbutton-frame"); let ranbutton = document.querySelector(".RANbutton-frame");
let guildseparator = wrapper.parentElement.parentElement.querySelector(BDFDB.dotCN.guildseparator); let guildseparator = wrapper.parentElement.parentElement.querySelector(BDFDB.dotCN.guildseparator);
if (ranbutton && guildseparator) guildseparator.parentElement.insertBefore(ranbutton, guildseparator); if (ranbutton && guildseparator) guildseparator.parentElement.parentElement.insertBefore(ranbutton, guildseparator.parentElement);
} }
processRecentMentions (instance, wrapper) { processRecentMentions (instance, wrapper) {

View File

@ -97,8 +97,6 @@ https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Themes/Bl
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Themes/FullThemeDark/FullThemeDark.theme.css https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Themes/FullThemeDark/FullThemeDark.theme.css
https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Themes/ServerColumns/ServerColumns.theme.css https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Themes/ServerColumns/ServerColumns.theme.css
https://raw.githubusercontent.com/Mylan719/Discord-light-theme/master/Discord Light-Blue.theme.css https://raw.githubusercontent.com/Mylan719/Discord-light-theme/master/Discord Light-Blue.theme.css
https://raw.githubusercontent.com/Narugokyu/modern-n-cozy/master/modern-n-cozy.theme.css
https://raw.githubusercontent.com/Narugokyu/nova-theme/master/space_nova.theme.css
https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Avatars.theme.css https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Avatars.theme.css
https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Font.theme.css https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Font.theme.css
https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Make_Names_Clean.theme.css https://raw.githubusercontent.com/NFLD99/Better-Discord/master/Mini_Themes/Make_Names_Clean.theme.css