PageSourceSearch

https://www.ssd20.org/detailed-program/js/sharebox.itp.js

js ssd20.org collected 2026-10-08 20:30:59 UTC 8,087 bytes, 45 lines download raw bytes

1var brandId='1';var shortenUrl='https://dtk.id';var site='detik';if(window.location.hostname.search(/(insertlive.com)/gi)>-1){brandId='5';}
2else if(window.location.hostname.search(/(updatebanget.com)/gi)>-1){}
3else if(window.location.hostname.search(/(cnnindonesia.com)/gi)>-1){site='cnn';}
4else if(window.location.hostname.search(/(cnbcindonesia.com)/gi)>-1){brandId='10';}
5else if(window.location.hostname.search(/(haibunda.com)/gi)>-1){brandId='4';}
6else if(window.location.hostname.search(/(beautynesia.id)/gi)>-1){brandId='6';}
7var shareBox={num_share:0,fbLoaded:false,shorturl:'',totalArr:[],totalSeq:0,totalCount:0,regShare:function(elm){shareBox.addShare(elm);return false;},windowOptions:"scrollbars=yes,resizable=yes,toolbar=no,location=yes",checkFbBrowser:function(){var ua=navigator.userAgent||navigator.vendor||window.opera;return(ua.indexOf("FBAN")>-1)||(ua.indexOf("FBAV")>-1);},facebook:function(data){var _url='http://www.facebook.com/share.php?u=|u|';_url=_url.replace('|u|',data.pageUrl).replace('|t|',data.pageTitle).replace('|d|',data.pageDesc).replace('|140|',data.pageTitle.substring(0,130));window.open(_url,shareBox.windowOptions,'width=640, height=528');},twitter:function(data){var twAPI="https://twitter.com/intent/tweet",title=encodeURIComponent(data.pageTitle),url=encodeURIComponent(data.pageUrl);if(data.pageQuote){if(data.pageTitle){title=encodeURIComponent("\""+data.pageQuote+"\" - "+data.pageTitle)}else{title=encodeURIComponent("\""+data.pageQuote+"\"")}}
8if(site=='cnn'){var urlcnn="https://cnn.id/"+article.idnews;window.open(twAPI+"?text="+title+"&url="+encodeURIComponent(urlcnn),shareBox.windowOptions,"width=550,height=320");}else{$.ajax({url:shortenUrl+"/?"+url,type:'GET',headers:{'X-BrandId':brandId},success:function(data){console.log(shareBox.checkFbBrowser())
9if(shareBox.checkFbBrowser()===true){window.location.href=twAPI+"?text="+title+"&url="+encodeURIComponent(data)}else{window.open(twAPI+"?text="+title+"&url="+encodeURIComponent(data),shareBox.windowOptions,"width=550,height=320");}}})}},gplus:function(data){title=encodeURIComponent(data.pageTitle);if(data.pageQuote){if(data.pageTitle){title=encodeURIComponent("\""+data.pageQuote+"\" - "+data.pageTitle)}else{title=encodeURIComponent("\""+data.pageQuote+"\"")}}
10var _url='https://plusone.google.com/_/+1/confirm?url='+encodeURIComponent(data.pageUrl)+'&title='+title;window.open(_url,shareBox.windowOptions,'width=640, height=528');},linked:function(data){url=encodeURIComponent(data.pageUrl);var _url="https://www.linkedin.com/shareArticle?mini=true&url="+url;window.open(_url,shareBox.windowOptions,'width=520, height=570');},whatsapp:function(data,elm){var twAPI="https://twitter.com/intent/tweet",title=encodeURIComponent(data.pageTitle),url=encodeURIComponent(data.pageUrl);if(data.pageQuote){if(data.pageTitle){title=encodeURIComponent("\""+data.pageQuote+"\" - "+data.pageTitle)}else{title=encodeURIComponent("\""+data.pageQuote+"\"")}}
11var wurl=data.pageUrl;if(shareBox.shorturl!='')
12wurl=shareBox.shorturl;if(site=='cnn'){var data_url="cnn.id/"+article.idnews
13$('.whatsap').click(function(){window.open("https://wa.me/?text="+title+' '+encodeURIComponent(data_url)).focus();})}else{$.ajax({url:shortenUrl+"/?"+url,type:'GET',headers:{'X-BrandId':brandId},success:function(data){window.open("https://wa.me/?text="+title+' '+data).focus();}})}},lineit:function(data){title=encodeURIComponent(data.pageTitle)
14if(data.pageQuote){if(data.pageTitle){title=encodeURIComponent("\""+data.pageQuote+"\" - "+data.pageTitle)}else{title=encodeURIComponent("\""+data.pageQuote+"\"")}}
15window.location.href='http://line.me/R/msg/text/?'+title+' '+data.pageUrl},telegram:function(data,elm){title=encodeURIComponent(data.pageTitle),url=encodeURIComponent(data.pageUrl);if(data.pageQuote){if(data.pageTitle){title=encodeURIComponent("\""+data.pageQuote+"\" - "+data.pageTitle)}else{title=encodeURIComponent("\""+data.pageQuote+"\"")}}
16if(site=='cnn'){var data_url="cnn.id/"+article.idnews
17$('.sh-telegram').attr({href:"https://t.me/share/url?url="+encodeURIComponent(data_url)+"&text="+title})
18$('.sh-telegram').attr({'data-href':data_url})}else{$.ajax({url:shortenUrl+"/?"+url,type:'GET',headers:{'X-BrandId':brandId},success:function(data){window.location.href='https://t.me/share/url?url='+data+'&text='+title;}})}},addShare:function(elm){var url_ex=$(elm).attr('data-url');if(url_ex.substr(0,2)=='//')
19url_ex='http:'+url_ex;var data={pageUrl:url_ex,pageTitle:$(elm).attr('data-title'),pageDesc:$(elm).attr('data-desc'),pageImage:$(elm).attr('data-image'),pageQuote:$(elm).attr('data-quote')}
20if(!data.pageImage){data.pageImage=baseurl+'images/default-43.gif?w=300';}
21if($(elm).attr('class')=='fb'){shareBox.facebook(data);}
22else if($(elm).attr('class')=='tw'){shareBox.twitter(data);}
23else if($(elm).attr('class')=='gplus'){shareBox.gplus(data);}
24else if($(elm).attr('class')=='line'){shareBox.lineit(data);}
25else if($(elm).attr('class')=='whatsap'){shareBox.whatsapp(data,$(elm));}
26else if($(elm).attr('class')=='linked'){shareBox.linked(data);}
27else if($(elm).attr('class')=='sh-telegram'){shareBox.telegram(data,$(elm));}
28return false;},addCounter:function(elm){var url_ex=$(elm).attr('data-url');if(url_ex.substr(0,1)=='//')
29url_ex='http:'+url_ex;var data={pageUrl:url_ex,pageTitle:$(elm).attr('data-title'),pageDesc:$(elm).attr('data-desc'),pageImage:$(elm).attr('data-image'),pageQuote:$(elm).attr('data-quote')}
30if($(elm).hasClass('fb')){$(elm).click(function(e){shareBox.facebook(data);e.preventDefault();});}
31else if($(elm).hasClass('tw')){$(elm).click(function(e){shareBox.twitter(data);e.preventDefault();});}
32else if($(elm).hasClass('gplus')){$(elm).click(function(e){shareBox.gplus(data);e.preventDefault();});}
33else if($(elm).hasClass('linked')){$(elm).click(function(e){shareBox.linked(data);e.preventDefault();});}
34else if($(elm).hasClass('line')){shareBox.countLine(elm);$(elm).click(function(e){shareBox.lineit(data);e.preventDefault();});}
35else if($(elm).hasClass('whatsap')){$(elm).click(function(e){shareBox.whatsapp(data,$(this));e.preventDefault();});}
36else if($(elm).hasClass('sh-telegram')){$(elm).click(function(e){shareBox.telegram(data,$(this));e.preventDefault();});}
37else if($(elm).hasClass('komentar')||$(elm).hasClass('sh-komentar')){shareBox.countComment(elm);$(elm).click(function(e){var divtop=parseInt($('#thecomment2').offset().top)-parseInt(46);var dt_plus=divtop+200;$('html, body').animate({scrollTop:dt_plus},600);setTimeout(function(){$('html, body').animate({scrollTop:divtop},800);},500);return false;});}},updateCounter:function(elm,sostype,total){if(this.totalArr.indexOf(sostype)<0){this.totalArr.push(sostype)
38this.totalCount=this.totalCount+total
39this.totalSeq++}
40if(this.totalSeq>=2){var total_share=$(elm).closest('.share-top-new').find('.count');if(typeof $(total_share)!=='undefined'){$({someValue:0}).animate({someValue:this.totalCount},{duration:1500,easing:'swing',step:function(){$(total_share).find('strong').text(Math.round(this.someValue));}});setTimeout(function(){$(total_share).find('strong').text(shareBox.totalCount)},1600)}}},countTW:function(elm){var pageUrl=$(elm).attr('data-url');var tweets;},countGplus:function(elm){var pageUrl=$(elm).attr('data-url');var api_url='';$.ajax({url:api_url,dataType:'json',contentType:'application/json',type:'GET',processData:false,success:function(data){var google_pluses=data;if(typeof($(elm).find('.nolabel').html())!='undefined')
41$(elm).find('.nolabel').html(google_pluses);else
42$(elm).find('span').html('Share '+google_pluses);shareBox.updateCounter(elm,'gplus',google_pluses)}})},countLine:function(elm){},countComment:function(elm){$.getJSON('//apicomment.detik.com/api/comments/old/?count&callback=?',{key:article.idnews,group:article.idkanal,format:'jsonp'},function(response){if(typeof($(elm).find('.nolabel').html())!='undefined')
43$(elm).find('.nolabel').html(response);else
44$(elm).find('span').html(response);})},run:function(elm){$(elm).find('a').each(function(key,cshare){if($(cshare).attr('class')!='count')
45shareBox.addCounter(cshare)})},includeFb:function(){}};

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.