PageSourceSearch

https://ssupl.com/data/skin/front/19-07_C/js/gd_sns.js

js ssupl.com collected 2026-10-09 23:37:50 UTC 3,869 bytes, 107 lines download raw bytes

1/**
2 * Created by yjwee on 2016-07-27.
3 */
4$(document).ready(function () {
5    var $facebookLoginBtn = $('.js_btn_facebook_login');
6    var $facebookReAuthenticationBtn = $('.js_btn_facebook_re_auth');
7
8    if ($facebookLoginBtn.length > 0) {
9        $facebookLoginBtn.click(function () {
10            var url = $(this).data('facebook-url');
11            if (typeof url !== 'undefined') {
12                var win = gd_popup({
13                    url: url, target: "facebookLogin", width: 400, height: 300, resizable: "no", scrollbars: "no"
14                });
15                win.focus();
16                return win;
17            }
18        });
19    }
20    if ($facebookReAuthenticationBtn.length > 0) {
21        var url = $facebookReAuthenticationBtn.data('re-authentication-url');
22        if (typeof url !== 'undefined') {
23            $facebookReAuthenticationBtn.click(function () {
24                var win = gd_popup({
25                    url: url, target: "facebookReAuthentication", width: 400, height: 300, resizable: "no", scrollbars: "no"
26                });
27                win.focus();
28                return win;
29            });
30        }
31    }
32
33    var $snsConnectBtn = $('.js_btn_sns_connect');
34
35    if ($snsConnectBtn.length > 0) {
36        $snsConnectBtn.click(function () {
37            var url, win;
38            if ($(this).data('sns') == 'facebook') {
39                url = $(this).data('facebook-url');
40                if (typeof url !== 'undefined') {
41                    win = gd_popup({
42                        url: url, target: "facebookLogin", width: 400, height: 300, resizable: "no", scrollbars: "no"
43                    });
44                    win.focus();
45                    return win;
46                }
47            }
48        });
49    }
50
51    if (typeof snsConnection !== 'undefined') {
52        var $disconnectBtn = $('.js_btn_sns_disconnect');
53
54        if ($disconnectBtn.length > 0) {
55            $disconnectBtn.click(function () {
56                var $ajax, url;
57                if ($(this).data('sns') == 'facebook') {
58                    if (confirm(__('계정 연결을 해제하시겠습니까?'))) {
59                        url = $(this).data('facebook-url');
60                        $ajax = $.ajax(url);
61                        $ajax.done(function (response) {
62                            alert(response.message);
63                            if (response.url) {
64                                window.location.href = response.url;
65                            }
66                        });
67                    }
68                }
69            });
70        }
71    }
72
73    if (typeof thirdPartyProfile !== 'undefined') {
74        if (thirdPartyProfile.email) {
75            $('#memId').val(thirdPartyProfile.email);
76            var $email = $('#email');
77            if ($email.length > 0) {
78                $email.val(thirdPartyProfile.email);
79            }
80        }
81        if (thirdPartyProfile.name) {
82            $('input[name="memNm"]').val(thirdPartyProfile.name);
83        }
84        if (thirdPartyProfile.gender) {
85            var $sexFl = $(':radio[name="sexFl"]');
86            if ($sexFl.length > 0) {
87                var $checkedSexFl = $sexFl.filter('*[value="' + thirdPartyProfile.gender + '"]');
88                $checkedSexFl.prop('checked', true);
89                $checkedSexFl.next('label').addClass('on');
90            }
91        }
92        var $memPw = $('input[name="memPw"]');
93        if ($memPw.length > 0) {
94            $memPw.addClass('ignore');
95        }
96        var $memPwRe = $('input[name="memPwRe"]');
97        if ($memPwRe.length > 0) {
98            $memPwRe.addClass('ignore');
99        }
100    }
101});
102
103function confirmJoin(message, location) {
104    if (confirm(message)) {
105        window.location.href = location;
106    }
107}

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.