Quy Nguyen Vu
Quy Nguyen Vu

Reputation: 67

What do this code do?

My client's website contains this code snipset:

<script>
/*DO NOT ALTER */
(function(e) {
    var t = "1775",
        n = document,
        r, i, s = {
            http: "http://cdn.mplxtms.com/s/MasterTMS.min.js",
            https: "https://secure-cdn.mplxtms.com/s/MasterTMS.min.js"
        },
        o = s[/\w+/.exec(window.location.protocol)[0]];
    i = n.createElement("script"), i.type = "text/javascript", i.async = !0, i.src = o + "#" + t, r = n.getElementsByTagName("script")[0], r.parentNode.insertBefore(i, r), i.readyState ? i.onreadystatechange = function() {
        if (i.readyState === "loaded" || i.readyState === "complete") i.onreadystatechange = null
    } : i.onload = function() {
        try {
            e()
        } catch (t) {}
    }
})(function() {});

What do this code do ?

I googled this code but don't find answer. I only known it related with CJ affiliate.

Thanks all !

Upvotes: -6

Views: 777

Answers (1)

Martin Chaov
Martin Chaov

Reputation: 864

Depending on the protocol includes one of either:

http: "http://cdn.mplxtms.com/s/MasterTMS.min.js",
https: "https://secure-cdn.mplxtms.com/s/MasterTMS.min.js"

JS files into the page in script tags.

Upvotes: 0

Related Questions