|
@@ -148,22 +148,22 @@
|
|
|
// $('#quick-launcher').quick()
|
|
|
// })
|
|
|
|
|
|
- $('#kakao-plus-friend-btn').on('click', function() {
|
|
|
- var channelId = '_aAAGj';
|
|
|
- var appKey = window.apiKey.KAKAO_REST_API_KEY;
|
|
|
- var origin = encodeURIComponent(window.location.origin);
|
|
|
- var referer = encodeURIComponent(window.location.href);
|
|
|
- var kakaoAgent = encodeURIComponent('sdk/2.1.0 os/javascript sdk_type/javascript lang/ko-KR device/Win32 origin/' + origin);
|
|
|
- var redirectUri = `https://pf.kakao.com/${channelId}/chat?api_ver=1.1&kakao_agent=${kakaoAgent}&app_key=${appKey}&referer=${referer}`;
|
|
|
-
|
|
|
- if (Kakao.Auth.getAccessToken()) {
|
|
|
- window.open(redirectUri, '_blank');
|
|
|
- } else {
|
|
|
- Kakao.Auth.authorize({
|
|
|
- redirectUri: redirectUri
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ // $('#kakao-plus-friend-btn').on('click', function() {
|
|
|
+ // var channelId = '_aAAGj';
|
|
|
+ // var appKey = window.apiKey.KAKAO_REST_API_KEY;
|
|
|
+ // var origin = encodeURIComponent(window.location.origin);
|
|
|
+ // var referer = encodeURIComponent(window.location.href);
|
|
|
+ // var kakaoAgent = encodeURIComponent('sdk/2.1.0 os/javascript sdk_type/javascript lang/ko-KR device/Win32 origin/' + origin);
|
|
|
+ // var redirectUri = `https://pf.kakao.com/${channelId}/chat?api_ver=1.1&kakao_agent=${kakaoAgent}&app_key=${appKey}&referer=${referer}`;
|
|
|
+
|
|
|
+ // if (Kakao.Auth.getAccessToken()) {
|
|
|
+ // window.open(redirectUri, '_blank');
|
|
|
+ // } else {
|
|
|
+ // Kakao.Auth.authorize({
|
|
|
+ // redirectUri: redirectUri
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
|
|
|
});
|