PageSourceSearch

https://chinjun.com.tw/js/footer.js

js chinjun.com.tw collected 2026-10-07 22:21:00 UTC 1,737 bytes, 58 lines download raw bytes

1$(document).ready(function () {
2
3  var cheerShopUI = new CheerShopUI();
4  
5  var activeCouponCode = function (activeCode) {
6    if (!activeCode || typeof(activeCode) !== 'string' && activeCode.length === 0) {
7      cheerShopUI.dialog({
8        title: '訊息',
9        message: '請輸入優惠代碼',
10        btnText: '關閉'
11      });
12    } else {
13      cheerShopSDK.activeCoupon(activeCode, function (error, result, statusCode) {
14        if (statusCode === 201) {
15          cheerShopUI.dialog({
16            title: '訊息',
17            message: '優惠卷領取完成',
18            btnText: '關閉'
19          });
20        } else if (statusCode === 409) {
21          cheerShopUI.dialog({
22            title: '訊息',
23            message: '優惠代碼已經領取過囉',
24            btnText: '關閉'
25          });
26        } else if (statusCode === 404) {
27          cheerShopUI.dialog({
28            title: '訊息',
29            message: '優惠代碼不正確',
30            btnText: '關閉'
31          });
32        } else if (statusCode === 401) {
33          cheerShopUI.dialog({
34            title: '訊息',
35            message: '請先登入會員',
36            btnText: '關閉'
37          });
38        }
39        if (typeof(COUPON_CALLBACK) === 'function') {
40          COUPON_CALLBACK(error, result, statusCode);
41        }
42      });
43    }
44  };
45
46  // 領卷
47  $('.btn-coupon-active').click(function () {
48    var activeCode = $(this).parents('div:first').find('input.coupon-active-code').val();
49    activeCouponCode(activeCode);
50  });
51
52  // onfocus
53  $('.coupon-active-code').blur(function () {
54    var activeCode = $(this).val();
55    activeCouponCode(activeCode);
56  });
57  
58});

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.