PageSourceSearch

https://epernay.fr/core/misc/announce.js?v=9.5.5

js epernay.fr collected 2026-09-24 20:02:46 UTC 1,464 bytes, 49 lines download raw bytes

1/**
2* DO NOT EDIT THIS FILE.
3* See the following change record for more information,
4* https://www.drupal.org/node/2815083
5* @preserve
6**/
7(function (Drupal, debounce) {
8  var liveElement;
9  var announcements = [];
10  Drupal.behaviors.drupalAnnounce = {
11    attach: function attach(context) {
12      if (!liveElement) {
13        liveElement = document.createElement('div');
14        liveElement.id = 'drupal-live-announce';
15        liveElement.className = 'visually-hidden';
16        liveElement.setAttribute('aria-live', 'polite');
17        liveElement.setAttribute('aria-busy', 'false');
18        document.body.appendChild(liveElement);
19      }
20    }
21  };
22  function announce() {
23    var text = [];
24    var priority = 'polite';
25    var announcement;
26    var il = announcements.length;
27    for (var i = 0; i < il; i++) {
28      announcement = announcements.pop();
29      text.unshift(announcement.text);
30      if (announcement.priority === 'assertive') {
31        priority = 'assertive';
32      }
33    }
34    if (text.length) {
35      liveElement.innerHTML = '';
36      liveElement.setAttribute('aria-busy', 'true');
37      liveElement.setAttribute('aria-live', priority);
38      liveElement.innerHTML = text.join('\n');
39      liveElement.setAttribute('aria-busy', 'false');
40    }
41  }
42  Drupal.announce = function (text, priority) {
43    announcements.push({
44      text: text,
45      priority: priority
46    });
47    return debounce(announce, 200)();
48  };
49})(Drupal, Drupal.debounce);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.