User:Rangilo Gujarati/media.js

/* $(document).ready(function{ var pageurl = "//gu.wikipedia.org/wiki/" + wgPageName; var shortcut = wgArticleId.toString(36); //var tinyUrl = 'http://tawp.in/r/' + shortcut; var socialShares= [ { 'title':'ઈ મેલ', 'url':'mailto:?subject='+encodeURIComponent(wgPageName.replace(/ /g,'_'))+'&body=http:'+wgServer+'/wiki/'+encodeURIComponent(wgPageName.replace(/ /g,'_')), 'img':'//upload.wikimedia.org/wikipedia/commons/4/42/Icon_External_Link_E-Mail.png' }, { 'title':'ફેસબુક', 'url':'http://www.facebook.com/sharer.php?u=http:'+wgServer+'/wiki/'+encodeURIComponent(wgPageName.replace(/ /g,'_'))+'&t='+encodeURIComponent(wgPageName.replace(/ /g,'_')), 'img':'//upload.wikimedia.org/wikinews/en/5/55/Facebook.png' }, { 'title':'ટ્વીટર', 'url':'http://twitter.com/?status='+encodeURIComponent('ગુજરાતી વિકિપીડિયા માં વાંચો : ' + wgTitle +' ' +tinyUrl +' #tawp' ), 'img':'//upload.wikimedia.org/wikinews/en/f/f7/Twitter.png' } ]; try { var whatLinksItem= $( "#t-whatlinkshere" ); if ( !whatLinksItem.length) return; var shareText=$( " આ શેર: " ); $(socialShares).each(function{ var socialSpan= $( " " ); var socialA= $( '',{href:this.url,title:this.title} ); if(this.title!='ઇ મેલ') socialA.click(function{ window.open(this.href,'શેર','toolbar=0,status=0,resizable=1,width=550,height=400'); return false; }); var socialImg= $( ' ', {'src': this.img}); socialA.append(socialImg); socialSpan.append(socialA); shareText.append(socialSpan); }); var item = $( "",{id:'t-socialShare'} ); item.append( shareText); whatLinksItem.before ( item); } catch(e) { return;     // lets just ignore what's happened } });
 * Adds option to share link to the current page in social networks and email
 * Written by he:User:ערן