1/** 2 * Plani javascript module 3 * 4 * jquery 1.11.4 5 * 6 * @package Plani javascript Api Module 7 * @author kim seung beom 8 * @copyright Copyright (c) 2016, Plani, Inc. 9 * @link http://plani.co.kr 10 * @since Version 2.0 11 * @filesource 12 */ 13 14 $.api['social'] = function( btns, options ) { 15 this.btns = btns; 16 this.options = $.extend 17 ( 18 { 19 site : 'site', 20 url : document.URL, 21 subject : 'subject', 22 image : '' 23 }, 24 options 25 ); 26 27 this.__construct(); 28} 29 30 31$.extend 32( 33 $.api['social'].prototype, { 34 __construct : function() { 35 var $this=this; 36 37 $this.btns.on 38 ( 39 'click', function(){ 40 $this._share( $(this).attr('href') ); 41 return false; 42 } 43 ); 44 }, 45 _share : function( obj_name ) { 46 var url = encodeURIComponent(this.options.url), 47 subject = encodeURIComponent(this.options.subject), 48 image = encodeURIComponent(this.options.image); 49 50 switch( obj_name ) { 51 case '@twitter' : 52 window.open( 'http://twitter.com/share?url='+url+'&text=' +subject , 'share' ); 53 break; 54 case '@facebook' : 55 window.open( 'http://www.facebook.com/sharer.php?u=' +url+ '&t=' +subject , 'share'); 56 break; 57 case '@pinterest' : 58 window.open( 'http://pinterest.com/pin/create/button/?url=' +url+ '&media=' +image+ '&description=' + subject , 'share'); 59 break; 60 case '@blog' : 61 window.open( 'http://blog.naver.com/LinkShare.nhn?url=' +url+ '&title=' +subject , 'share'); 62 break; 63 case '@band' : 64 window.open( 'http://www.band.us/plugin/share?body=' +subject+encodeURIComponent('\n')+url , 'share'); 65 break; 66 case '@kakaostory' : 67 window.open( 'https://story.kakao.com/share?url=' +url , 'share'); 68 break; 69 case '@googleplus' : 70 window.open( 'https://plus.google.com/share?url=' +url , 'share'); 71 break; 72 default : 73 return false; 74 break; 75 } 76 } 77 } 78);
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.