PageSourceSearch

https://roomskey.app/assets/js/script.js

js roomskey.app collected 2026-10-02 01:14:48 UTC 16,732 bytes, 555 lines download raw bytes

1// Author: Puru Choudhary (www.terminusapp.com)
2// URL: https://github.com/medius/utm_cookie
3//
4// Description:
5// This script saves UTM parameters in cookies whenever there are any UTM parameters
6// in the URL. It also saves the initial referrer information in a cookie which is
7// never (365 days) overwritten.
8//
9// Adding this script is useful for custom tracking. e.g. The values in the cookies
10// can be read and added to forms or stored in the backend database, etc.
11//
12
13var utmCookie = {
14  cookieNamePrefix: "_uc_",
15
16  utmParams: ["utm_source",
17              "utm_medium",
18              "utm_campaign",
19              "utm_term",
20              "utm_content"],
21
22  cookieExpiryDays: 365,
23
24  createCookie: function(name, value, days) {
25    if (days) {
26      var date = new Date();
27      date.setTime(date.getTime()+(days*24*60*60*1000));
28      var expires = "; expires="+date.toGMTString();
29    }
30    else var expires = "";
31    document.cookie = this.cookieNamePrefix + name+"="+value+expires+"; path=/";
32  },
33
34  readCookie: function(name) {
35    var nameEQ = this.cookieNamePrefix + name + "=";
36    var ca = document.cookie.split(';');
37    for(var i=0; i < ca.length; i++) {
38      var c = ca[i];
39      while (c.charAt(0)==' ') c = c.substring(1,c.length);
40      if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
41    }
42    return null;
43  },
44
45  eraseCookie: function(name) {
46    this.createCookie(name,"",-1);
47  },
48
49  getParameterByName: function(name) {
50    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
51    var regexS = "[\\?&]" + name + "=([^&#]*)";
52    var regex = new RegExp(regexS);
53    var results = regex.exec(window.location.search);
54    if(results == null) {
55      return "";
56    } else {
57      return decodeURIComponent(results[1].replace(/\+/g, " "));
58    }
59  },
60
61  utmPresentInUrl: function() {
62    var present = false;
63    for (var i = 0; i < this.utmParams.length; i++) {
64      var param = this.utmParams[i];
65      var value = this.getParameterByName(param);
66      if (value != "" && value != undefined) {
67        present = true;
68      }
69    }
70    return present;
71  },
72
73  writeUtmCookieFromParams: function() {
74    for (var i = 0; i < this.utmParams.length; i++) {
75      var param = this.utmParams[i];
76      var value = this.getParameterByName(param);
77      this.createCookie(param, value, this.cookieExpiryDays)
78    }
79  },
80
81  writeCookieOnce: function(name, value) {
82    var existingValue = this.readCookie(name);
83    if (!existingValue) {
84      this.createCookie(name, value, this.cookieExpiryDays);
85    }
86  },
87
88  writeReferrerOnce: function() {
89    value = document.referrer;
90    if (value === "" || value === undefined) {
91      this.writeCookieOnce("referrer", "direct");
92    } else {
93      this.writeCookieOnce("referrer", value);
94    }
95  },
96
97  referrer: function() {
98    return this.readCookie("referrer");
99  }
100};
101
102utmCookie.writeReferrerOnce();
103
104if (utmCookie.utmPresentInUrl()) {
105  utmCookie.writeUtmCookieFromParams();
106}
107
108$(".burger__wrap-block").on("click", function (event) {
109  event.preventDefault();
110  if ($(".nav__wrap").hasClass("active")) {
111    $(".right-menu").fadeIn();
112    $(".nav__wrap").removeClass("active");
113    $(".nav-overlay").fadeOut();
114  } else {
115    $(".nav__wrap").addClass("active");
116    $(".right-menu").hide();
117  }
118});
119// this.value = this.value.replace (/[^0-9+]/, '')
120$("input[name='tel']").on("keyup", function (event) {
121  // event.preventDefault();
122  $(this).val(
123    $(this)
124      .val()
125      .replace(/[^0-9+]/, "")
126  );
127});
128// var offsetTop = $(window).height() * 2;
129// $(window).scroll(function (event) {
130//   if ($(document).scrollTop() > offsetTop) {
131//     $(".to_top").addClass("act");
132//   } else {
133//     $(".to_top").removeClass("act");
134//   }
135// });
136// $(".to_top, .ttp").on("click", function (event) {
137//   event.preventDefault();
138//   var top = 0;
139//   $("body,html").animate({ scrollTop: top }, 1000);
140// });
141// $("input[name='tel']").mask("+7-(999)-999-99-99");
142$(".close").on("click", function (event) {
143  event.preventDefault();
144  if ($(this).hasClass("close-nav")) {
145    $(".nav__wrap").removeClass("active");
146    $(".nav-overlay").fadeOut();
147  }
148
149  if ($(this).hasClass("close-t3d-box")) {
150    $(".t3d-box").fadeOut();
151    return false;
152  }
153
154  $(this).parents(".overlay").fadeOut();
155  let numOpen = $(".overlay").length;
156  $(".overlay").each(function (indexInArray, valueOfElement) {
157    if ($(this).attr("style").trim() != "") {
158      --numOpen;
159    }
160  });
161  if (numOpen == 0 || numOpen < 0) {
162    $("html").removeClass("stop");
163  }
164});
165
166$(".close-img").on("click", function (event) {
167  event.preventDefault();
168
169  $(".leftm").fadeOut();
170  $("html").removeClass("stop");
171});
172
173$(".overlay")
174  .not("#modal-page")
175  .mouseup(function (e) {
176    var container = $(".modal-wrap");
177    if (container.has(e.target).length === 0 && !container.is(e.target)) {
178      let numOpen = $(".overlay").length;
179      $(this).fadeOut();
180      $(".overlay").each(function (indexInArray, valueOfElement) {
181        if ($(this).attr("style").trim() != "") {
182          --numOpen;
183        }
184      });
185      if (numOpen == 0 || numOpen < 0) {
186        $("html").removeClass("stop");
187      }
188    }
189  });
190
191// $('.btn-prc-js').on('click', function(event) {
192//   event.preventDefault();
193//   $('html').addClass('stop');
194//   $('#modal-order').fadeIn();
195// });
196$(".btn-call-js").on("click", function (event) {
197  event.preventDefault();
198  var text = $(this).attr('data-title');
199  $("#modal-consult [name='title']").val(text);
200  $("html").addClass("stop");
201  $("#modal-consult").fadeIn();
202});
203$(".btn-feen-js").on("click", function (event) {
204  event.preventDefault();
205  let pdf = $(this).data("pdf");
206  let title = $(this).parents(".models-item").find(".t30").text().trim();
207  $(".title-m-js").text(title);
208  $(".tlt-m-js").val(title);
209  $(".pdfFile").val(pdf);
210  $("html").addClass("stop");
211  $("#modal-price").fadeIn();
212});
213
214$(".btn-ctg-js").on("click", function (event) {
215  event.preventDefault();
216  let pdf = $(this).data("pdf");
217  $(".pdfFile").val(pdf);
218  $("html").addClass("stop");
219  $("#modal-catalog").fadeIn();
220});
221$(".btn-ctg2-js").on("click", function (event) {
222  let pdf = $(this).data("pdf");
223  $(".pdfFile").val(pdf);
224});
225// $(".btn-zakaz-1-js").on("click", function (event) {
226// 	event.preventDefault();
227// 	$("html").addClass("stop");
228
229// 	var tlt = $(this)
230// 		.parents(".shtory-right")
231// 		.find(".tlt-one-js")
232// 		.text()
233// 		.trim();
234// 	$(".tlt-js").text(tlt);
235// 	$(".inp-js").val(tlt);
236// 	$("#modal-zakaz").fadeIn();
237// });
238
239// modal-call
240// modal-zamer
241// modal-zakaz
242
243// tlt-js
244// inp-js
245
246// $(".polit-js, .btn-politics-js").on("click", function (event) {
247//   event.preventDefault();
248//   $("html").addClass("stop");
249//   $("#politics").fadeIn();
250// });
251
252$(".link-scroll").on("click", function (event) {
253  event.preventDefault();
254  var id = $(this).attr("href"),
255    top = $(id).offset().top + 100;
256  $("body,html").animate({ scrollTop: top }, 1000);
257});
258
259$(".fancy-class, .play, .gallery__item").fancybox({
260  buttons: ["slideShow", "zoom", "fullScreen", "close"],
261  animationEffect: "zoom-in-out",
262  animationDuration: 600,
263  transitionEffect: "circular",
264  transitionDuration: 420,
265});
266
267// d = new Date();
268// monthA =
269//   "января,февраля,марта, апреля, мая, июня, июля, августа, сентября, октября, ноября, декабря".split(
270//     ","
271//   );
272// d.setMonth(d.getMonth() + 1);
273// $(".date-js").text(" " + d.getDate() + " " + monthA[d.getMonth()]);
274
275$(".nav a, .footer-nav a").on("click", function (event) {
276  if ($(this).attr("href") === "#not") {
277    return false;
278  } else {
279    if ($(this).parents(".nav__wrap").hasClass("active")) {
280      if ($(window).width() < 900) {
281        $(".nav__wrap").removeClass("active");
282        $(".overlay").fadeOut();
283        $("html").removeClass("stop");
284      }
285    }
286    // console.log('22');
287    if ($(this).parents(".nav__wrap").find(".close").hasClass("close-nav")) {
288      if ($(window).width() < 900) {
289        $(".nav__wrap").removeClass("active");
290        $(".nav-overlay, .nav__wrap").fadeOut();
291        $("html").removeClass("stop");
292      }
293    }
294    var id = $(this).attr("href"),
295      top = $(id).offset().top;
296    $("body,html").animate({ scrollTop: top }, 1000);
297  }
298});
299
300// $(".btn-prices-js-a").on("click", function (event) {
301//   event.preventDefault();
302//   var id = $("#pforms").offset().top;
303//   $("body,html").animate({ scrollTop: id }, 400);
304// });
305
306$(".main-bg-arr").on("click", function (event) {
307  event.preventDefault();
308  var id = $(".main").outerHeight();
309  $("body,html").animate({ scrollTop: id }, 400);
310});
311// animate__animated
312$(
313  ".t-min, .t-ss, .t-cir, .t-min2, .title, .title-lg, .t24,.t26, .t36, .risk-item,.t21 ,.t22,.t30 ,.t23,.t20, .forCompany-img__item , .main-img-box ,.princip-img__item, .chapter-slider__item, .roles-img__item , .analog-img__item"
314).each(anime);
315function anime(anim) {
316  var thisTitle = $(this);
317  var offsetTop = thisTitle.offset().top - $(window).height() - 10;
318  if ($(document).scrollTop() > offsetTop) {
319    thisTitle.addClass("fade_in");
320  }
321  $(window).scroll(function (event) {
322    offsetTop = thisTitle.offset().top - $(window).height() - 10;
323    if ($(document).scrollTop() > offsetTop) {
324      thisTitle.addClass("fade_in");
325    }
326  });
327}
328
329$(".flst1 a").on("click", function (event) {
330  var id = $(this).attr("href"),
331    top = $(id).offset().top;
332  $("body,html").animate({ scrollTop: top }, 600);
333});
334
335// var offsetTop = $(".zakaz-line").outerHeight();
336// var thisTitle = $(".header-scroll");
337
338// var darkSection = $(".zakaz-line").offset().top - $(window).height();
339// var darkSection2 = $(".zakaz").offset().top - $(window).height();
340
341//   darkSection = $(".zakaz-line").offset().top - $(window).height();
342//   darkSection2 = $(".zakaz").offset().top - $(window).height();
343
344//   if (
345//     $(window).scrollTop() > darkSection &&
346//     $(window).scrollTop() < darkSection2 + $(".zakaz").outerHeight()
347//   ) {
348//     $(".zakaz-line-act").addClass("active");
349//   }
350// });
351
352$(".ivvv1").on("change input", function () {
353  if ($(this).hasClass("tg")) {
354    $(".inp-enp-ph1").attr("placeholder", "Ваш телефон в Telegram");
355    // $('.eml').hide();
356  } else if ($(this).hasClass("ws")) {
357    $(".inp-enp-ph1").attr("placeholder", "Ваш телефон в WhatsApp");
358    // $('.eml').hide();
359  } else if ($(this).hasClass("vb")) {
360    $(".inp-enp-ph1").attr("placeholder", "Ваш телефон в Viber");
361    // $('.eml').hide();
362  } else if ($(this).hasClass("mail")) {
363    $(".inp-enp-ph1").attr("placeholder", "Ваш телефон ");
364    // $('.eml').fadeIn();
365  }
366});
367$(".ivvv2").on("change input", function () {
368  if ($(this).hasClass("tg")) {
369    $(".inp-enp-ph2").attr("placeholder", "Ваш телефон в Telegram");
370    // $('.eml').hide();
371  } else if ($(this).hasClass("ws")) {
372    $(".inp-enp-ph2").attr("placeholder", "Ваш телефон в WhatsApp");
373    // $('.eml').hide();
374  } else if ($(this).hasClass("vb")) {
375    $(".inp-enp-ph2").attr("placeholder", "Ваш телефон в Viber");
376    // $('.eml').hide();
377  } else if ($(this).hasClass("mail")) {
378    $(".inp-enp-ph2").attr("placeholder", "Ваш телефон ");
379    // $('.eml').fadeIn();
380  }
381});
382
383$(".ivvv3").on("change input", function () {
384  if ($(this).hasClass("tg")) {
385    $(".inp-enp-ph3").attr("placeholder", "Ваш телефон в Telegram");
386    // $('.eml').hide();
387  } else if ($(this).hasClass("ws")) {
388    $(".inp-enp-ph3").attr("placeholder", "Ваш телефон в WhatsApp");
389    // $('.eml').hide();
390  } else if ($(this).hasClass("vb")) {
391    $(".inp-enp-ph3").attr("placeholder", "Ваш телефон в Viber");
392    // $('.eml').hide();
393  } else if ($(this).hasClass("mail")) {
394    $(".inp-enp-ph3").attr("placeholder", "Ваш телефон ");
395    // $('.eml').fadeIn();
396  }
397});
398
399// новые скрипты
400$(".gtab__top").on("click", function () {
401  if ($(this).hasClass("show")) {
402    $(".gtab__top").removeClass("show");
403    $(".gtab__top").siblings(".gtab__hover").hide();
404  } else {
405    $(".gtab__top").removeClass("show");
406    $(".gtab__top").siblings(".gtab__hover").hide();
407    var $this = $(this);
408    setTimeout(function () {
409      $($this).addClass("show");
410    }, 100);
411
412    $(this).siblings(".gtab__hover").fadeIn();
413  }
414});
415
416if ($(window).width() < 768) {
417  // $(".moduls-slider").each(function () {
418  $(".chapter-slider").slick({
419    slidesToShow: 2,
420    slidesToScroll: 1,
421    // adaptiveHeight: true,
422    arrows: false,
423    nextArrow:
424      '<button class="arrows t2 slideNext"><img src="./assets/img/moduls/arrn.png" alt=""></button>',
425    prevArrow:
426      '<button class="arrows t2  slidePrev"><img src="./assets/img/moduls/arrl.png" alt=""></button>',
427    dots: true,
428    responsive: [
429      {
430        breakpoint: 767,
431        settings: {
432          slidesToShow: 2,
433          autoplay: false,
434          autoplay: true,
435          autoplaySpeed: 3000,
436        },
437      },
438      {
439        breakpoint: 567,
440        settings: {
441          slidesToShow: 1,
442          autoplay: false,
443          autoplay: true,
444          autoplaySpeed: 3000,
445        },
446      },
447    ],
448  });
449
450  $(".functions-cont").slick({
451    slidesToShow: 2,
452    slidesToScroll: 1,
453    // adaptiveHeight: true,
454    arrows: false,
455    nextArrow:
456      '<button class="arrows t2 slideNext"><img src="./assets/img/moduls/arrn.png" alt=""></button>',
457    prevArrow:
458      '<button class="arrows t2  slidePrev">
458<img src="./assets/img/moduls/arrl.png" alt=""></button>',
459    dots: true,
460    responsive: [
461      {
462        breakpoint: 767,
463        settings: {
464          slidesToShow: 2,
465          autoplay: false,
466        },
467      },
468      {
469        breakpoint: 567,
470        settings: {
471          slidesToShow: 1,
472          autoplay: false,
473        },
474      },
475    ],
476  });
477  // });
478}
479
480var lazyLoadInstance = new LazyLoad({
481  elements_selector: ".lazy",
482});
483
484$("input[name='case3']").on("input", function () {
485  const parentInput = $(this).parents("form");
486  if ($(this).hasClass("ws")) {
487    parentInput
488      .find(".inp-enp-ph")
489      .attr("placeholder", "Ваш телефон в WhatsApp");
490    parentInput.find(".eml").hide().removeAttr("required");
491  } else if ($(this).hasClass("tg")) {
492    parentInput
493      .find(".inp-enp-ph")
494      .attr("placeholder", "Ваш телефон в Telegram");
495    parentInput.find(".eml").hide().removeAttr("required");
496  } else if ($(this).hasClass("vb")) {
497    parentInput.find(".inp-enp-ph").attr("placeholder", "Ваш телефон в Viber");
498    parentInput.find(".eml").hide().removeAttr("required");
499  } else if ($(this).hasClass("tel")) {
500    parentInput.find(".inp-enp-ph").attr("placeholder", "Ваш номер телефона");
501    parentInput.find(".eml").hide().removeAttr("required");
502  } else if ($(this).hasClass("email")) {
503    parentInput.find(".inp-enp-ph").attr("placeholder", "Ваш номер телефона");
504    parentInput.find(".eml").fadeIn().attr("required", true);
505  }
506});
507
508if ($("body").find(".house-hover").length > 0) {
509  $(".house-hover").hover(
510    function () {
511      $(".house-hover").removeClass("active");
512    },
513    function () {
514      // out
515    }
516  );
517}
518
519if ($("body").find(".life-hover").length > 0) {
520  $(".life-hover").hover(
521    function () {
522      $(this).parent().find(".life-hover").removeClass("active");
523    },
524    function () {
525      // out
526    }
527  );
528}
529
530function get_cookie(cookie_name) {
531  var results = document.cookie.match(
532    "(^|;) ?" + cookie_name + "=([^;]*)(;|$)"
533  );
534
535  if (results) return unescape(results[2]);
536  else return null;
537}
538$(".btn--burger-wrapper").on("click", function (event) {
539  event.preventDefault();
540  $(".right-menu").toggleClass("active");
541  $(".btn--burger-wrapper").toggleClass("active");
542});
543
544var cookiesTest5 = get_cookie("test5");
545if (cookiesTest5 !== "" && cookiesTest5 !== null) {
546} else {
547  // console.log(1);
548  setTimeout(() => {
549    $(".t3d-box").fadeIn();
550    var date5 = new Date();
551    date5.setDate(date5.getDate() + 7);
552    date5 = date5.toUTCString();
553    document.cookie = "test5=1;expires=" + date5;
554  }, 15000);
555}

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.