PageSourceSearch

https://www.kielibuusti.fi/themes/custom/aalto_base/js/aalto_notification.js?tltw44

js kielibuusti.fi collected 2026-09-24 11:18:53 UTC 1,238 bytes, 26 lines download raw bytes

1(function (Drupal) {
2  Drupal.behaviors.aalto_notification = {
3    attach: function (context, settings) {
4      var notifications = [].slice.call(document.querySelectorAll('.aalto-notification')); // Needs to be an array instead of NodeList for forEach to work in old Edge and IE 11.
5
6      if (notifications.length) {
7        notifications.forEach(function(notification) {
8          notification.addEventListener('transitionend', hideNotification);
9        });
10      }
11    },
12
13    showNotification: function (container, notificationText) {
14      var notification = container.querySelector('.aalto-notification');
15      var notificationText = notificationText || notification.textContent; // If notificationText parameter is not given, let's use the text set in html.
16      notification.textContent = ''; // Clear the info text and add it again to get better screen reader support: all screenreaders don't reed live regions when only visibility is toggled.
17      notification.textContent = notificationText;
18      notification.classList.remove('aalto-notification--hidden');
19    },
20  }
21
22  function hideNotification(e) {
23    var notification = e.currentTarget;
24    notification.classList.add('aalto-notification--hidden');
25  }
26})(Drupal);

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.