mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-04-14 23:50:33 +03:00
Add 'edited' label to edited messages in renderer
This commit is contained in:
parent
b5eec0fc65
commit
f7136560a1
@ -36,7 +36,7 @@ var DISCORD = (function(){
|
||||
|
||||
templateMessage = new TEMPLATE([
|
||||
"<div>",
|
||||
"<h2><strong class='username'>{user.name}</strong><span class='time'>{timestamp}</span></h2>",
|
||||
"<h2><strong class='username'>{user.name}</strong><span class='info time'>{timestamp}</span>{edited}</h2>",
|
||||
"<div class='message'>{contents}{embeds}{attachments}</div>",
|
||||
"</div>"
|
||||
].join(""));
|
||||
@ -116,6 +116,9 @@ var DISCORD = (function(){
|
||||
}
|
||||
}).join("");
|
||||
}
|
||||
else if (property === "edited"){
|
||||
return value ? "<span class='info edited'>(edited)</span>" : "";
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -57,7 +57,8 @@ var STATE = (function(){
|
||||
timestamp: message.t,
|
||||
contents: message.m,
|
||||
embeds: message.e,
|
||||
attachments: message.a
|
||||
attachments: message.a,
|
||||
edited: (message.f&1) === 1
|
||||
};
|
||||
});
|
||||
},
|
||||
|
@ -154,14 +154,21 @@ body {
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
#messages .time {
|
||||
margin-left: 10px;
|
||||
#messages .info {
|
||||
color: rgba(255, 255, 255, 0.2);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0;
|
||||
}
|
||||
|
||||
#messages .time {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#messages .edited {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
/*******************
|
||||
* MESSAGE CONTENT *
|
||||
*******************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user