PageSourceSearch

https://babydentist.tw/static/js/aten/edm.js?1790866157

js babydentist.tw collected 2026-10-07 22:20:41 UTC 2,264 bytes, 105 lines download raw bytes

1$(function()
2{
3	// 關閉側邊欄的 EDM 訂閱
4	$(".fixed-bottom-popup .close-btn").click(function ()
5	{
6		$(this).parents(".fixed-bottom-popup").fadeOut("fast");
7		$.cookie('edm_subscription_sidebar', 'closed', { expires: 365 });
8	});
9
10	var status							= $.cookie('edm_subscription_sidebar');
11	// console.log('edm_subscription_sidebar:' + status);
12	if(status==undefined)
13	{
14		$.cookie('edm_subscription_sidebar', 'opened', { expires: 365 });
15		status							= 'opened';
16	}
17	if(status=='opened')
18		$('#edm_subscription_sidebar').show();
19});
20
21function submit_edm_subscription_email(obj_id)
22{
23	var email							= $('#' + obj_id).val();
24	var url								= $('#' + obj_id).data('url');
25
26	if(email.length==0)
27	{
28		swal(t('Please fill in your email'));
29		return;
30	}
31	$.post(url,
32	{
33		email:							email
34	}, function(res)
35	{
36		if(res=='ok')
37		{
38			$('#' + obj_id).val('');
39			swal(t('Subscribed successfully'));
40		}
41		else if(res=='err:email_format')
42		{
43			swal(t('The email format is incorrect'));
44		}
45		else
46		{
47			swal(t('Server error'));
48		}
49	});
50}
51
52$('#unsubscribe_edm').bind('click', function()
53{
54	unsubscribe_edm_submit();
55})
56
57function unsubscribe_edm_submit()
58{
59	var email							= $('input[name=email]').val();
60	var redir_url						= $('#unsubscribe_edm').data('redir-url');
61	var submit_url						= $('#unsubscribe_edm').data('submit-url');
62	var site_key						= $('#unsubscribe_edm').data('sitekey');
63
64	if(email.length==0)					{ swal(t('Please provide your email address'));				return; }
65
66	aten_recaptcha_execute(site_key, 'submit', function(captcha)
67	{
68		$.post(submit_url,
69		{
70			email:						email,
71			captcha:					captcha,
72		}, function(res)
73		{
74			if(res=='ok')
75			{
76				swal({
77					title:					t('Newsletter'),
78					text:					t('You have been unsubscribed'),
79					type:					"success",
80				}).then(function(result) {
81					window.location			= redir_url;
82				});
83			}
84			else if(res=='err:captcha')
85			{
86				swal({
87					title:	"Resend Verification Letter",
88					text:	t('CAPTCHA verification failed'),
89					type:	"error",
90				}).then(function(result) {
91					// location.reload();
92				});
93			}
94			else
95			{
96				swal({
97					title:	"Resend Verification Letter",
98					text:	"Server Error",
99					type:	"error",
100				}).then(function(result) {
101				});
102			}
103		});
104	});
105}

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.