PageSourceSearch

https://weasy.io/_inc/global_assets/builder/apps_helpers/subscriberdiscount/subscriberdiscount.js?version=585

js weasy.io collected 2026-10-10 01:39:06 UTC 5,632 bytes, 130 lines download raw bytes

1function isEmail(email) {
2  var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
3  return regex.test(email);
4}
5$('document').ready(function() {
6	//$.removeCookie('omw_app_subscriberdiscount', { path: '/' }); 
7	if (! $.cookie('omw_app_subscriberdiscount')) {
8	 		 $.ajax({
9					type: "GET",
10		       		url: "/_inc/global_assets/builder/apps_helpers/subscriberdiscount/subscriberdiscount.php?lang="+$('html').attr("iso"),
11					data: "",
12					dataType:"json",
13					success: function(msg){
14						if (msg.status==1) {
15								setTimeout(function(){
16									var el = $( Base64.decode(msg.html) ).css("opacity",0).prependTo("#builder-sections");
17									$("body").css("overflow","hidden");
18									TweenMax.to($(el), .3, {opacity:1, onComplete:
19												function(){
20												}
21									});
22									// EVENTS
23									$("body").on("click",".omw_app_subscriberdiscount .pre_box_close svg", function(e){
24								    	e.preventDefault();
25								    	$.cookie('omw_app_subscriberdiscount', 'viewed', {  path: '/' });
26										TweenMax.to($(el), .3, {opacity:0, onComplete:
27											function(){
28												$(el).remove();
29												$("body").css("overflow","auto");
30											}
31										});
32									});
33									$("body").on("click",".omw_app_subscriberdiscount button", function(e){
34											e.preventDefault();
35
36											var objModal = '<div id="omw-tos-modal-confirm-subscription" uk-modal class="uk-flex-top omw-tos-container">';
37											objModal +='<div class="uk-modal-dialog uk-margin-auto-vertical">';
38											objModal +='<div class="uk-modal-body uk-modal-body-container uk-modal-body-container-subscriber-confirm-container omw-default-font" uk-overflow-auto>';
39											objModal +=translations.i18n["trad94"]
40											objModal +='</div>';
41											objModal +='<div class="uk-modal-footer uk-text-right">';
42											objModal +='<button class="uk-button uk-button-default omw-default-font uk-modal-close" type="button" style="margin-right:10px">'+translations.i18n["trad49"]+'</button>';
43											objModal +='<button class="uk-button uk-button-primary omw-default-font omw-tos-modal-confirm-subscription-btn" type="button" trad='+translations.i18n["trad95"]+'>'+translations.i18n["trad95"]+'</button>';
44											objModal +='</div>';
45											objModal +='</div>';
46											objModal +='</div>';
47
48
49											if  (isEmail($("input#newsletter").val())) {
50													
51												  	if ($("#omw-tos-modal-confirm-subscription").length==0) {
52								            		$("body").append(objModal);
53								            		$(".omw-tos-modal-confirm-subscription-btn").on("click", function(){
54							            					var myBtn = $(this);
55							            					$(myBtn).html("<div uk-spinner='ratio: .5'></div>");
56
57
58							            					// VALIDATE IF WE CAN SUBMIT ADD EMAIL OR RETURN EXISTING EMAIL
59																			$.ajax({
60																				type: "POST",
61																	       		url: "/_inc/global_assets/builder/apps_helpers/subscriberdiscount/subscriberdiscount.php?lang="+$('html').attr("iso"),
62																				data: "email="+$("input#newsletter").val(),
63																				dataType:"json",
64																				success: function(msg){
65																					UIkit.modal("#omw-tos-modal-confirm-subscription").hide();
66																					$(myBtn).html($(myBtn).attr("trad"));
67																					if (msg.confirmation=="false") {
68																						// CONFIRM NOT OK
69																						swal({
70																							  customClass:"sweetSubscriberAlert",
71																			    			  title:"", 
72																			    			  text: translations.i18n["trad25"],
73																			    			  type: "error" 
74																			    			 })
75																					}
76																					else {
77																						// CONFIRM OK
78																						swal({
79																							  customClass:"sweetSubscriberAlert",
80																			    			  title:"", 
81																			    			  html: true,
82																			    			  text: translations.i18n['trad69'],
83																			    			  type: "success" 
84																			    			 }, function(){
85																			    			 		$.cookie('omw_app_subscriberdiscount', 'viewed', { expires: 3650, path: '/' });
86																			    			 		TweenMax.to($(el), .3, {opacity:0, onComplete:
87																										function(){
88																											$(el).remove();
89																											$("body").css("overflow","auto");
90																										}
91																									});
92																			    			 })
93																					}
94																				},
95																				error: function(XMLHttpObj, erroCode) {
96																						}
97																				});
98									  										// VALIDATE IF WE CAN SUBMIT ADD EMAIL OR RETURN EXISTING EMAIL
99
100														
101										        });
102						            	}
103						            	$(".omw-tos-modal-confirm-subscription-btn").show();
104						            	$("#omw-tos-modal-confirm-subscription .uk-modal-close").html(translations.i18n["trad49"]);
105						            	$("#omw-tos-modal-confirm-subscription .uk-modal-body-container ").html(translations.i18n["trad94"]);
106						            	UIkit.modal("#omw-tos-modal-confirm-subscription").show();
107						            	return
108
109													
110
111
112
113											}
114											else {
115											swal({
116												  customClass:"sweetSubscriberAlert",
117								    			  title:"", 
118								    			  text: translations.i18n['trad70'],
119								    			  type: "error" 
120								    			 })
121											}
122										});
123								},1000);
124						}
125					},
126					error: function(XMLHttpObj, erroCode) {
127					}
128			});
129	} // END COOKIE NOT VIEWED*/
130});

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.