storage + nes.css

This commit is contained in:
_Bastler 2021-05-14 16:41:41 +02:00
parent d6e99d5f4d
commit e7727e122e
3 changed files with 248 additions and 149 deletions

File diff suppressed because it is too large Load Diff

View File

@ -139,6 +139,7 @@ class IframeListener {
// We are putting a sandbox on this script because it will run in the same domain as the main website.
iframe.sandbox.add('allow-scripts');
iframe.sandbox.add('allow-top-navigation-by-user-activation');
iframe.sandbox.add('allow-same-origin');
document.body.prepend(iframe);

View File

@ -174,13 +174,19 @@ export class DiscussionManager {
}
pMessage.innerHTML = `<span style="font-weight: bold">${name}</span>
<span style="color:#bac2cc;display:inline-block;font-size:12px;">
${date.getHours()}:${date.getMinutes()}
${date.getHours() < 10 ? '0' + date.getHours() : date.getHours()}:${date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()}
</span>`;
divMessage.appendChild(pMessage);
const userMessage: HTMLParagraphElement = document.createElement('p');
userMessage.innerHTML = HtmlUtils.urlify(message);
userMessage.classList.add('body');
userMessage.classList.add('nes-balloon');
if (isMe) {
userMessage.classList.add('from-left');
} else {
userMessage.classList.add('from-right');
}
divMessage.appendChild(userMessage);
this.divMessages?.appendChild(divMessage);