PageSourceSearch

https://xagent.id/assets/public-url.js?v=card-entry-20260821

js xagent.id collected 2026-10-05 06:32:41 UTC 669 bytes, 19 lines download raw bytes

1/* Shared public URL syntax normalization for the homepage and card page. */
2(function (global) {
3  "use strict";
4
5  global.xagentNormalizePublicUrl = function (value) {
6    var raw = String(value || "").trim();
7    if (!raw) return "";
8    if (!/^https?:\/\//i.test(raw)) raw = "https://" + raw;
9    try {
10      var url = new URL(raw);
11      if (url.protocol !== "http:" && url.protocol !== "https:") return "";
12      if (!url.hostname || url.hostname.indexOf(".") === -1) return "";
13      if (url.username || url.password) return "";
14      return url.origin + (url.pathname === "/" ? "" : url.pathname);
15    } catch (_error) {
16      return "";
17    }
18  };
19})(window);

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.