PageSourceSearch

https://ebc.net.tw/bundles/login?v=hZBCLXsA_dFhRvr3kQwdPRXcFy7SeDQMGsAKEvUc72I1

js ebc.net.tw collected 2026-10-01 10:40:24 UTC 14,037 bytes, 307 lines download raw bytes

1/* Minification failed. Returning unminified contents.
2(49,51-59): run-time error JS1006: Expected ')': function
3(49,62): run-time error JS1004: Expected ';'
4(221,31): run-time error JS1004: Expected ';'
5(270,2-3): run-time error JS1195: Expected expression: )
6 */
7$(document).ready(function () {
8    //FB API (先建立好 fb 根元素後再嵌入 fb sdk)
9    $('body').append('<div id="fb-root"></div>').ready(function (d, s, id) {
10        var js, fjs = d.getElementsByTagName(s)[0];
11        if (d.getElementById(id)) return;
12        js = d.createElement(s); js.id = id;
13        js.src = "https://connect.facebook.net/zh_TW/sdk.js";
14        fjs.parentNode.insertBefore(js, fjs);
15    }(document, 'script', 'facebook-jssdk'));
16
17    window.fbAsyncInit = function () {
18        FB.init({
19            appId: '117546701661897',
20            cookie: true, // enable cookies to allow the server to access the session
21            xfbml: true,  // parse social plugins on this page
22            version: 'v12.0'
23        });
24    };
25});
26
27$(window).on("load", function () {
28    var $host = window.location.host;
29
30    AppleID.auth.init({
31        clientId: 'tw.net.ebc',
32        scope: 'name email',    //權限範圍
33        redirectURI: 'https://' + $host + '/User/AppleAuth',    //Apple Services ID裡設定的驗證網址,要同domain
34        //因為登入為彈出視窗無法帶入RequestVerificationToken,故不加了
35        //state: $('input[name=__RequestVerificationToken]').val(),   //可指定任意值,會原封不動地返回這個值,可通過它做驗證, 選填
36        usePopup: true    //以彈出視窗方式顯示,選填
37    });
38});
39
40//document.addEventListener('AppleIDSignInOnSuccess', (data) => {
41//    //Apple ID登入成功時回傳
42//    //console.log(data.detail.authorization);
43//    //console.log(data.detail.user);
44//});
45//document.addEventListener('AppleIDSignInOnFailure', (error) => {
46//    //關閉或取消視窗時回傳
47//    //console.log('AppleIDSignInOnFailure:' + error.detail.error); //error.detail={error: "popup_closed_by_user"}
48//});
49
50function Captcha(id) {
51    $("#" + id).attr("src", "/Scripts/captcha/get.ashx?r=" + Math.random());
52    return false;
53}
54
55$('body').on("click", "input.message_btn2", async function () {
56    //    regAccount = /^[A-Za-z0-9]{4,12}$/,
57    //    regEmail = /^[^\s]+@[^\s]+\.[^\s]+$/;
58    var $emailCheck = /^[a-zA-Z\d]([\.\-\+_]?[a-zA-Z\d])*@[a-zA-Z\d]([\-]?[a-zA-Z\d])*(\.[a-zA-Z\d]*)+$/;
59    var $type = $(this).data("type");
60    var $check = encodeURI(encodeURIComponent($.trim($("#ebc_check").val())));
61
62    if ($type == "ebc" || $type == "ebc_forget") {
63        if ($check.length == 0) {
64            alert("請填寫驗證碼");
65            $("#ebc_check").focus();
66        }
67        else {
68            $.ajax({
69                url: '/Scripts/captcha/check.ashx',
70                type: "POST",
71                data: { value: $check },
72                success: function (result) {
73                    if (result === "N") {
74                        alert("驗證碼錯誤或已失效,請重新輸入");
75                        Captcha('captcha');
76                        $("#ebc_check").val('');
77                        $("#ebc_check").focus();
78                    }
79                    else {
80                        if ($type == "ebc") {
81                            var $acc = $.trim($("#ebc_acc").val());
82                            var $pwd = $.trim($("#ebc_pwd").val());
83
84                            if ($acc.length == 0 || $pwd.length == 0) {
85                                alert("請填寫帳號密碼");
86                                Captcha('captcha');
87                                $("#ebc_check").val('');
88                            }
89                            else if (!$emailCheck.test($acc)) {
90                                alert("帳號為電子信箱,請確認填寫正確");
91                                $("#ebc_acc").focus();
92                                Captcha('captcha');
93                                $("#ebc_check").val('');
94                            }
95                            else {
96                                $.ajax({
97                                    url: '/User/Login',
98                                    type: "POST",
99                                    data: {
100                                        captcha: $check,
101                                        account: encodeURI(encodeURIComponent($acc)),
102                                        password: encodeURI(encodeURIComponent($pwd)),
103                                        rememberme: $("#remember").prop("checked")
104                                    },
105                                    success: function (data) {
106                                        if (data.result)
107                                            window.location.reload(true);
108                                        else {
109                                            alert(data.message);
110                                            Captcha('captcha');
111                                            $("#ebc_check").val('');
112                                        }
113                                    },
114                                    error: function (result) {
115                                        alert("登入失敗,請再試一次");
116                                        Captcha('captcha');
117                                        $("#ebc_check").val('');
118                                    }
119                                });
120                            }
121                        }
122                        else {
123                            //var _email = $("#forget_email"),
124                            //_check = $("#forget_captcha_input");
125                            var $email = $.trim($("#forget_email").val());
126
127                            //if ($.trim(_account.val()).length === 0 && $.trim(_email.val()).length === 0) {
128                            //    alert('帳號或Email至少填一個。');
129                            //    return false;
130                            //}
131                            //if (!regAccount.test(_account.val()) && $.trim(_account.val()).length > 0) {
132                            //    alert('請輸入帳號4~12碼數字或英文');
133                            //    $('#forget_acc').focus();
134                            //    return false;
135                            //}
136                            if ($email.length == 0 && !$emailCheck.test($email)) {
137                                alert("請確認電子信箱填寫正確");
138                                $('#forget_email').focus();
139                                Captcha('captcha');
140                                $("#ebc_check").val('');
141                            }
142                            else {
143                                $.ajax({
144                                    url: '/User/Forget',
145                                    type: "POST",
146                                    data: {
147                                        //email: encodeURI(encodeURIComponent($email)),
148                                        account: encodeURI(encodeURIComponent($email)),
149                                        captcha: $check
150                                    },
151                                    success: function (data) {
152                                        if (data.message !== '') {
153                                            alert(data.message);
154                                        }
155                                        if (data.result === 'Y') {
156                                            window.location.reload(true);
157                                        } else {
158                                            Captcha('captcha');
159                                            $("#ebc_check").val('');
160                                        }
161                                    },
162                                    error: function (result) {
163                                        alert("執行失敗,請再試一次");
164                                        Captcha('captcha');
165                                        $("#ebc_check").val('');
166                                    }
167                                });
168                            }
169                        }
170                    }
171                },
172                error: function (result) {
173                    alert("驗證失敗,請再試一次");
174                    Captcha('captcha');
175                    $("#ebc_check").val('');
176                }
177            });
178        }
179    }
180    else if ($type === 'fb') {
181        FB.login(function (response) {
182            if (response.authResponse) {
183                FB.api('/me?fields=id,name,email', function (response) {
184                    if (typeof (response.email) != "undefined" && response.email != null) {
185                        $.ajax({
186                            url: '/User/FBLogin',
187                            type: "POST",
188                            data: {
189                                account: encodeURI(encodeURIComponent(response.email)),
190                                nickname: encodeURI(encodeURIComponent(response.name)),
191                                //gender: response.gender,
192                                //email: encodeURI(encodeURIComponent(response.email)),
193                                //business_token: response.token_for_business,
194                                rememberme: $("#remember").prop("checked")
195                            },
196                            success: function (data) {
197                                if (data.result)
198                                    window.location.reload(true);
199                                else if (data.status == 2) {
200                                    alert(data.message);
201                                    location.href = '/Member/Register';
202                                }
203                                else {
204                                    alert(data.message);
205                                    Captcha('captcha');
206                                    $("#ebc_check").val('');
207                                }
208                            },
209                            error: function () {
210                                alert("登入失敗,請再試一次");
211                                Captcha('captcha');
212                                $("#ebc_check").val('');
213                            }
214                        });
215                    } else {
216                        alert("登入失敗,請確認Facebook是否有Email資料");
217                    }
218                });
219            }
220            else {
221                alert('Facebook授權失敗');
222            }
223        }, { scope: 'email' });
224    }
225    else if ($type === 'apple') {
226        try {
227            const data = await AppleID.auth.signIn();
228            //var $verify = $('input[name=__RequestVerificationToken]').val();
229            //var $state = data.authorization.state;
230            //if ($verify === $state) {
231            var $authData = data.authorization;
232            var $userData = typeof data.user === 'undefined' ? {} : data.user;
233            var $remember = $("#remember").prop("checked");
234
235            $.ajax({
236                url: '/User/AppleLogin',
237                type: "POST",
238                data: {
239                    authorization: $authData,
240                    user: $userData,
241                    rememberme: $remember
242                },
243                success: function (data) {
244                    if (data.result)
245                        window.location.reload(true);
246                    else if (data.status == 2) {
247                        alert(data.message);
248                        location.href = '/Member/Register';
249                    }
250                    else {
251                        alert(data.message);
252                        Captcha('captcha');
253                        $("#ebc_check").val('');
254                    }
255                },
256                error: function () {
257                    alert("登入失敗,請再試一次");
258                    Captcha('captcha');
259                    $("#ebc_check").val('');
260                }
261            });
262            //}
263            //else {
264            //    alert("授權資料驗證失敗,請再試一次");
265            //    Captcha('captcha');
266            //    $("#ebc_check").val('');
267            //}
268
269        } catch (error) {
270            //console.log(error);//{error: "popup_closed_by_user"}
271            alert("授權失敗,請稍後再試");
272            Captcha('captcha');
273            $("#ebc_check").val('');
274        }
275    }
276});
277
278function Login() {
279    var $browser = browserInApp();
280    $.get("/User/Login", function (data) {
281        if (data) {
282            if ($browser == "line" || $browser == "fbav") {
283                //如果有開啟浮動登入視窗則關閉
284                if ($("div.overlay-scale.open").length > 0)
285                    toggleOverlay($("div.overlay-scale.open").attr('id'));
286                //Line或Android FB App需另開瀏覽器
287                alert("為維持良好的瀏覽體驗,將另開瀏覽器載入網頁");
288                openExternalBrowser($browser);
289            }
290            else {
291                $("#login-dialog>div.overlay-login").html('');
292                $("#login-dialog>div.overlay-login").html(data);
293                Captcha('captcha');
294            }
295        }
296        else
297            location.reload(true);
298    });
299}
300
301function Forget() {
302    $.get("/User/Forget", function (data) {
303        $("#login-dialog>div.overlay-login").html('');
304        $("#login-dialog>div.overlay-login").html(data);
305        Captcha('captcha');
306    });
307};

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.