diff options
author | Alex Pott <alex.a.pott@googlemail.com> | 2021-12-18 06:12:16 +0000 |
---|---|---|
committer | Alex Pott <alex.a.pott@googlemail.com> | 2021-12-18 06:12:16 +0000 |
commit | f1e57201c28dbc62dd07239c7d803b6d760ed44a (patch) | |
tree | 2c0359ed31b0a78632c2ac8d8407ff8e8b8df419 /core/misc/announce.js | |
parent | 00ad1d7572f27c272b5b7fc70941016989b0cfa1 (diff) | |
download | drupal-f1e57201c28dbc62dd07239c7d803b6d760ed44a.tar.gz drupal-f1e57201c28dbc62dd07239c7d803b6d760ed44a.zip |
Issue #3253148 by mherchel, longwave, ckrina, droplet: Remove IE from core's browserlist, remove non-essential CSS importing and recompile assets
Diffstat (limited to 'core/misc/announce.js')
-rw-r--r-- | core/misc/announce.js | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/core/misc/announce.js b/core/misc/announce.js index eacf55b511e..859a8817036 100644 --- a/core/misc/announce.js +++ b/core/misc/announce.js @@ -6,10 +6,10 @@ **/ (function (Drupal, debounce) { - var liveElement; - var announcements = []; + let liveElement; + const announcements = []; Drupal.behaviors.drupalAnnounce = { - attach: function attach(context) { + attach(context) { if (!liveElement) { liveElement = document.createElement('div'); liveElement.id = 'drupal-live-announce'; @@ -19,15 +19,16 @@ document.body.appendChild(liveElement); } } + }; function announce() { - var text = []; - var priority = 'polite'; - var announcement; - var il = announcements.length; + const text = []; + let priority = 'polite'; + let announcement; + const il = announcements.length; - for (var i = 0; i < il; i++) { + for (let i = 0; i < il; i++) { announcement = announcements.pop(); text.unshift(announcement.text); @@ -47,8 +48,8 @@ Drupal.announce = function (text, priority) { announcements.push({ - text: text, - priority: priority + text, + priority }); return debounce(announce, 200)(); }; |