1$(document).ready(function () { 2 3 $(document).on('hidden.bs.modal', function (event) { 4 if ($('.modal:visible').length) { 5 $('body').addClass('modal-open'); 6 } 7 }); 8 9 /*show/hide password*/ 10 $(".show-hide__pass").on('click', function (e) { 11 e.preventDefault(); 12 $(this).toggleClass("show"); 13 var input = $($(this).prev()); 14 if (input.attr("type") == "password") { 15 input.attr("type", "text"); 16 } else { 17 input.attr("type", "password"); 18 } 19 }); 20 21 $(".phone-box .select2").on('click', function (e) { 22 e.preventDefault(); 23 $(this).parent().closest('.input-phone-inner').find('#input_phone').toggleClass('.select-highlight'); 24 }); 25 26 $('#recovery_container .btn-back').on("click", function (e) { 27 e.preventDefault(); 28 $("#recovery_box").modal("hide"); 29 $('#sign_in').modal("show"); 30 }); 31 32 if (typeof jQuery === 'undefined') { 33 throw new Error('Bootstrap\'s JavaScript requires jQuery') 34} 35+function ($) { 36 'use strict'; 37 var version = $.fn.jquery.split(' ')[0].split('.') 38 if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) { 39 throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher') 40 } 41}(jQuery); 42 43+function ($) { 44 'use strict'; 45 46 // MODAL CLASS DEFINITION 47 // ====================== 48 49 var Modal = function (element, options) { 50 this.options = options 51 this.$body = $(document.body) 52 this.$element = $(element) 53 this.$dialog = this.$element.find('.modal-dialog') 54 this.$backdrop = null 55 this.isShown = null 56 this.originalBodyPad = null 57 this.scrollbarWidth = 0 58 this.ignoreBackdropClick = false 59 60 if (this.options.remote) { 61 this.$element 62 .find('.modal-content') 63 .load(this.options.remote, $.proxy(function () { 64 this.$element.trigger('loaded.bs.modal') 65 }, this)) 66 } 67 } 68 69 Modal.VERSION = '3.3.4' 70 71 Modal.TRANSITION_DURATION = 300 72 Modal.BACKDROP_TRANSITION_DURATION = 150 73 74 Modal.DEFAULTS = { 75 backdrop: true, 76 keyboard: true, 77 show: true 78 } 79 80 Modal.prototype.toggle = function (_relatedTarget) { 81 return this.isShown ? this.hide() : this.show(_relatedTarget) 82 } 83 84 Modal.prototype.show = function (_relatedTarget) { 85 var that = this 86 var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget }) 87 88 this.$element.trigger(e) 89 90 if (this.isShown || e.isDefaultPrevented()) return 91 92 this.isShown = true 93 94 this.checkScrollbar() 95 this.setScrollbar() 96 this.$body.addClass('modal-open') 97 98 this.escape() 99 this.resize() 100 101 this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this)) 102 103 this.$dialog.on('mousedown.dismiss.bs.modal', function () { 104 that.$element.one('mouseup.dismiss.bs.modal', function (e) { 105 if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true 106 }) 107 }) 108 109 this.backdrop(function () { 110 var transition = $.support.transition && that.$element.hasClass('fade') 111 112 if (!that.$element.parent().length) { 113 that.$element.appendTo(that.$body) // don't move modals dom position 114 } 115 116 that.$element 117 .show() 118 .scrollTop(0) 119 120 that.adjustDialog() 121 122 if (transition) { 123 that.$element[0].offsetWidth // force reflow 124 } 125 126 that.$element 127 .addClass('in') 128 .attr('aria-hidden', false) 129 130 that.enforceFocus() 131 132 var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget }) 133 134 transition ? 135 that.$dialog // wait for modal to slide in 136 .one('bsTransitionEnd', function () { 137 that.$element.trigger('focus').trigger(e) 138 }) 139 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 140 that.$element.trigger('focus').trigger(e) 141 }) 142 } 143 144 Modal.prototype.hide = function (e) { 145 if (e) e.preventDefault() 146 147 e = $.Event('hide.bs.modal') 148 149 this.$element.trigger(e) 150 151 if (!this.isShown || e.isDefaultPrevented()) return 152 153 this.isShown = false 154 155 this.escape() 156 this.resize() 157 158 $(document).off('focusin.bs.modal') 159 160 this.$element 161 .removeClass('in') 162 .attr('aria-hidden', true) 163 .off('click.dismiss.bs.modal') 164 .off('mouseup.dismiss.bs.modal') 165 166 this.$dialog.off('mousedown.dismiss.bs.modal') 167 168 $.support.transition && this.$element.hasClass('fade') ? 169 this.$element 170 .one('bsTransitionEnd', $.proxy(this.hideModal, this)) 171 .emulateTransitionEnd(Modal.TRANSITION_DURATION) : 172 this.hideModal() 173 } 174 175 Modal.prototype.enforceFocus = function () { 176 $(document) 177 .off('focusin.bs.modal') // guard against infinite focus loop 178 .on('focusin.bs.modal', $.proxy(function (e) { 179 if (this.$element[0] !== e.target && !this.$element.has(e.target).length) { 180 this.$element.trigger('focus') 181 } 182 }, this)) 183 } 184 185 Modal.prototype.escape = function () { 186 if (this.isShown && this.options.keyboard) { 187 this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
188 e.which == 27 && this.hide() 189 }, this)) 190 } else if (!this.isShown) { 191 this.$element.off('keydown.dismiss.bs.modal') 192 } 193 } 194 195 Modal.prototype.resize = function () { 196 if (this.isShown) { 197 $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this)) 198 } else { 199 $(window).off('resize.bs.modal') 200 } 201 } 202 203 Modal.prototype.hideModal = function () { 204 var that = this 205 this.$element.hide() 206 this.backdrop(function () { 207 that.$body.removeClass('modal-open') 208 that.resetAdjustments() 209 that.resetScrollbar() 210 that.$element.trigger('hidden.bs.modal') 211 }) 212 } 213 214 Modal.prototype.removeBackdrop = function () { 215 this.$backdrop && this.$backdrop.remove() 216 this.$backdrop = null 217 } 218 219 Modal.prototype.backdrop = function (callback) { 220 var that = this 221 var animate = this.$element.hasClass('fade') ? 'fade' : '' 222 223 if (this.isShown && this.options.backdrop) { 224 var doAnimate = $.support.transition && animate 225 226 this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />') 227 .appendTo(this.$body) 228 229 this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) { 230 if (this.ignoreBackdropClick) { 231 this.ignoreBackdropClick = false 232 return 233 } 234 if (e.target !== e.currentTarget) return 235 this.options.backdrop == 'static' 236 ? this.$element[0].focus() 237 : this.hide() 238 }, this)) 239 240 if (doAnimate) this.$backdrop[0].offsetWidth // force reflow 241 242 this.$backdrop.addClass('in') 243 244 if (!callback) return 245 246 doAnimate ? 247 this.$backdrop 248 .one('bsTransitionEnd', callback) 249 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : 250 callback() 251 252 } else if (!this.isShown && this.$backdrop) { 253 this.$backdrop.removeClass('in') 254 255 var callbackRemove = function () { 256 that.removeBackdrop() 257 callback && callback() 258 } 259 $.support.transition && this.$element.hasClass('fade') ? 260 this.$backdrop 261 .one('bsTransitionEnd', callbackRemove) 262 .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) : 263 callbackRemove() 264 265 } else if (callback) { 266 callback() 267 } 268 } 269 270 // these following methods are used to handle overflowing modals 271 272 Modal.prototype.handleUpdate = function () { 273 this.adjustDialog() 274 } 275 276 Modal.prototype.adjustDialog = function () { 277 var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight 278 279 this.$element.css({ 280 paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '', 281 paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : '' 282 }) 283 } 284 285 Modal.prototype.resetAdjustments = function () { 286 this.$element.css({ 287 paddingLeft: '', 288 paddingRight: '' 289 }) 290 } 291 292 Modal.prototype.checkScrollbar = function () { 293 var fullWindowWidth = window.innerWidth 294 if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8 295 var documentElementRect = document.documentElement.getBoundingClientRect() 296 fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left) 297 } 298 this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth 299 this.scrollbarWidth = this.measureScrollbar() 300 } 301 302 Modal.prototype.setScrollbar = function () { 303 var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10) 304 this.originalBodyPad = document.body.style.paddingRight || '' 305 if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth) 306 } 307 308 Modal.prototype.resetScrollbar = function () { 309 this.$body.css('padding-right', this.originalBodyPad) 310 } 311 312 Modal.prototype.measureScrollbar = function () { // thx walsh 313 var scrollDiv = document.createElement('div') 314 scrollDiv.className = 'modal-scrollbar-measure' 315 this.$body.append(scrollDiv) 316 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth 317 this.$body[0].removeChild(scrollDiv) 318 return scrollbarWidth 319 } 320 321 322 // MODAL PLUGIN DEFINITION 323 // ======================= 324 325 function Plugin(option, _relatedTarget) { 326 return this.each(function () { 327 var $this = $(this) 328 var data = $this.data('bs.modal') 329 var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option) 330 331 if (!data) $this.data('bs.modal', (data = new Modal(this, options))) 332 if (typeof option == 'string') data[option](_relatedTarget) 333 else if (options.show) data.show(_relatedTarget) 334 }) 335 } 336 337 var old = $.fn.modal 338 339 $.fn.modal = Plugin 340 $.fn.modal.Constructor = Modal 341 342 343 // MODAL NO CONFLICT 344 // ================= 345 346 $.fn.modal.noConflict = function () { 347 $.fn.modal = old 348 return this 349 } 350 351 352 // MODAL DATA-API 353 // ============== 354 355 $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) { 356 var $this = $(this) 357 var href = $this.attr('href') 358 var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7 359 var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data()) 360 361 if ($this.is('a')) e.preventDefault() 362 363 $target.one('show.bs.modal', function (showEvent) { 364 if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown 365 $target.one('hidden.bs.modal', function () { 366 $this.is(':visible') && $this.trigger('focus') 367 }) 368 }) 369 Plugin.call($target, option, this) 370 }) 371 372}(jQuery); 373 374 const REGISTRATION_FORM = $("#registration_form"); 375 376 377 REGISTRATION_FORM.submit(function(e){ 378 e.preventDefault(); 379 let timezone = new Date().getTimezoneOffset() / 60 * -1; 380 let data = REGISTRATION_FORM.serialize()+'&timezone='+timezone; 381 REGISTRATION_FORM.find('input').removeClass('alert-control'); 382 REGISTRATION_FORM.find('[error]').text(''); 383 let url = '/ai-generator/registration' 384 let reg_form = document.querySelector('#registration_form'); 385 REGISTRATION_FORM.find('[type="submit"]').removeClass('no-active'); 386 $.ajax({ 387 type: "POST", 388 url: url, 389 data: data, 390 dataType: 'json', 391 success: function(data){ 392 if(data && data.error){ 393 for (const [key, value] of Object.entries(data.error)) { 394 let element = reg_form.querySelector("[name='"+key+"']"); 395 if(element){ 396 element.classList.add("alert-control"); 397 } 398 let error_place = reg_form.querySelector("[error='"+key+"']"); 399 if(error_place){ 400 error_place.textContent = value; 401 } 402 } 403 }else if(data && data.redirect_url){ 404 window.location.href = data.redirect_url; 405 }else{ 406 window.location.href = '/ai-generator'; 407 } 408 REGISTRATION_FORM.find('[type="submit"]').removeClass('no-active'); 409 }, 410 error: function(data){ 411 412 } 413 }); 414 }); 415 416 const LOGIN_FORM = $("#login_form"); 417 418 LOGIN_FORM.submit(function(e){ 419 e.preventDefault(); 420 let data = LOGIN_FORM.serialize(); 421 LOGIN_FORM.find('input').removeClass('alert-control'); 422 LOGIN_FORM.find('[type="submit"]').addClass('no-active'); 423 LOGIN_FORM.find('[error]').text(''); 424 let url = '/ai-generator/login' 425 let log_form = document.querySelector('#login_form'); 426 $.ajax({ 427 type: "POST", 428 url: url, 429 data: data, 430 dataType: 'json', 431 success: function(data){ 432 if(data && data.error){ 433 for (const [key, value] of Object.entries(data.error)) { 434 let element = log_form.querySelector("[name='"+key+"']"); 435 if(element){ 436 element.classList.add("alert-control"); 437 } 438 let error_place = log_form.querySelector("[error='"+key+"']"); 439 if(error_place){ 440 error_place.textContent = value; 441 } 442 } 443 }else if(data && data.redirect_url){ 444 window.location.href = data.redirect_url; 445 }else{ 446 window.location.href = '/ai-generator'; 447 } 448 LOGIN_FORM.find('[type="submit"]').removeClass('no-active'); 449 }, 450 error: function(data){ 451 452 } 453 }); 454 }); 455 456 const RECOVERY_PASSWORD_FORM = $("#form_recovery_password"); 457 const RECOVERY_PASSWORD_BLOCK = $("#recovery_container"); 458 const RECOVERY_PASSWORD_BLOCK_SENT = $("#recovery_container-pass"); 459 460 RECOVERY_PASSWORD_FORM.submit(function(e){ 461 e.preventDefault(); 462 let data = RECOVERY_PASSWORD_FORM.serialize(); 463 RECOVERY_PASSWORD_FORM.find('input').removeClass('alert-control'); 464 RECOVERY_PASSWORD_FORM.find('[type="submit"]').addClass('no-active'); 465 RECOVERY_PASSWORD_FORM.find('[error]').text(''); 466 let url = '/ai-generator/forgot_password' 467 let recover_password_form = document.querySelector('#form_recovery_password'); 468 $.ajax({ 469 type: "POST", 470 url: url, 471 data: data, 472 dataType: 'json', 473 success: function(data){ 474 if(data && data.error){ 475 for (const [key, value] of Object.entries(data.error)) { 476 let element = recover_password_form.querySelector("[name='"+key+"']"); 477 if(element){ 478 element.classList.add("alert-control"); 479 } 480 let error_place = recover_password_form.querySelector("[error='"+key+"']"); 481 if(error_place){ 482 error_place.textContent = value; 483 } 484 } 485 }else{ 486 RECOVERY_PASSWORD_BLOCK_SENT.find('.recovery_email').text(data.email); 487 RECOVERY_PASSWORD_BLOCK.hide(); 488 RECOVERY_PASSWORD_BLOCK_SENT.show(); 489 } 490 RECOVERY_PASSWORD_FORM.find('[type="submit"]').removeClass('no-active'); 491 }, 492 error: function(data){ 493 494 } 495 }); 496 }); 497 498 $('#recovery_container-pass .btn-resend').on("click", function (e) { 499 $('.loading').show(); 500 $(this).addClass('disabled'); 501 $('.recovery-btn').css("opacity", 0); 502 RECOVERY_PASSWORD_FORM.trigger('submit'); 503 setTimeout(function () { 504 $('.loading').hide(); 505 $('.recovery-btn').css("opacity", 1); 506 $('#recovery_container-pass .btn-resend').removeClass('disabled'); 507 }, 1500); 508 }); 509 510 const queryString = window.location.search;
511 const urlParams = new URLSearchParams(queryString); 512 const recovery_password_code = urlParams.get('recovery_password_code'); 513 if(recovery_password_code){ 514 let url = '/ai-generator/reset_password/check_code' 515 $.ajax({ 516 type: "POST", 517 url: url, 518 data: {'code':recovery_password_code.trim()}, 519 dataType: 'json', 520 success: function(data){ 521 if(data && data.error){ 522 console.log(data.error); 523 }else{ 524 $('#reset_box').modal('show'); 525 $('#reset_box').find('.recovery_email').text(data.email); 526 527 } 528 }, 529 error: function(data){ 530 } 531 }); 532 } 533 534 const CHANGE_PASSWORD_FORM = $("#form_change_password"); 535 536 CHANGE_PASSWORD_FORM.submit(function(e){ 537 e.preventDefault(); 538 let data = CHANGE_PASSWORD_FORM.serialize(); 539 CHANGE_PASSWORD_FORM.find('input').removeClass('alert-control'); 540 CHANGE_PASSWORD_FORM.find('[type="submit"]').addClass('no-active'); 541 CHANGE_PASSWORD_FORM.find('[error]').text(''); 542 let url = '/ai-generator/reset_password/change_password'; 543 let change_password_form = document.querySelector('#form_change_password'); 544 $.ajax({ 545 type: "POST", 546 url: url, 547 data: data, 548 dataType: 'json', 549 success: function(data){ 550 if(data && data.error){ 551 for (const [key, value] of Object.entries(data.error)) { 552 let element = change_password_form.querySelector("[name='"+key+"']"); 553 if(element){ 554 element.classList.add("alert-control"); 555 } 556 let error_place = change_password_form.querySelector("[error='"+key+"']"); 557 if(error_place){ 558 error_place.textContent = value; 559 } 560 } 561 }else{ 562 $('#recovery_container-reset').hide(); 563 $('#recovery_container-success').show(); 564 } 565 CHANGE_PASSWORD_FORM.find('[type="submit"]').removeClass('no-active'); 566 }, 567 error: function(data){ 568 569 } 570 }); 571 }); 572 573 /* const GOOGLE_LOGIN_BUTTON = $('.google-login-button'); 574 575 GOOGLE_LOGIN_BUTTON.click(function () { 576 googleLogin($(this)); 577 }); 578 579 function googleLogin(button) { 580 let auth2 = gapi.auth2.getAuthInstance(); 581 auth2.signIn().then(function () { 582 let googleUser = gapi.auth2.getAuthInstance().currentUser.get(); 583 let id_token = googleUser.getAuthResponse().id_token; 584 let timezone = new Date().getTimezoneOffset() / 60 * -1; 585 let url = '/ai-generator/registrationGoogle'; 586 let data = {id_token: id_token, timezone: timezone}; 587 $.ajax({ 588 type: "POST", 589 url: url, 590 data: data, 591 dataType: 'json', 592 success: function(data){ 593 594 }, 595 error: function(data){ 596 597 } 598 }); 599 600 }); 601 return true; 602 }*/ 603 604 // $.getScript('//connect.facebook.net/en_US/all.js?v16.0', function() { 605 // if (typeof(FB) != 'undefined' && FB != null) { 606 // FB.init({ 607 // appId : '843609976935668', 608 // xfbml : true, 609 // version : 'v16.0' 610 // }); 611 // } 612 // }); 613 614/* window.fbAsyncInit = function() { 615 FB.init({ 616 appId: '843609976935668', 617 cookie: true, 618 xfbml: true, // Parse social plugins on this webpage. 619 version: 'v16.0' // Use this Graph API version for this call. 620 }); 621 }*/ 622 623 (function(d, s, id){ 624 var js, fjs = d.getElementsByTagName(s)[0]; 625 if (d.getElementById(id)) {return;} 626 js = d.createElement(s); js.id = id; 627 js.src = "https://connect.facebook.net/en_US/sdk.js"; 628 fjs.parentNode.insertBefore(js, fjs); 629 }(document, 'script', 'facebook-jssdk') 630 ); 631 632 633 window.fbAsyncInit = function() { 634 FB.init({ 635 appId : '843609976935668', 636 xfbml : true, 637 version : 'v19.0' 638 }); 639 }; 640 641 const FACEBOOK_LOGIN_BUTTON = $('.facebook-login-button'); 642 643 FACEBOOK_LOGIN_BUTTON.click(function () { 644 facebookLogin($(this)); 645 }); 646 function facebookLogin(button) { 647 FB.login(function (response) { 648 if (response.status === 'connected') { 649 let timezone = new Date().getTimezoneOffset() / 60 * -1; 650 let url = '/ai-generator/registrationFacebook'; 651 let data = {access_token: response.authResponse.accessToken,'timezone':timezone}; 652 $.ajax({ 653 type: "POST", 654 url: url, 655 data: data, 656 dataType: 'json', 657 success: function(data){ 658 if(data && data.error){ 659 //console.log(data.error); 660 }else if(data && data.redirect_url){ 661 window.location.href = data.redirect_url; 662 }else{ 663 window.location.href = '/ai-generator'; 664 } 665 }, 666 error: function(data){ 667 668 } 669 }); 670 671 } 672 }, {scope: 'email,public_profile', return_scopes: true}); 673 } 674 675 const GOOGLE_LOGIN_BUTTON = $('.google-login-button'); 676 677 GOOGLE_LOGIN_BUTTON.click(function () { 678 google.accounts.id.initialize({ 679 client_id: "431245144297-u50fvj86ksicp15pbe2jlmsisbkkff67.apps.googleusercontent.com", 680 callback: googleLogin 681 }); 682 google.accounts.id.prompt(); 683 }); 684 685 function googleLogin(response) { 686 let id_token = response.credential; 687 let timezone = new Date().getTimezoneOffset() / 60 * -1; 688 let url = '/ai-generator/registrationGoogle'; 689 let data = {id_token: id_token, timezone: timezone}; 690 $.ajax({ 691 type: "POST", 692 url: url, 693 data: data, 694 dataType: 'json', 695 success: function(data){ 696 if(data && data.error){ 697 //console.log(data.error); 698 }else if(data && data.redirect_url){ 699 window.location.href = data.redirect_url; 700 }else{ 701 window.location.href = '/ai-generator'; 702 } 703 }, 704 error: function(data){ 705 706 } 707 708 }); 709 } 710 711 $(".link_sign_in").on("click", function(){ 712 $('#sign_in').modal("show"); 713 }); 714 715 $(".link_registration_box").on("click", function(){ 716 $('#registration_box').modal("show"); 717 }); 718 719 if ($(window).width() < 768) { 720 $('.tools_wrapper_ai form.wpeet_ParserForm [type="submit"]').val('Start'); 721 } 722 723 /** 724 * Event handlers on the page "papertyper.net/essay-editor" 725 * to control the modal window 726 */ 727 $('.get-more-words .close-button').click(function() { 728 $('#get_more_words').modal('hide') 729 }) 730 731 $('.get-more-words .btn-submit').click(function() { 732 $('#get_more_words').modal('hide') 733 $('#registration_box').modal('show') 734 }) 735 document.addEventListener('keydown', function(event) { 736 if ((event.ctrlKey || event.metaKey) && event.keyCode === 74) { 737 event.preventDefault(); 738 $('#get_more_words').modal('show') 739 } 740 }); 741 742 743 //dataLayer event 744 745 window.dataLayer = window.dataLayer || []; 746 buttonGenerate = document.querySelector('[data-generate]'); 747 buttonRegister = document.querySelector('[data-register]'); 748 749 document.querySelectorAll('.data-event').forEach(button => { 750 button.addEventListener('click', function () { 751 dataLayer.push({ 752 'event': 'button_click', 753 'button_name': this.innerText.trim() 754 }); 755 }); 756 }); 757 758 if (buttonGenerate) { 759 buttonGenerate.addEventListener('click', function() { 760 dataLayer.push({ 761 'event': 'generate' 762 }); 763 }); 764 } 765 766 if (buttonRegister) { 767 buttonRegister.addEventListener('click', function() { 768 dataLayer.push({ 769 'event': 'click_register' 770 }); 771 }); 772 } 773});
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.