PageSourceSearch

https://chanze.com.my/catalog/view/javascript/fbpixel-conversion-api.js

js chanze.com.my collected 2026-10-06 19:08:33 UTC 3,737 bytes, 98 lines download raw bytes

1function doNotTrackMe()
2{
3    if (window.doNotTrack
4    || navigator.doNotTrack
5    || navigator.msDoNotTrack
6    || (typeof window.external !== "undefined" && 'msTrackingProtectionEnabled' in window.external)
7    ) {
8        if (window.doNotTrack == "1"
9        || navigator.doNotTrack == "yes"
10        || navigator.doNotTrack == "1"
11        || navigator.msDoNotTrack == "1"
12        || (typeof window.external.msTrackingProtectionEnabled === "function" && window.external.msTrackingProtectionEnabled())
13        ) {
14            return true; //enabled
15        } else {
16            return false;//disabled
17        }
18    } else {
19        return false;//not supported
20    }
21}
22
23window.addEventListener('load', function() {
24    ism_ajax_event();
25
26    var buttons = document.querySelectorAll('#checkout-content #payment_method');
27     buttons.forEach(function(buttonScript) {
28		buttonScript.addEventListener('change', function() { ism_ajax_event('#checkout-content #payment_method'); }, { once : true })
29    });
30});
31
32
33function ism_ajax_event(button_id = '') {
34    $.ajax({
35        async: true,
36        type: 'post',
37        dataType: 'json',
38        url: 'index.php?route=facebook/facebook_pixel_conversion_api/index',
39        data: {ajax: 1, scriptmanager: 1, button: button_id},
40        success: function(data) {
41            var i;
42            if (data !== null) {
43                for (i = 0; i < data.length; i++) {
44                    (new Function(data[i]))()
45                }
46            }
47        }
48    });
49}
50
51var addButtonChecker = {
52    'AddToCartProduct': function(product_id, quantity) {
53        var productDataAjax = $('#product-frame input[type="text"], #product-frame input[type="hidden"], #product-frame input[type="radio"]:checked, #product-frame input[type="checkbox"]:checked, #product-frame select, #product-frame textarea').serialize();
54        if (!productDataAjax) {
55            var productDataAjax = 'product_id=' + product_id + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1);
56        }
57        $.ajax({
58            async: true,
59            url: 'index.php?route=checkout/cart/checkAddToCart',
60            type: 'post',
61            data: productDataAjax,
62            dataType: 'json',
63            success: function(jsonClickCheck) {
64                if ((typeof doNotTrackMe !== "function" || !doNotTrackMe()) && jsonClickCheck !== null && jsonClickCheck['AddToCart']!='') {
65                    (new Function(jsonClickCheck['AddToCart']))()
66                }
67            }
68        });
69    },
70    'AddToCart': function(product_id, quantity) {
71        $.ajax({
72            async: true,
73            url: 'index.php?route=checkout/cart/checkAddToCart',
74            type: 'post',
75            data: 'product_id=' + product_id + '&quantity=' + (typeof(quantity) != 'undefined' ? quantity : 1),
76            dataType: 'json',
77            success: function(jsonClickCheck) {
78                if ((typeof doNotTrackMe !== "function" || !doNotTrackMe()) && jsonClickCheck !== null && jsonClickCheck['AddToCart']!='') {
79                    (new Function(jsonClickCheck['AddToCart']))()
80                }
81            }
82        });
83    },
84    'AddToWishlist': function(product_id, quantity) {
85        $.ajax({
86            async: true,
87            url: 'index.php?route=checkout/cart/checkAddToWishlist',
88            type: 'post',
89            data: 'product_id=' + product_id,
90            dataType: 'json',
91            success: function(jsonClickCheck) {
92                if ((typeof doNotTrackMe !== "function" || !doNotTrackMe()) && jsonClickCheck !== null && jsonClickCheck['AddToWishlist']!='') {
93                    (new Function(jsonClickCheck['AddToWishlist']))()
94                }
95            }
96        });
97    }
98}

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.