PageSourceSearch

https://connexion.moncompte.orleans-metropole.fr/static/authentic2/js/js_seconds_until.js

js orleans-metropole.fr collected 2026-09-24 18:52:58 UTC 1,437 bytes, 43 lines download raw bytes

1(function () {
2  window.a2_js_seconds_until = function () {
3      var spans = document.getElementsByClassName('js-seconds-until');
4      if (! spans.length) {
5        return;
6      }
7      var span = spans[0];
8      var timeout_id;
9      var initial_time = Date.now();
10      var until = initial_time + parseInt(span.textContent) * 1000;
11
12      function decrease_seconds() {
13        var now = Date.now();
14        var duration = (until - now) / 1000;
15        if (duration < 1) {
16          var target_selector = span.getAttribute('data-target');
17          if (target_selector) {
18            var target = document.querySelector(target_selector);
19            var replace = span.getAttribute('data-replace');
20            if (replace) {
21              target.innerHtml = '';
22              target.textContent = replace;
23              if (target.href) {
24                  target.href = '';
25              }
26            } else {
27              /* remove the target */
28              target.parentNode.removeChild(target);
29            }
30          } else {
31            /* remove the container */
32            span.parentNode.parentNode.removeChild(span.parentNode);
33          }
34          clearInterval(timeout_id);
35        } else {
36          /* decrease seconds before retry */
37          span.textContent = Math.floor(duration).toString();
38        }
39      }
40      timeout_id = setInterval(decrease_seconds, 500);
41  }
42  window.a2_js_seconds_until();
43})()

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.