PageSourceSearch

https://www.pinglighting.com/modules/nrtpopupnewsletter/views/js/front.js

js pinglighting.com collected 2026-10-06 18:27:14 UTC 2,042 bytes, 71 lines download raw bytes

1$(document).ready(function (e) {
2	if(opPopUp.pp_start){
3		setTimeout(function() {
4			$('.modal').modal('hide');
5			prestashop.emit('hidden_canvas_widget', null);
6			$("#moda_popupnewsletter").modal({show: true});
7		}, opPopUp.time_dl);
8	}
9	
10	$('.ajax-newsletter').on('submit', function (e) {
11		e.preventDefault();
12		subscribe_newlleter($(this));
13	});
14	
15	$('body').on('hidden.bs.modal','#moda_popupnewsletter',(function() {
16		if($('#newsletter_popup_dont_show_again').is(':checked')){
17			setcookiepopup();
18		}
19	}));
20	
21	$('body').on('click','.js-open-newsletter',(function(event) {
22		event.preventDefault();
23		$("#moda_popupnewsletter").modal({show: true});
24	}));
25});
26
27function setcookiepopup() {
28  var name = 'has_cookiepopup';
29  var value = '1';
30  var expire = new Date();
31  expire.setMonth(expire.getMonth()+12);
32  document.cookie = name + "=" + escape(value) +";path=/;" + ((expire==null)?"" : ("; expires=" + expire.toGMTString()))
33}
34
35function subscribe_newlleter($el){
36	
37	if($el.hasClass("pp-processing")){
38		return;
39	}
40	
41	$el.addClass("pp-processing");
42	
43	$.ajax({
44		type: 'POST',
45		dataType: 'JSON',
46		cache: false,		
47		data: $el.serialize(),
48		url: opPopUp.ajax,		
49		beforeSend: function(){
50			$el.find('[name=submitNewsletter]').addClass('processing');
51			$el.find(".send-response").html('');
52		},
53		complete: function() {
54			$el.removeClass("pp-processing");
55			$el.find('[name=submitNewsletter]').removeClass('processing');
56		},
57		success: function(data) {
58			if (data.nw_error) {
59				$el.find(".send-response").html('<p class="alert alert-danger block_newsletter_alert">' + data.msg + '</p>');
60			} else {
61				$el.find(".send-response").html('<p class="alert alert-success block_newsletter_alert">' + data.msg + '</p>');
62				$el.find("[name=email]").val('');
63				$el.find('[type="submit"]').attr('disabled', 'disabled');
64				$el.find("[name=psgdpr_consent_checkbox]").prop( "checked", false );
65			}
66		},
67		error: function (err) {
68			console.log(err);
69		}
70	});
71}

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.