PageSourceSearch

https://rulyt.cz/inshop/Layout/libs/inshop5/Pages/watchdog.js

js rulyt.cz collected 2026-10-08 03:00:50 UTC 2,525 bytes, 90 lines download raw bytes

1
2$('.watch_dog_link').on('click', function(e) {
3    e.preventDefault();
4    console.log('watch dog');
5    $('.watch_dog_modal').modal('show');
6});
7
8$('.watch_dog_modal input[name="Email"]').on('keyup', function() {
9    $('.email_form_group').removeClass('missing');
10    $('.email_form_group .validateError').hide();
11});
12
13if (EshopParams.watchDogHasCaptcha) {
14  $('.watch_dog_modal input[name="WatchDog_captchacode"]').on('keyup', function() {
15      $('.captcha_form_group').removeClass('missing');
16      $('.captcha_form_group .validateError').hide();
17  });
18}
19
20
21
22$('.watch_dog_modal .call2action').on('click', function(e) {
23    e.preventDefault();
24
25    var email = $('.watch_dog_modal input[name="Email"]').val();
26    var emailFilter = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
27
28    var validForm = true
29
30    if (!emailFilter.test(email)) {
31            $('.email_form_group').addClass('missing');
32            $('.email_form_group .validateError').show();
33            validForm = false
34    }
35
36    if (EshopParams.watchDogHasCaptcha) {
37      var $captchaInput = $('[name="WatchDog_captchacode"]');
38      if ($captchaInput.val().length == 0) {
39        $('.captcha_form_group').addClass('missing');
40        $('.captcha_form_group .validateError').show();
41        validForm = false
42      };
43    };
44
45
46    console.log('validForm', validForm);
47
48    if (validForm) {
49      $.ajax({
50          url: '/inshop/scripts/shop.aspx',
51          type: 'POST',
52          dataType: 'json',
53          data: $('.watch_dog_modal form').serialize()  + '&JSONresult=1',
54      })
55      .done(function(result) {
56          console.log('result', result)
57          if (!result.result) {
58            $('.captcha_form_group').addClass('missing');
59            $('.captcha_form_group .validateError').html(result.error).show();
60          }
61          else{
62            $('.watch_dog_modal').modal('hide');
63            $('.watch_dog_modal_success').modal('show');
64            setTimeout(function() {
65                $('.watch_dog_modal_success').modal('hide');
66            }, 10000);
67          }
68          
69      })
70      .fail(function() {
71          console.log("fail");
72      })
73      .always(function() {
74          console.log("complete");
75      });
76    };
77
78    
79    
80});
81
82$('.watch_dog_modal .cancel').on('click', function(e) {
83    e.preventDefault();
84    $('.watch_dog_modal').modal('hide');
85});
86
87$('.watch_dog_modal_success .cancel').on('click', function(e) {
88    e.preventDefault();
89    $('.watch_dog_modal_success').modal('hide');
90});

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.