PageSourceSearch

https://www.dctrust.ie/sites/layout-one/js/utils.js?v=255

js dctrust.ie collected 2026-10-02 08:11:45 UTC 896 bytes, 28 lines download raw bytes

1var utils = {
2    decodeEntities: function(text) {
3        var str, temp = document.createElement('p');
4        temp.innerHTML = text;
5        str = temp.textContent || temp.innerText;
6        temp = null;
7        return str;
8    },
9    isUrl: function(text) {
10        var pattern = new RegExp('^((ft|htt)ps?:\\/\\/)?'+
11            '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+
12            '((\\d{1,3}\\.){3}\\d{1,3}))'+
13            '(\\:\\d+)?'+
14            '(\\/[-a-z\\d%@_.~+&:]*)*'+
15            '(\\?[;&a-z\\d%@_.,~+&:=-]*)?'+
16            '(\\#[-a-z\\d_]*)?$','i');
17
18        return pattern.test(text);
19    },
20    fixFloat: function (possibleFloat) {
21        if ('string' == typeof possibleFloat) {
22            return parseFloat(possibleFloat.replace(/,/g, ''));
23        } else if ('number' == typeof possibleFloat) {
24            return possibleFloat;
25        }
26        return 0;
27    }
28}

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.