PageSourceSearch

https://set.sportdata.org/wp-content/plugins/woocommerce-multilingual/res/js/cart_widget.js?ver=5.5.5

js sportdata.org collected 2026-10-02 03:22:12 UTC 1,453 bytes, 42 lines download raw bytes

1document.addEventListener('DOMContentLoaded', function() {
2	document.addEventListener('click', function(e) {
3        if (e.target.matches('.wcml_removed_cart_items_clear')) {
4            e.preventDefault();
5            wcml_cart_clear_removed_items();
6        }
7    });
8
9    var getCookieValue = function(name) {
10        return document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)')?.pop() || '';
11    }
12
13    // Check sessionStorage as well as cookies, for backward compatibility.
14    var empty_cart_hash = ! sessionStorage.getItem('woocommerce_cart_hash')
15        && ! getCookieValue('woocommerce_cart_hash');
16    if (empty_cart_hash || actions.is_lang_switched == 1 || actions.force_reset == 1) {
17        setTimeout(wcml_reset_cart_fragments, 0);
18    }
19});
20
21function wcml_reset_cart_fragments() {
22    try {
23        document.body.dispatchEvent(new Event('wc_fragment_refresh'));
24        sessionStorage.removeItem('wc_fragments');
25    } catch (err) { }
26}
27
28function wcml_cart_clear_removed_items() {
29    var xhr = new XMLHttpRequest();
30    var formData = new FormData();
31
32    formData.append('action', 'wcml_cart_clear_removed_items');
33    formData.append('wcml_nonce', document.querySelector('#wcml_clear_removed_items_nonce').value);
34
35    xhr.open('POST', woocommerce_params.ajax_url);
36    xhr.onload = function() {
37        if (xhr.status === 200) {
38            window.location = window.location.href;
39        }
40    };
41    xhr.send(formData);
42}

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.