PageSourceSearch

https://tv-toshiba.ru/local/templates/tvtoshiba/components/4px/new…/.default/script.js?17709029741411

js tv-toshiba.ru collected 2026-10-07 17:41:32 UTC 1,411 bytes, 55 lines download raw bytes

1let widgetId;
2
3function onloadFunction() {
4	if (!window.smartCaptcha) {
5		return;
6	}
7
8	widgetId = window.smartCaptcha.render('yandex-captcha-subscribe', {
9		sitekey: 'ysc1_Udt0KgWPlHfnY9j39gf3Xx7ttGlOJnpGvbI9exoMed84d386',
10		invisible: true, // Сделать капчу невидимой
11		callback: callback,
12	});
13}
14
15function callback(token) {
16	sendQuery(token);
17}
18
19function sendQuery(token) {
20	var $form = document.getElementById('form_news_subscribes_2'),
21		url = '/local/ajax/news-subscribes/',
22		formData = new URLSearchParams(new FormData($form)).toString();
23
24	BX.ajax({
25		url: url,
26		method: 'POST',
27		data: formData,
28		dataType: 'json',
29		onsuccess: function (data) {
30			if (data['status'] === 'success') {
31				BX.onCustomEvent('notice.show', [{title: 'Новостная рассылка', message: data['message'], timeOut:5000, type: 0}]);
32			}
33
34			if (data['status'] === 'error') {
35				BX.onCustomEvent('notice.show', [{title: 'Новостная рассылка', message: data.errors.join('\n'), timeOut:5000, type: -1}]);
36			}
37			window.smartCaptcha.reset(widgetId);
38		},
39		onfailure: function () {
40			console.log("error");
41		}
42	});
43}
44
45document.querySelectorAll('.form-subscribe-ajax')?.forEach((subscribe) => {
46	subscribe.addEventListener('submit', (e) => {
47		e.preventDefault();
48
49		if (window.smartCaptcha) {
50			window.smartCaptcha.execute(widgetId);
51		} else {
52			sendQuery();
53		}
54	});
55});

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.