PageSourceSearch

https://www.fanasparebank.no/js/forms.js

js fanasparebank.no collected 2026-10-02 16:49:50 UTC 1,559 bytes, 42 lines download raw bytes

1document.querySelectorAll('.EPiServerForms').forEach(function(form) {
2  var statusMsg = form.querySelector('.Form__Status__Message');
3  if (statusMsg) {
4    var observer = new MutationObserver(function() {
5      if (!statusMsg.classList.contains('hide')) {
6        form.classList.add('form-posted');
7        // Skjul aside
8        var aside = form.querySelector('aside.Form__Description');
9        if (aside) {
10          aside.style.display = 'none';
11        }
12      }
13    });
14    observer.observe(statusMsg, { attributes: true, attributeFilter: ['class'] });
15  }
16});
17
18document.addEventListener('DOMContentLoaded', function() {
19  document.querySelectorAll('.btnNext').forEach(btn => {
20    if (btn.textContent.trim() === 'Neste trinn') btn.textContent = 'Neste';
21  });
22  document.querySelectorAll('.btnPrev').forEach(btn => {
23    if (btn.textContent.trim() === 'Forrige trinn') btn.textContent = 'Forrige';
24  });
25});
26
27
28// Focus on form with classes EPiServerForms ValidationSuccess form-posted
29// Moving focus to the form when the receipt is shown, to ensure accessibility 
30// when the form is submitted and the receipt is shown. 
31
32document.addEventListener('DOMContentLoaded', function () {
33  var observer = new MutationObserver(function () {
34    var form = document.querySelector('form.EPiServerForms.ValidationSuccess.form-posted');
35    if (form && form.offsetParent !== null) {
36      form.setAttribute('tabindex', '-1');
37      form.focus();
38      observer.disconnect();
39    }
40  });
41  observer.observe(document.body, { childList: true, subtree: true });
42});

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.