Update CompleteTimestamps.plugin.js
This commit is contained in:
parent
6e219847e2
commit
aa2f2b9aa7
|
@ -7,7 +7,7 @@ var CompleteTimestamps = (_ => {
|
||||||
return class CompleteTimestamps {
|
return class CompleteTimestamps {
|
||||||
getName () {return "CompleteTimestamps";}
|
getName () {return "CompleteTimestamps";}
|
||||||
|
|
||||||
getVersion () {return "1.4.7";}
|
getVersion () {return "1.4.8";}
|
||||||
|
|
||||||
getAuthor () {return "DevilBro";}
|
getAuthor () {return "DevilBro";}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ var CompleteTimestamps = (_ => {
|
||||||
|
|
||||||
constructor () {
|
constructor () {
|
||||||
this.changelog = {
|
this.changelog = {
|
||||||
"added":[["Settings","Added upper limit for $daysago and new year short form placeholder"]]
|
"fixed":[["Compact","Fixed some issues with the timestamp in compact mode"]]
|
||||||
};
|
};
|
||||||
|
|
||||||
this.patchedModules = {
|
this.patchedModules = {
|
||||||
|
@ -404,7 +404,7 @@ var CompleteTimestamps = (_ => {
|
||||||
setMaxWidth (timestamp, compact) {
|
setMaxWidth (timestamp, compact) {
|
||||||
if (currentMode != compact) {
|
if (currentMode != compact) {
|
||||||
currentMode = compact;
|
currentMode = compact;
|
||||||
if (compact && timestamp.props.className && typeof timestamp.type == "string") {
|
if (timestamp.props.className && typeof timestamp.type == "string") {
|
||||||
let tempTimestamp = BDFDB.DOMUtils.create(`<div class="${BDFDB.disCN.messagecompact}"><${timestamp.type} class="${timestamp.props.className}" style="width: auto !important;">${this.getTimestamp(languages[choices.timestampLang].id, new Date(253402124399995))}</${timestamp.type}></div>`);
|
let tempTimestamp = BDFDB.DOMUtils.create(`<div class="${BDFDB.disCN.messagecompact}"><${timestamp.type} class="${timestamp.props.className}" style="width: auto !important;">${this.getTimestamp(languages[choices.timestampLang].id, new Date(253402124399995))}</${timestamp.type}></div>`);
|
||||||
document.body.appendChild(tempTimestamp);
|
document.body.appendChild(tempTimestamp);
|
||||||
let width = BDFDB.DOMUtils.getRects(tempTimestamp.firstElementChild).width + 10;
|
let width = BDFDB.DOMUtils.getRects(tempTimestamp.firstElementChild).width + 10;
|
||||||
|
@ -423,7 +423,7 @@ var CompleteTimestamps = (_ => {
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
else BDFDB.DOMUtils.removeLocalStyle(this.name + "CompactCorrection");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue