mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
DOM manipulation
This commit is contained in:
parent
63e3fbd7d4
commit
c0f9c54d8c
@ -86,6 +86,8 @@ define([
|
||||
var addNotification = function (data, el) {
|
||||
// if the type of notification correspond
|
||||
if (filterTypes.indexOf(data.content.msg.type) !== -1) {
|
||||
var icon = $(".cp-reminder");
|
||||
$(icon).wrap('<span class="cp-avatar"></span>').wrap('<span class="cp-avatar-default" alt="" aria-hidden="true"></span>')
|
||||
notifsData.push(data);
|
||||
$(notifsList).prepend(el);
|
||||
}
|
||||
@ -145,7 +147,6 @@ define([
|
||||
|
||||
common.mailbox.subscribe(["notifications", "reminders"], {
|
||||
onMessage: function (data, el) {
|
||||
el.innerHTML = el.innerHTML.replace('<i', '<span class="cp-avatar"><span class="cp-avatar-default" alt="" aria-hidden="true"><i').replace('/i>', '/i></span></span>');
|
||||
addNotification(data, el);
|
||||
},
|
||||
onViewed: function (data) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user