PageSourceSearch

http://thechangeground.com/wp-content/plugins/cosmosfarm-share-buttons/js/cosmosfarm-share-buttons.js?ver=1.8

js thechangeground.com collected 2026-10-06 03:20:43 UTC 3,604 bytes, 89 lines download raw bytes

1function cosmosfarm_share_is_mobile(){
2	var mobile = new Array('iPhone', 'iPad', 'iPod', 'BlackBerry', 'Android', 'Windows CE', 'LG', 'MOT', 'SAMSUNG', 'SonyEricsson', 'Opera Mini', 'IEMobile');
3	for(var word in mobile){
4		if(navigator.userAgent.match(mobile[word]) != null) return true;
5	}
6	return false;
7}
8function cosmosfarm_share_naver(url, text){
9	var w = 720;
10	var h = 720;
11	var popup = window.open("http://share.naver.com/web/shareView.nhn?url="+encodeURIComponent(url)+"&title="+encodeURIComponent(text), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5);
12	return false;
13}
14function cosmosfarm_share_facebook(url){
15	var w = 720;
16	var h = 350;
17	jQuery.post('https://graph.facebook.com', {id:encodeURI(url),scrape:true});
18	window.open('https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5);
19	return false;
20}
21function cosmosfarm_share_twitter(url, text){
22	var w = 720;
23	var h = 350;
24	window.open('https://twitter.com/intent/tweet?text='+encodeURIComponent(text)+'&url='+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5);
25	return false;
26}
27function cosmosfarm_share_band(url, text){
28	var w = 410;
29	var h = 540;
30	window.open('http://www.band.us/plugin/share?body='+encodeURIComponent(text)+encodeURIComponent("\n")+encodeURIComponent(url)+'&route='+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5);
31	return false;
32}
33function cosmosfarm_share_kakaostory(url, text){
34	Kakao.Story.share({
35		url: encodeURI(url),
36		text: text
37	});
38	return false;
39}
40function cosmosfarm_share_kakaotalk(url, text){
41	var share_img_src = jQuery('meta[property="og:image"]').last().attr('content') || cosmosfarm_share_settings.default_img_src;
42	if(share_img_src){
43		Kakao.Link.sendDefault({
44			objectType: 'feed',
45			content: {
46				title: text,
47				imageUrl: share_img_src,
48				link: {
49					mobileWebUrl: url,
50					webUrl: url
51				}
52			}
53		});
54	}
55	else{
56		alert('소셜 공유 버튼 설정에서 공유하기 기본 이미지를 선택해주세요.');
57	}
58	return false;
59}
60function cosmosfarm_share_google(url){
61	var w = 600;
62	var h = 600;
63	window.open('https://plus.google.com/share?url='+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5);
64	return false;
65}
66function cosmosfarm_share_line(url, text){
67	if(cosmosfarm_share_is_mobile()){
68		var w = 410;
69		var h = 540;
70		window.open('http://line.me/R/msg/text/?'+encodeURIComponent(text)+encodeURIComponent("\n")+encodeURIComponent(url), 'cosmosfarm_share', 'width='+w+',height='+h+',left='+(screen.availWidth-w)*0.5+',top='+(screen.availHeight-h)*0.5);
71	}
72	else{
73		alert('라인이 설치된 모바일에서만 가능합니다.');
74	}
75	return false;
76}
77function cosmosfarm_share(sns, url, title){
78	switch(sns){
79		case 'naver': cosmosfarm_share_naver(url, title); break;
80		case 'facebook': cosmosfarm_share_facebook(url); break;
81		case 'twitter': cosmosfarm_share_twitter(url, title); break;
82		case 'band': cosmosfarm_share_band(url, title); break;
83		case 'kakaostory': cosmosfarm_share_kakaostory(url, title); break;
84		case 'kakaotalk': cosmosfarm_share_kakaotalk(url, title); break;
85		case 'google': cosmosfarm_share_google(url); break;
86		case 'line': cosmosfarm_share_line(url, title); break;
87	}
88	return false;
89}

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.