PageSourceSearch

https://chatway.app/wp-content/themes/chatway-theme/assets/js/referrer.js?ver=3.0.551790264046

js chatway.app collected 2026-09-24 15:36:37 UTC 1,730 bytes, 59 lines download raw bytes

1(function (factory) {
2    "use strict";
3    if (typeof define === 'function' && define.amd) {
4        define(['jquery'], factory);
5    } else if (typeof module !== 'undefined' && module.exports) {
6        module.exports = factory(require('jquery'));
7    } else {
8        factory(jQuery);
9    }
10}(function ($, undefined) {
11
12    function setCookie(cname, cvalue, exdays) {
13        var d = new Date();
14        d.setTime(d.getTime() + (exdays*24*60*60*1000));
15        var expires = "expires="+d.toUTCString();
16        document.cookie = cname + "=" + cvalue + "; domain=.chatway.app; " + expires + ";path=/";
17    }
18
19    function getCookie(cname) {
20        var name = cname + "=";
21        var ca = document.cookie.split(';');
22        for(var i = 0; i < ca.length; i++) {
23            var c = ca[i];
24            while (c.charAt(0) == ' ') {
25                c = c.substring(1);
26            }
27            if (c.indexOf(name) == 0) {
28                return c.substring(name.length, c.length);
29            }
30        }
31        return "";
32    }
33
34    function checkCookie(cname) {
35        var cookie = getCookie(cname);
36        if (cookie != "") {
37            return true
38        } else {
39            return false;
40        }
41    }
42
43    function setReferrerURL() {
44
45        if (!checkCookie('chatway_landing_url')) {
46            let landingURL = window.location.href;
47            setCookie('chatway_landing_url',landingURL,90);
48        }
49
50        if(!checkCookie('chatway_referrer_url')){
51            let refererURL = (document.referrer.length <= 1 ? window.location.href : document.referrer );
52            setCookie('chatway_referrer_url',refererURL,90);
53        }
54    }
55
56    $(document).ready(function () {
57        setReferrerURL();
58    });
59}))

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.