PageSourceSearch

https://bimetall-spb.ru/js/dop.js?16

js bimetall-spb.ru collected 2026-10-10 00:01:10 UTC 5,971 bytes, 194 lines download raw bytes

1jQuery(function(){
2	initTableFix();
3});
4
5function initTableFix() {
6	jQuery('table').wrap('<div class="table-scroll"></div>');
7}
8$(document).ready(function() {
9	$('a.file').each(function() {
10   		$(this).click(function(event) {
11	         event.preventDefault();
12	         event.stopPropagation();
13	         window.open(this.href, '_blank');
14	    });
15	});
16});
17
18function validate_polit(fn){
19	valid = true;
20	gde = "#polit"+fn;
21    if(!$(gde).prop('checked')){
22		$(gde).focus();
23		alert("Пожалуйста, ознакомьтесь с политикой конфиденциальности и подтвердите согласие на обработку личных данных.");
24		valid = false;
25	}
26	return valid;
27}
28function getdetails(fname,func,sloy,fn,goal){
29	valid = true;
30	gde = "#polit"+fn;
31	wt = "#wait"+fn;
32    if(!$(gde).prop('checked')){
33		$(gde).focus();
34		alert("Пожалуйста, ознакомьтесь с политикой конфиденциальности и подтвердите согласие на обработку личных данных.");
35		valid = false;
36	}
37	else{
38		$(wt).css("display", "block");
39		if(goal!="") yaCounter48834206.reachGoal(goal);//ym(000000, 'reachGoal', 'идентификатор');
40		fm = "#"+fname;
41		sloy2 = "#"+sloy;
42		formData = new FormData($(fm).get(0));
43		$.ajax({
44	    	type: "POST",
45	       	processData: false,
46			contentType: false,
47 			url: func,
48	        data: formData,
49			success:(function(result){
50    			$(wt).css("display", "none");
51				$(fm).css("display", "none");
52				$(sloy2).css("display", "block");
53				$(sloy2).html(result);
54	       	})
55   		})
56	}
57	return valid;
58}
59function send_msg_metrika(fn,goal){
60	valid = true;
61	gde = "#polit"+fn;
62    if(!$(gde).prop('checked')){
63		$(gde).focus();
64		alert("Пожалуйста, ознакомьтесь с политикой конфиденциальности и подтвердите согласие на обработку личных данных.");
65	}
66	else {
67        $("#wait").css("display", "block");
68///		if(goal!="") ym(000000, 'reachGoal', 'идентификатор');      //yaCounter000000.reachGoal(goal);
69		formData = new FormData($("#msgform").get(0));
70	    $.ajax({
71	        type: "POST",
72	        processData: false,
73			contentType: false,
74	        url: "/send-msg-ajax.php",
75	        data: formData,
76			success:(function(result){
77		    	$("#msgres").html(result);
78				$("#wait").css("display", "none");
79	    		$("#msgres").css("display", "block");
80                $("#msgform").css("display", "none");
81	        })
82	    })
83	}
84	return false;
85}
86
87function decline_cookies(){
88		$.ajax({
89        type: "POST",
90        url: "/setpolicy.php ",
91        data: {choise:0},
92		success:(function(result){
93    		$(".aboutcookies").hide();
94			$("#pcounter").html('___________');
95        })
96    })
97}
98function accept_cookies(){
99		$.ajax({
100        type: "POST",
101        url: "/setpolicy.php ",
102        data: {choise:1},
103		success:(function(result){
104    		$(".aboutcookies").hide();
105        })
106    })
107}
108
109
110$(document).ready(function() {
111    // Глобальная переменная для контейнера
112    var captchaContainerId = 'captcha-container';
113
114    if (typeof window.smartCaptcha === 'undefined') {
115        var sc = document.createElement('script');
116        sc.src = 'https://smartcaptcha.cloud.yandex.ru/captcha.js?onload=smartCaptchaOnLoad&render=onload';
117        sc.defer = true;
118        document.head.appendChild(sc);
119    }
120
121    window.smartCaptchaOnLoad = function() {
122        renderSmartCaptcha();
123    };
124
125    function renderSmartCaptcha() {
126        window.yandexCaptchaId = window.smartCaptcha.render(captchaContainerId, {
127            sitekey: 'ysc1_wMmMlrYhokhMQ6L26fzZhqgf7Uqk2WHqmpclBijEd561584b',
128            invisible: true,
129            callback: function(token) {
130                if (!window.smartCaptchaCurrentForm) return;
131
132                // Подставляем токен
133                var tokenField = window.smartCaptchaCurrentForm.querySelector('input[name="smartcaptcha_token"]');
134                if (tokenField) tokenField.value = token;
135
136                // Триггер стандартного submit-события
137                var event = new Event('submit', { bubbles: true, cancelable: true });
138                if (window.smartCaptchaCurrentForm.dispatchEvent(event)) {
139                    window.smartCaptchaCurrentForm.submit();
140                }
141
142                // Очистка текущей формы
143                window.smartCaptchaCurrentForm = null;
144
145                // Удаляем старый виджет и рендерим новый
146                $('#' + captchaContainerId).empty();
147                setTimeout(renderSmartCaptcha, 50);
148            }
149        });
150    }
151
152    $('body').on('click', 'form input[type="submit"][name="nsubmit"]', function(e) {
153        e.preventDefault();
154
155        var formid = $(this).data('form-id');
156        var form = document.getElementById(formid);
157        if (!form) return;
158
159        window.smartCaptchaCurrentForm = form;
160
161        if (window.smartCaptcha && typeof window.smartCaptcha.execute === 'function') {
162            window.smartCaptcha.execute(window.yandexCaptchaId);
163        } else {
164            var event = new Event('submit', { bubbles: true, cancelable: true });
165            if (form.dispatchEvent(event)) {
166                form.submit();
167            }
168        }
169    });
170});
171document.addEventListener('DOMContentLoaded', function () {
172
173    var input = document.getElementById('myfiles');
174    var list  = document.getElementById('myfiles-list');
175
176    input.addEventListener('change', function () {
177
178        list.innerHTML = '';
179
180        Array.from(input.files).forEach(function (file) {
181
182            var item = document.createElement('div');
183
184            item.className = 'my-file-upload__file';
185            item.textContent = file.name;
186
187            list.appendChild(item);
188        });
189
190    });
191
192});
193
194

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.