PageSourceSearch

https://thecostumehouse.fr/assets/js/ui-v1.js

js thecostumehouse.fr collected 2026-10-10 00:40:14 UTC 1,600 bytes, 30 lines download raw bytes

1(function () {
2  'use strict';
3  function ready() {
4    document.querySelectorAll('[data-paste-for]').forEach(function (button) {
5      button.addEventListener('click', function () {
6        var input = document.getElementById(button.getAttribute('data-paste-for'));
7        if (!input || button.disabled) return;
8        var status = input.form && input.form.querySelector('.paste-status');
9        function message(key) { if (status) status.textContent = button.getAttribute('data-' + key) || ''; }
10        function manual() { input.focus(); message('manual'); }
11        if (!navigator.clipboard || !navigator.clipboard.readText) { manual(); return; }
12        button.disabled = true;
13        var pending;
14        try { pending = navigator.clipboard.readText(); }
15        catch (error) { button.disabled = false; manual(); return; }
16        Promise.resolve(pending).then(function (text) {
17          text = String(text || '').trim();
18          if (!text) { message('empty'); input.focus(); return; }
19          var limit = input.maxLength > 0 ? input.maxLength : 300;
20          input.value = text.slice(0, limit);
21          ['input', 'change'].forEach(function (name) {
22            var event = document.createEvent('Event'); event.initEvent(name, true, false); input.dispatchEvent(event);
23          });
24          input.focus(); message('done');
25        }, manual).then(function () { button.disabled = false; }, function () { button.disabled = false; manual(); });
26      });
27    });
28  }
29  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', ready); else ready();
30}());

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.