PageSourceSearch

https://domsamogona.ru/wa-apps/shop/plugins/tinkoff/js/tinkoff.js?2.3.0

js domsamogona.ru collected 2026-10-08 12:40:33 UTC 3,144 bytes, 66 lines download raw bytes

1let tinkoffIsIOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||(navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) && !window.MSStream;
2
3function tinkoffShowButtonSettingsBlock(){
4    $('#tinkoffSettings .tabs .tinkoff_tabs_hidden:eq(0)').removeClass('tinkoff_tabs_hidden').click();
5    if($('#tinkoffSettings .tabs .tinkoff_tabs_hidden:eq(0)').length == 0){
6        $('.tinkoffAddButtonLink').hide();
7    }
8}
9
10function tinkoffSettingsInit() {
11    $('#tinkoffSettings .tabs li.tinkoff_tabs').click(function(){
12        $('#tinkoffSettings .tab-content').hide();
13        $('#tinkoffSettings .tabs li.tinkoff_tabs').removeClass('selected');
14        $(this).addClass('selected');
15        $('#' + $(this).find('a').prop('class')).show();
16    });
17    $('#tinkoffSettings .tabs li.tinkoff_tabs:eq(0)').click();
18}
19
20function tinkoffFrontendButtonInit(id, product_id, settings, append_id) {
21    $(settings.form_add_cart_class + append_id).find('input').change(function(){
22        tinkoffFrontendButtonSend(id, product_id, settings, true);
23    });
24    $(settings.form_add_cart_class + append_id).find('.js-increase, .js-decrease').click(function(){
25        setTimeout(function(){tinkoffFrontendButtonSend(id, product_id, settings, true);}, 10);
26
27    });
28    tinkoffFrontendButtonSend(id, product_id, settings, true);
29    $('#shopTinkoffButton' + id + '_' + product_id).click(function(){tinkoffFrontendButtonSend(id, product_id, settings);});
30}
31
32function tinkoffStrpos (haystack, needle, offset) {
33    var i = (haystack+'').indexOf(needle, (offset || 0));
34    return i === -1 ? false : i;
35}
36
37function tinkoffFrontendButtonSend(id, product_id, settings, check) {
38    var serialize = $('[data-product-id='+ product_id +']').find(settings.form_add_cart_class).serialize();;
39    if (serialize == '') {
40        serialize = $(settings.form_add_cart_class).serialize();
41    }
42    $.post(settings.wa_app_url + 'shopTinkoffPluginSubmit/' + id + '/', serialize, function (r) {
43        $('#shopTinkoffButton' + id + '_' + product_id).prop('disabled', !r.data.available);
44        if(!r.data.available) {
45            $('#shopTinkoffButton' + id + '_' + product_id).html($('#shopTinkoffButton' + id + '_' + product_id).data('text_disabled_button'));
46        } else {
47            $('#shopTinkoffButton' + id + '_' + product_id).html($('#shopTinkoffButton' + id + '_' + product_id).data('text_button').replace('#PRICE#', r.data.price).replace('#PRICE2#', r.data.price2));
48        }
49
50        if(check != true && r.data.available){
51            $.post(settings.wa_app_url + 'shopTinkoffPluginRedirect/' + id + '/', r.data.form, function(json){
52
53                if(json.data.headers.http_code != 200) {
54                    alert(json.errors);
55                    alert(json.validations);
56                } else if (settings.blank == '1') {
57                    window.open(json.data.response.link);
58                } else if (settings.blank == '-1') {
59
60                } else {
61                    location.href = json.data.response.link;
62                }
63            });
64        }
65    });
66}

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.