PageSourceSearch

https://www.tnkn.fun/board/assets/js/sns.js

js tnkn.fun collected 2026-10-06 04:01:16 UTC 2,528 bytes, 104 lines download raw bytes

1//http://dev.epiloum.net/916
2
3function sendSns(sns, url, txt) {
4	var o;
5	var _url = encodeURIComponent(url);
6	var _txt = encodeURIComponent(txt);
7	var _br = encodeURIComponent('\r\n');
8
9	switch(sns) {
10		case 'facebook':
11			o = {
12				method:'popup',
13				url:'http://www.facebook.com/sharer/sharer.php?u=' + _url
14			};
15			break;
16
17		case 'twitter':
18			o = {
19				method:'popup',
20				url:'http://twitter.com/intent/tweet?text=' + _txt + '&url=' + _url
21			};
22			break;
23
24		case 'me2day':
25			o = {
26				method:'popup',
27				url:'http://me2day.net/posts/new?new_post[body]=' + _txt + _br + _url + '&new_post[tags]=epiloum'
28			};
29			break;
30
31		case 'kakaostory':
32			o = {
33				method:'popup',
34				url:'https://story.kakao.com/share?url=' + _url
35			};
36			break;
37
38		case 'band':
39			o = {
40				method:'popup',
41				url:'http://www.band.us/plugin/share?body=' + _txt + _br + _url
42			};
43			break;
44
45		default:
46			alert('지원하지 않는 SNS입니다.');
47			return false;
48	}
49
50	switch(o.method) {
51		case 'popup':
52			window.open(o.url,'snspopup','width=500, height=400, menubar=no, status=no, toolbar=no');
53			break;
54
55		case 'web2app':
56			if (navigator.userAgent.match(/android/i))
57			{
58				// Android
59				setTimeout(function(){ location.href = 'intent://' + o.param + '#Intent;' + o.g_proto + ';end'}, 100);
60			}
61			else if (navigator.userAgent.match(/(iphone)|(ipod)|(ipad)/i))
62			{
63				// Apple
64				setTimeout(function(){ location.href = o.a_store; }, 200);
65				setTimeout(function(){ location.href = o.a_proto + o.param }, 100);
66			}
67			else
68			{
69				alert('이 기능은 모바일에서만 사용할 수 있습니다.');
70			}
71			break;
72	}
73}
74
75function kakaolink_send(text, url, img, img_w, img_h) {
76
77	if ( ! img) img = '';
78	if ( ! img_w) img_w = 300;
79	if ( ! img_h) img_h = 200;
80
81	// 카카오톡 링크 버튼을 생성합니다. 처음 한번만 호출하면 됩니다.
82	if (img) {
83		Kakao.Link.sendTalkLink({
84		 label: String(text),
85		 image: {
86			src: img,
87			width: img_w,
88			height: img_h
89		 },
90		 webButton: {
91			text: String('자세히 보기'), //카톡 링크시 타이틀
92			url : url // 앱 설정의 웹 플랫폼에 등록한 도메인의 URL이어야 합니다.
93		 }
94		});
95	} else {
96		Kakao.Link.sendTalkLink({
97		 label: String(text),
98		 webButton: {
99			text: String('자세히 보기'), //카톡 링크시 타이틀
100			url : url // 앱 설정의 웹 플랫폼에 등록한 도메인의 URL이어야 합니다.
101		 }
102		});
103	}
104}

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.