Commit f096d00c authored by Tim Wagner's avatar Tim Wagner
Browse files

[TASK] Only show max. one save confirmation notification

parent 12cd3144
......@@ -976,10 +976,13 @@
* @param {dom} contentElement
*/
function showSaveConfirmation(contentElement) {
var notification = document.createElement('DIV');
notification.classList.add('sg-cookie-optin-save-confirmation');
notification.insertAdjacentText('afterbegin', jsonData.textEntries.save_confirmation_text);
contentElement.insertBefore(notification, contentElement.firstChild);
var oldNotification = contentElement.firstChild;
if (!oldNotification.classList.contains('sg-cookie-optin-save-confirmation')) {
var notification = document.createElement('DIV');
notification.classList.add('sg-cookie-optin-save-confirmation');
notification.insertAdjacentText('afterbegin', jsonData.textEntries.save_confirmation_text);
contentElement.insertBefore(notification, contentElement.firstChild);
}
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment