stuff
This commit is contained in:
parent
c8739a851e
commit
baeed582fd
|
@ -3,13 +3,17 @@
|
||||||
class CompleteTimestamps {
|
class CompleteTimestamps {
|
||||||
getName () {return "CompleteTimestamps";}
|
getName () {return "CompleteTimestamps";}
|
||||||
|
|
||||||
getVersion () {return "1.2.9";}
|
getVersion () {return "1.3.0";}
|
||||||
|
|
||||||
getAuthor () {return "DevilBro";}
|
getAuthor () {return "DevilBro";}
|
||||||
|
|
||||||
getDescription () {return "Replace all timestamps with complete timestamps.";}
|
getDescription () {return "Replace all timestamps with complete timestamps.";}
|
||||||
|
|
||||||
initConstructor () {
|
initConstructor () {
|
||||||
|
this.changelog = {
|
||||||
|
"fixed":[["Chat Timestamps","The plugin now properly checking the option whether chat timestamps should be changed or not"]]
|
||||||
|
};
|
||||||
|
|
||||||
this.patchModules = {
|
this.patchModules = {
|
||||||
"MessageGroup":["componentDidMount","componentDidUpdate"],
|
"MessageGroup":["componentDidMount","componentDidUpdate"],
|
||||||
"StandardSidebarView":"componentWillUnmount"
|
"StandardSidebarView":"componentWillUnmount"
|
||||||
|
@ -53,7 +57,7 @@ class CompleteTimestamps {
|
||||||
settingshtml += `<div class="${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style="flex: 1 1 auto;"><h3 class="${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCN.flexchild}" style="flex: 0 0 30%;">${this.defaults.formats[key].description}</h3><div class="${BDFDB.disCNS.inputwrapper + BDFDB.disCNS.vertical + BDFDB.disCNS.flex + BDFDB.disCN.directioncolumn}" style="flex: 1 1 auto;"><input type="text" option="${key}" value="${formats[key]}" placeholder="${this.defaults.formats[key].value}" class="${BDFDB.disCNS.inputdefault + BDFDB.disCNS.input + BDFDB.disCN.size16}"></div></div>`;
|
settingshtml += `<div class="${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.marginbottom8}" style="flex: 1 1 auto;"><h3 class="${BDFDB.disCNS.titledefault + BDFDB.disCNS.title + BDFDB.disCNS.weightmedium + BDFDB.disCNS.size16 + BDFDB.disCN.flexchild}" style="flex: 0 0 30%;">${this.defaults.formats[key].description}</h3><div class="${BDFDB.disCNS.inputwrapper + BDFDB.disCNS.vertical + BDFDB.disCNS.flex + BDFDB.disCN.directioncolumn}" style="flex: 1 1 auto;"><input type="text" option="${key}" value="${formats[key]}" placeholder="${this.defaults.formats[key].value}" class="${BDFDB.disCNS.inputdefault + BDFDB.disCNS.input + BDFDB.disCN.size16}"></div></div>`;
|
||||||
}
|
}
|
||||||
let infoHidden = BDFDB.loadData("hideInfo", this, "hideInfo");
|
let infoHidden = BDFDB.loadData("hideInfo", this, "hideInfo");
|
||||||
settingshtml += `<div class="${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCNS.cursorpointer + (infoHidden ? BDFDB.disCN.categorywrappercollapsed : BDFDB.disCN.categorywrapperdefault)} toggle-info" style="flex: 1 1 auto;"><svg class="${BDFDB.disCNS.categoryicontransition + BDFDB.disCNS.directionright + (infoHidden ? BDFDB.disCN.categoryiconcollapsed : BDFDB.disCN.categoryicondefault)}" width="12" height="12" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M7 10L12 15 17 10"></path></svg><div class="${BDFDB.disCNS.categorycolortransition + BDFDB.disCNS.overflowellipsis + BDFDB.disCN.categorynamecollapsed}" style="flex: 1 1 auto;">Information</div></div>`;
|
settingshtml += `<div class="${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCNS.cursorpointer + (infoHidden ? BDFDB.disCN.categorywrappercollapsed : BDFDB.disCN.categorywrapperdefault)} toggle-info" style="flex: 1 1 auto;"><svg class="${BDFDB.disCNS.categoryicontransition + BDFDB.disCNS.directionright + (infoHidden ? BDFDB.disCN.categoryiconcollapsed : BDFDB.disCN.categoryicondefault)}" width="12" height="12" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M7 10L12 15 17 10"></path></svg><div class="${BDFDB.disCNS.categorycolortransition + BDFDB.disCNS.categoryoverflowellipsis + BDFDB.disCN.categorynamecollapsed}" style="flex: 1 1 auto;">Information</div></div>`;
|
||||||
settingshtml += `<div class="DevilBro-settings-inner-list info-container" ${infoHidden ? "style='display:none;'" : ""}>`;
|
settingshtml += `<div class="DevilBro-settings-inner-list info-container" ${infoHidden ? "style='display:none;'" : ""}>`;
|
||||||
settingshtml += `<div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$hour will be replaced with the current hour</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$minute will be replaced with the current minutes</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$second will be replaced with the current seconds</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$msecond will be replaced with the current milliseconds</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$timemode will change $hour to a 12h format and will be replaced with AM/PM</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$year will be replaced with the current year</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$month will be replaced with the current month</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$day will be replaced with the current day</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$monthnameL will be replaced with the monthname in long format based on the Discord Language</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$monthnameS will be replaced with the monthname in short format based on the Discord Language</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$weekdayL will be replaced with the weekday in long format based on the Discord Language</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$weekdayS will be replaced with the weekday in short format based on the Discord Language</div>`;
|
settingshtml += `<div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$hour will be replaced with the current hour</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$minute will be replaced with the current minutes</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$second will be replaced with the current seconds</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$msecond will be replaced with the current milliseconds</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$timemode will change $hour to a 12h format and will be replaced with AM/PM</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$year will be replaced with the current year</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$month will be replaced with the current month</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$day will be replaced with the current day</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$monthnameL will be replaced with the monthname in long format based on the Discord Language</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$monthnameS will be replaced with the monthname in short format based on the Discord Language</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$weekdayL will be replaced with the weekday in long format based on the Discord Language</div><div class="${BDFDB.disCNS.description + BDFDB.disCNS.formtext + BDFDB.disCNS.note + BDFDB.disCNS.modedefault + BDFDB.disCN.primary}">$weekdayS will be replaced with the weekday in short format based on the Discord Language</div>`;
|
||||||
settingshtml += `</div></div>`;
|
settingshtml += `</div></div>`;
|
||||||
|
@ -112,15 +116,11 @@ class CompleteTimestamps {
|
||||||
let time = marker.getAttribute("datetime");
|
let time = marker.getAttribute("datetime");
|
||||||
if (!time) return;
|
if (!time) return;
|
||||||
let choice = BDFDB.getData("creationDateLang", this, "choices");
|
let choice = BDFDB.getData("creationDateLang", this, "choices");
|
||||||
let customTooltipCSS = `
|
BDFDB.createTooltip(this.getTimestamp(this.languages[choice].id, time), marker, {type:"top",selector:"completetimestampedit-tooltip",css:`body ${BDFDB.dotCN.tooltip}:not(.completetimestampedit-tooltip) {display: none !important;}`});
|
||||||
body ${BDFDB.dotCN.tooltip}:not(.completetimestampedit-tooltip) {
|
|
||||||
display: none !important;
|
|
||||||
}`;
|
|
||||||
BDFDB.createTooltip(this.getTimestamp(this.languages[choice].id, time), marker, {type:"top",selector:"completetimestampedit-tooltip",css:customTooltipCSS});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
BDFDB.WebModules.forceAllUpdates();
|
BDFDB.WebModules.forceAllUpdates(this);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.error(`%c[${this.name}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
|
console.error(`%c[${this.name}]%c`, 'color: #3a71c1; font-weight: 700;', '', 'Fatal Error: Could not load BD functions!');
|
||||||
|
@ -215,7 +215,7 @@ class CompleteTimestamps {
|
||||||
}
|
}
|
||||||
|
|
||||||
processMessageGroup (instance, wrapper) {
|
processMessageGroup (instance, wrapper) {
|
||||||
for (let stamp of wrapper.querySelectorAll("time[datetime]")) this.changeTimestamp(stamp);
|
if (BDFDB.getData("showInChat", this, "settings")) for (let stamp of wrapper.querySelectorAll("time[datetime]")) this.changeTimestamp(stamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
processStandardSidebarView (instance, wrapper) {
|
processStandardSidebarView (instance, wrapper) {
|
||||||
|
|
|
@ -416,7 +416,9 @@ class PersonalPins {
|
||||||
let timestamp = message.querySelector(BDFDB.dotCN.messagetimestampcozy);
|
let timestamp = message.querySelector(BDFDB.dotCN.messagetimestampcozy);
|
||||||
timestamp.innerText = date.toLocaleString(BDFDB.getDiscordLanguage().id);
|
timestamp.innerText = date.toLocaleString(BDFDB.getDiscordLanguage().id);
|
||||||
timestamp.setAttribute("datetime", date);
|
timestamp.setAttribute("datetime", date);
|
||||||
if (BDFDB.isPluginEnabled("CompleteTimestamps")) bdplugins.CompleteTimestamps.plugin.changeTimestamp(timestamp);
|
if (BDFDB.isPluginEnabled("CompleteTimestamps") && BDFDB.loadData("showInChat", "CompleteTimestamps", "settings")) {
|
||||||
|
bdplugins.CompleteTimestamps.plugin.changeTimestamp(timestamp);
|
||||||
|
}
|
||||||
message.querySelector(BDFDB.dotCN.messagemarkup).innerHTML = noteData.markup.replace(`<span class="edited">`,`<span class="${BDFDB.disCN.messageedited}">`);
|
message.querySelector(BDFDB.dotCN.messagemarkup).innerHTML = noteData.markup.replace(`<span class="edited">`,`<span class="${BDFDB.disCN.messageedited}">`);
|
||||||
message.querySelector(BDFDB.dotCN.messageaccessory).innerHTML = noteData.accessory;
|
message.querySelector(BDFDB.dotCN.messageaccessory).innerHTML = noteData.accessory;
|
||||||
if (noteData.accessory) {
|
if (noteData.accessory) {
|
||||||
|
|
|
@ -76,7 +76,7 @@ module.exports = (Plugin, Api, Vendor) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
BDFDB.WebModules.forceAllUpdates();
|
BDFDB.WebModules.forceAllUpdates(this);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -178,7 +178,7 @@ module.exports = (Plugin, Api, Vendor) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
processMessageGroup (instance, wrapper) {
|
processMessageGroup (instance, wrapper) {
|
||||||
for (let stamp of wrapper.querySelectorAll("time[datetime]")) this.changeTimestamp(stamp);
|
if (BDFDB.getData("showInChat", this, "settings")) for (let stamp of wrapper.querySelectorAll("time[datetime]")) this.changeTimestamp(stamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
changeTimestamp (stamp) {
|
changeTimestamp (stamp) {
|
||||||
|
|
|
@ -800,7 +800,7 @@ module.exports = (Plugin, Api, Vendor) => {
|
||||||
let data = this.getUserData(info.id, mention);
|
let data = this.getUserData(info.id, mention);
|
||||||
let member = this.MemberUtils.getMember(this.LastGuildStore.getGuildId(), info.id) || {};
|
let member = this.MemberUtils.getMember(this.LastGuildStore.getGuildId(), info.id) || {};
|
||||||
let color1 = BDFDB.colorCONVERT(data.color1 || (BDFDB.isPluginEnabled("BetterRoleColors") ? member.colorString : null), "RGBCOMP");
|
let color1 = BDFDB.colorCONVERT(data.color1 || (BDFDB.isPluginEnabled("BetterRoleColors") ? member.colorString : null), "RGBCOMP");
|
||||||
let name = data.name ? data.name : (BDFDB.isPluginEnabled("RemoveNicknames") ? bdplugins.RemoveNicknames.plugin.getNewName(info) : member.nick || info.username);
|
let name = data.name ? data.name : (BDFDB.isPluginEnabled("RemoveNicknames") ? BDFDB.Plugins["removenicknames"].getNewName(info) : member.nick || info.username);
|
||||||
BDFDB.setInnerText(mention, "@" + name);
|
BDFDB.setInnerText(mention, "@" + name);
|
||||||
if (mention.EditUsersHovered) colorHover();
|
if (mention.EditUsersHovered) colorHover();
|
||||||
else colorDefault();
|
else colorDefault();
|
||||||
|
|
|
@ -475,7 +475,7 @@ module.exports = (Plugin, Api, Vendor) => {
|
||||||
this.translateMessage(instance.props.message, instance.props.target, instance.props.channel);
|
this.translateMessage(instance.props.message, instance.props.target, instance.props.channel);
|
||||||
});
|
});
|
||||||
if (BDFDB.isPluginEnabled("MessageUtilities")) {
|
if (BDFDB.isPluginEnabled("MessageUtilities")) {
|
||||||
BDFDB.setContextHint(translateitem, bdplugins.MessageUtilities.plugin.getActiveShortcutString("__Translate_Message"));
|
BDFDB.setContextHint(translateitem, BDFDB.Plugins["messageutilities"].getActiveShortcutString("__Translate_Message"));
|
||||||
}
|
}
|
||||||
let text = document.getSelection().toString();
|
let text = document.getSelection().toString();
|
||||||
if (text) {
|
if (text) {
|
||||||
|
|
|
@ -237,7 +237,7 @@ module.exports = (Plugin, Api, Vendor) => {
|
||||||
this.addMessageToNotes(instance.props.message, instance.props.target, instance.props.channel);
|
this.addMessageToNotes(instance.props.message, instance.props.target, instance.props.channel);
|
||||||
});
|
});
|
||||||
if (BDFDB.isPluginEnabled("MessageUtilities")) {
|
if (BDFDB.isPluginEnabled("MessageUtilities")) {
|
||||||
BDFDB.setContextHint(pinitem, bdplugins.MessageUtilities.plugin.getActiveShortcutString("__Note_Message"));
|
BDFDB.setContextHint(pinitem, BDFDB.Plugins["messageutilities"].getActiveShortcutString("__Note_Message"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -372,12 +372,12 @@ module.exports = (Plugin, Api, Vendor) => {
|
||||||
let channelname = messagedivider.querySelector(BDFDB.dotCN.messagespopoutchannelname);
|
let channelname = messagedivider.querySelector(BDFDB.dotCN.messagespopoutchannelname);
|
||||||
channelname.innerText = (noteData.guild_id == "@me" ? " @" : " #") + (channel.name || noteData.channel_name);
|
channelname.innerText = (noteData.guild_id == "@me" ? " @" : " #") + (channel.name || noteData.channel_name);
|
||||||
if (noteData.guild_id != "@me" && BDFDB.isPluginEnabled("EditChannels")) {
|
if (noteData.guild_id != "@me" && BDFDB.isPluginEnabled("EditChannels")) {
|
||||||
bdplugins.EditChannels.plugin.changeChannel2({id:noteData.channel_id,name:noteData.channel_name}, channelname);
|
BDFDB.Plugins["editchannels"].changeChannel2({id:noteData.channel_id,name:noteData.channel_name}, channelname);
|
||||||
}
|
}
|
||||||
else if (noteData.guild_id == "@me" && BDFDB.isPluginEnabled("EditUsers")) {
|
else if (noteData.guild_id == "@me" && BDFDB.isPluginEnabled("EditUsers")) {
|
||||||
let dmuser_id = channel && channel.type == 1 ? channel.recipients[0] : noteData.dmuser_id;
|
let dmuser_id = channel && channel.type == 1 ? channel.recipients[0] : noteData.dmuser_id;
|
||||||
if (dmuser_id) {
|
if (dmuser_id) {
|
||||||
bdplugins.EditUsers.plugin.changeName2({id:dmuser_id,username:noteData.channel_name}, channelname);
|
BDFDB.Plugins["editusers"].changeName2({id:dmuser_id,username:noteData.channel_name}, channelname);
|
||||||
if (channelname.innerText.indexOf("@") != 0) channelname.innerText = "@" + channelname.innerText;
|
if (channelname.innerText.indexOf("@") != 0) channelname.innerText = "@" + channelname.innerText;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -389,14 +389,16 @@ module.exports = (Plugin, Api, Vendor) => {
|
||||||
username.innerText = user.username || noteData.author_name;
|
username.innerText = user.username || noteData.author_name;
|
||||||
username.style.setProperty("color", member.colorString || noteData.color);
|
username.style.setProperty("color", member.colorString || noteData.color);
|
||||||
if (BDFDB.isPluginEnabled("EditUsers")) {
|
if (BDFDB.isPluginEnabled("EditUsers")) {
|
||||||
bdplugins.EditUsers.plugin.changeName({id:noteData.author_id,username:noteData.author_name}, username, noteData.guild_id);
|
BDFDB.Plugins["editusers"].changeName({id:noteData.author_id,username:noteData.author_name}, username, noteData.guild_id);
|
||||||
if (user.id) bdplugins.EditUsers.plugin.changeAvatar({id:noteData.author_id,username:noteData.author_name}, avatar);
|
if (user.id) BDFDB.Plugins["editusers"].changeAvatar({id:noteData.author_id,username:noteData.author_name}, avatar);
|
||||||
bdplugins.EditUsers.plugin.addTag({id:noteData.author_id,username:noteData.author_name}, username.parentElement, " " + BDFDB.disCN.bottagnametag);
|
BDFDB.Plugins["editusers"].addTag({id:noteData.author_id,username:noteData.author_name}, username.parentElement, " " + BDFDB.disCN.bottagnametag);
|
||||||
}
|
}
|
||||||
let timestamp = message.querySelector(BDFDB.dotCN.messagetimestampcozy);
|
let timestamp = message.querySelector(BDFDB.dotCN.messagetimestampcozy);
|
||||||
timestamp.innerText = date.toLocaleString(BDFDB.getDiscordLanguage().id);
|
timestamp.innerText = date.toLocaleString(BDFDB.getDiscordLanguage().id);
|
||||||
timestamp.setAttribute("datetime", date);
|
timestamp.setAttribute("datetime", date);
|
||||||
if (BDFDB.isPluginEnabled("CompleteTimestamps")) bdplugins.CompleteTimestamps.plugin.changeTimestamp(timestamp);
|
if (BDFDB.isPluginEnabled("CompleteTimestamps") && BDFDB.loadData("showInChat", "CompleteTimestamps", "settings")) {
|
||||||
|
BDFDB.Plugins["completetimestamps"].changeTimestamp(timestamp);
|
||||||
|
}
|
||||||
message.querySelector(BDFDB.dotCN.messagemarkup).innerHTML = noteData.markup.replace(`<span class="edited">`,`<span class="${BDFDB.disCN.messageedited}">`);
|
message.querySelector(BDFDB.dotCN.messagemarkup).innerHTML = noteData.markup.replace(`<span class="edited">`,`<span class="${BDFDB.disCN.messageedited}">`);
|
||||||
message.querySelector(BDFDB.dotCN.messageaccessory).innerHTML = noteData.accessory;
|
message.querySelector(BDFDB.dotCN.messageaccessory).innerHTML = noteData.accessory;
|
||||||
if (noteData.accessory) {
|
if (noteData.accessory) {
|
||||||
|
|
|
@ -427,12 +427,12 @@ module.exports = (Plugin, Api, Vendor) => {
|
||||||
dmname = dmname + this.UserUtils.getUser(dmuser_id).username;
|
dmname = dmname + this.UserUtils.getUser(dmuser_id).username;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let EditUsersData = user && BDFDB.isPluginEnabled("EditUsers") ? bdplugins.EditUsers.plugin.getUserData(user.id, dmdiv) : {};
|
let EditUsersData = user && BDFDB.isPluginEnabled("EditUsers") ? BDFDB.Plugins["editusers"].getUserData(user.id, dmdiv) : {};
|
||||||
if (!EditUsersData.removeIcon) avatar.style.setProperty("background-image", `url(${EditUsersData.url || BDFDB.getChannelIcon(id)})`);
|
if (!EditUsersData.removeIcon) avatar.style.setProperty("background-image", `url(${EditUsersData.url || BDFDB.getChannelIcon(id)})`);
|
||||||
avatar.setAttribute("channel", dmname);
|
avatar.setAttribute("channel", dmname);
|
||||||
if (user) avatar.setAttribute("user", user.username);
|
if (user) avatar.setAttribute("user", user.username);
|
||||||
dmdiv.addEventListener("mouseenter", () => {
|
dmdiv.addEventListener("mouseenter", () => {
|
||||||
let FreshEditUsersData = user && BDFDB.isPluginEnabled("EditUsers") ? bdplugins.EditUsers.plugin.getUserData(user.id, dmdiv) : {};
|
let FreshEditUsersData = user && BDFDB.isPluginEnabled("EditUsers") ? BDFDB.Plugins["editusers"].getUserData(user.id, dmdiv) : {};
|
||||||
BDFDB.createTooltip(FreshEditUsersData.name || dmname, dmdiv, {selector:(BDFDB.isObjectEmpty(FreshEditUsersData) ? "" : "EditUsers-tooltip"),type:"right"});
|
BDFDB.createTooltip(FreshEditUsersData.name || dmname, dmdiv, {selector:(BDFDB.isObjectEmpty(FreshEditUsersData) ? "" : "EditUsers-tooltip"),type:"right"});
|
||||||
});
|
});
|
||||||
dmdiv.addEventListener("click", () => {
|
dmdiv.addEventListener("click", () => {
|
||||||
|
|
Loading…
Reference in New Issue