1function heateorSsDetermineWhatsappShareAPI(a){if(a)return-1!=navigator.userAgent.indexOf("Mobi")?"api.whatsapp.com":"web.whatsapp.com";var p=jQuery("i.theChampWhatsappBackground a").attr("href");return void 0!==p?-1!=navigator.userAgent.indexOf("Mobi")?(jQuery("i.theChampWhatsappBackground a").attr("href",p.replace("web.whatsapp.com","api.whatsapp.com")),"api.whatsapp.com"):(jQuery("i.theChampWhatsappBackground a").attr("href",p.replace("api.whatsapp.com","web.whatsapp.com")),"web.whatsapp.com"):""} 2/** 3 * Show more sharing services popup 4 */ 5function theChampMoreSharingPopup(elem, postUrl, postTitle, twitterTitle){ 6 var shareContainer = elem.parentElement.parentElement.parentElement; 7 postUrl = encodeURIComponent(postUrl); 8 concate = '</ul></div><div class="footer-panel"><p></p></div></div>'; 9 var theChampMoreSharingServices = { 10 facebook: { 11 title: "Facebook", 12 locale: "en-US", 13 redirect_url: "http://www.facebook.com/sharer.php?u=" + postUrl + "&t=" + postTitle + "&v=3", 14 }, 15 twitter: { 16 title: "Twitter", 17 locale: "en-US", 18 redirect_url: "http://twitter.com/intent/tweet?text=" + (twitterTitle ? twitterTitle : postTitle) + " " + postUrl, 19 }, 20 linkedin: { 21 title: "Linkedin", 22 locale: "en-US", 23 redirect_url: "http://www.linkedin.com/shareArticle?mini=true&url=" + postUrl + "&title=" + postTitle, 24 }, 25 pinterest: { 26 title: "Pinterest", 27 locale: "en-US", 28 redirect_url: "https://pinterest.com/pin/create/button/?url=" + postUrl + "&media=${media_link}&description=" + postTitle, 29 bookmarklet_url: "javascript:void((function(){var e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','//assets.pinterest.com/js/pinmarklet.js?r='+Math.random()*99999999);document.body.appendChild(e)})());" 30 }, 31 CopyLink: { 32 title: "Copy Link", 33 locale: "en-US", 34 redirect_url: "", 35 bookmarklet_url: "" 36 }, 37 Diaspora: { 38 title: "Diaspora", 39 locale: "en-US", 40 redirect_url: "https://joindiaspora.com/bookmarklet?url=" + postUrl + "&title=" + postTitle + "&v=1" 41 }, 42 Douban: { 43 title: "Douban", 44 locale: "en-US", 45 redirect_url: "https://www.douban.com/share/service?name="+postTitle+"&href="+postUrl+"&image=&updated=&bm=&url="+postUrl+"&title="+postTitle+"&sel=" 46 }, 47 Draugiem: { 48 title: "Draugiem", 49 locale: "en-US", 50 redirect_url: "https://www.draugiem.lv/say/ext/add.php?link="+postUrl+"&title="+postTitle 51 }, 52 Facebook_Messenger: { 53 title: "Facebook Messenger", 54 locale: "en-US", 55 redirect_url: "https://www.facebook.com/dialog/send?app_id=595489497242932&display=popup&link="+postUrl+"&redirect_uri="+postUrl 56 }, 57 Google_Classroom: { 58 title: "Google Classroom", 59 locale: "en-US", 60 redirect_url: "https://classroom.google.com/u/0/share?url="+postUrl 61 }, 62 Kik: { 63 title: "Kik", 64 locale: "en-US", 65 redirect_url: "https://www.kik.com/send/article/?app_name=Share&text=&title="+postTitle+"&url="+postUrl 66 }, 67 Papaly: {
68 title: "Papaly", 69 locale: "en-US", 70 redirect_url: "https://papaly.com/api/share.html?url="+postUrl+"&title="+postTitle 71 }, 72 Refind: { 73 title: "Refind", 74 locale: "en-US", 75 redirect_url: "https://refind.com/?url="+postUrl 76 }, 77 Skype: { 78 title: "Skype", 79 locale: "en-US", 80 redirect_url: "https://web.skype.com/share?url="+postUrl 81 }, 82 SMS: { 83 title: "SMS", 84 locale: "en-US", 85 bookmarklet_url: "sms://?&body="+postTitle+" "+postUrl 86 }, 87 Trello: { 88 title: "Trello", 89 locale: "en-US", 90 redirect_url: "https://trello.com/add-card?mode=popup&url="+postUrl+"&name="+postTitle+"&desc=" 91 }, 92 Viber: { 93 title: "Viber", 94 locale: "en-US", 95 bookmarklet_url: "viber://forward?text="+postTitle+" "+postUrl 96 }, 97 Threema: { 98 title: "Threema", 99 locale: "en-US", 100 bookmarklet_url: "threema://compose?text="+postTitle+" "+postUrl 101 }, 102 Telegram: { 103 title: "Telegram", 104 locale: "en-US", 105 redirect_url: "https://telegram.me/share/url?url="+postUrl+"&text="+postTitle 106 }, 107 email: { 108 title: "Email", 109 locale: "en-US", 110 redirect_url: "mailto:?subject=" + postTitle + "&body=Link: " + postUrl, 111 }, 112 reddit: { 113 title: "Reddit", 114 locale: "en-US", 115 redirect_url: "http://reddit.com/submit?url=" + postUrl + "&title=" + postTitle, 116 }, 117 float_it: { 118 title: "Float it", 119 locale: "en-US", 120 redirect_url: "http://www.designfloat.com/submit.php?url=" + postUrl + "&title=" + postTitle, 121 }, 122 google_mail: { 123 title: "Google Gmail", 124 locale: "en-US", 125 redirect_url: "https://mail.google.com/mail/?ui=2&view=cm&fs=1&tf=1&su=" + postTitle + "&body=Link: " + postUrl, 126 }, 127 gentlereader: { 128 title: "GentleReader", 129 locale: "en-US", 130 redirect_url: "https://app.gentlereader.com/bookmark?url=" + postUrl, 131 }, 132 google_bookmarks: { 133 title: "Google Bookmarks", 134 locale: "en-US", 135 redirect_url: "http://www.google.com/bookmarks/mark?op=edit&bkmk=" + postUrl + "&title=" + postTitle, 136 }, 137 digg: { 138 title: "Digg", 139 locale: "en-US", 140 redirect_url: "http://digg.com/submit?phase=2&url=" + postUrl + "&title=" + postTitle, 141 }, 142 printfriendly: { 143 title: "PrintFriendly", 144 locale: "en-US", 145 redirect_url: "http://www.printfriendly.com/print?url=" + postUrl, 146 }, 147 print: { 148 title: "Print", 149 locale: "en-US", 150 redirect_url: "http://www.printfriendly.com/print?url=" + postUrl, 151 }, 152 tumblr: { 153 title: "Tumblr", 154 locale: "en-US", 155 redirect_url: "https://www.tumblr.com/widgets/share/tool?posttype=link&canonicalUrl=" + postUrl + "&title=" + postTitle + "&caption=", 156 bookmarklet_url: "javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://www.tumblr.com/share',l=d.location,e=encodeURIComponent,p='?v=3&u='+e(l.href) +'&t='+e(d.title) +'&s='+e(s),u=f+p;try{if(!/^(.*\\.)?tumblr[^.]*$/.test(l.host))throw(0);tstbklt();}catch(z){a =function(){if(!w.open(u,'t','toolbar=0,resizable=0,status=1,width=450,height=430'))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else a();}void(0);" 157 }, 158 vk: { 159 title: "Vkontakte", 160 locale: "ru", 161 redirect_url: "https://vk.com/share.php?url=" + postUrl + "&title=" + postTitle, 162 }, 163 evernote: { 164 title: "Evernote", 165 locale: "en-US", 166 redirect_url: "https://www.evernote.com/clip.action?url=" + postUrl + "&title=" + postTitle, 167 bookmarklet_url: "javascript:(function(){EN_CLIP_HOST='http://www.evernote.com';try{var x=document.createElement('SCRIPT');x.type='text/javascript';x.src=EN_CLIP_HOST+'/public/bookmarkClipper.js?'+(new Date().getTime()/100000);document.getElementsByTagName('head')[0].appendChild(x);}catch(e){location.href=EN_CLIP_HOST+'/clip.action?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title);}})();" 168 }, 169 amazon_us_wish_list: { 170 title: "Amazon Wish List", 171 locale: "en-US", 172 redirect_url: "http://www.amazon.com/wishlist/add?u=" + postUrl + "&t=" + postTitle, 173 bookmarklet_url: "javascript:(function(){var w=window,l=w.location,d=w.document,s=d.createElement('script'),e=encodeURIComponent,x='undefined',u='http://www.amazon.com/gp/wishlist/add';if(typeof s!='object')l.href=u+'?u='+e(l)+'&t='+e(d.title);function g(){if(d.readyState&&d.readyState!='complete'){setTimeout(g,200);}else{if(typeof AUWLBook==x)s.setAttribute('src',u+'.js?loc='+e(l)),d.body.appendChild(s);function f(){(typeof AUWLBook==x)?setTimeout(f,200):AUWLBook.showPopover();}f();}}g();}())" 174 }, 175 wordpress_blog: { 176 title: "WordPress", 177 locale: "en-US", 178 redirect_url: "http://www.addtoany.com/ext/wordpress/press_this?linkurl=" + postUrl + "&linkname=" + postTitle, 179 }, 180 whatsapp: { 181 title: "Whatsapp", 182 locale: "en-US", 183 redirect_url: "https://" + heateorSsDetermineWhatsappShareAPI(true) + "/send?text=" + postTitle + " " + postUrl, 184 }, 185 diigo: { 186 title: "Diigo", 187 locale: "en-US", 188 redirect_url: "http://www.diigo.com/post?url=" + postUrl + "&title=" + postTitle, 189 }, 190 yc_hacker_news: { 191 title: "Hacker News", 192 locale: "en-US", 193 redirect_url: "http://news.ycombinator.com/submitlink?u=" + postUrl + "&t=" + postTitle, 194 }, 195 box_net: { 196 title: "Box.net", 197 locale: "en-US", 198 redirect_url: "https://www.box.net/api/1.0/import?url=" + postUrl + "&name=" + postTitle + "&import_as=link", 199 }, 200 aol_mail: { 201 title: "AOL Mail", 202 locale: "en-US",
203 redirect_url: "http://webmail.aol.com/25045/aol/en-us/Mail/compose-message.aspx?subject=" + postTitle + "&body=" + postUrl, 204 }, 205 yahoo_mail: { 206 title: "Yahoo Mail", 207 locale: "en-US", 208 redirect_url: "http://compose.mail.yahoo.com/?Subject=" + postTitle + "&body=Link: " + postUrl, 209 }, 210 instapaper: { 211 title: "Instapaper", 212 locale: "en-US", 213 redirect_url: "http://www.instapaper.com/edit?url=" + postUrl + "&title=" + postTitle, 214 }, 215 plurk: { 216 title: "Plurk", 217 locale: "en-US", 218 redirect_url: "http://www.plurk.com/m?content=" + postUrl + "&qualifier=shares", 219 }, 220 wanelo: { 221 title: "Wanelo", 222 locale: "en-US", 223 redirect_url: "http://wanelo.com/p/post?bookmarklet=&images%5B%5D=&url=" + postUrl + "&title=" + postTitle + "&price=&shop=", 224 bookmarklet_url: "javascript:void ((function(url){if(!window.waneloBookmarklet){var productURL=encodeURIComponent(url),cacheBuster=Math.floor(Math.random()*1e3),element=document.createElement('script');element.setAttribute('src','//wanelo.com/bookmarklet/3/setup?*='+cacheBuster+'&url='+productURL),element.onload=init,element.setAttribute('type','text/javascript'),document.getElementsByTagName('head')[0].appendChild(element)}else init();function init(){window.waneloBookmarklet()}})(window.location.href))" 225 }, 226 aim: { 227 title: "AIM", 228 locale: "en-US", 229 redirect_url: "http://share.aim.com/share/?url=" + postUrl + "&title=" + postTitle, 230 }, 231 viadeo: { 232 title: "Viadeo", 233 locale: "en-US", 234 redirect_url: "http://www.viadeo.com/shareit/share/?url=" + postUrl + "&title=" + postTitle, 235 }, 236 pinboard_in: { 237 title: "Pinboard", 238 locale: "en-US", 239 redirect_url: "http://pinboard.in/add?url=" + postUrl + "&title=" + postTitle, 240 }, 241 blogger_post: { 242 title: "Blogger Post", 243 locale: "en-US", 244 redirect_url: "http://www.blogger.com/blog_this.pyra?t=&u=" + postUrl + "&l&n=" + postTitle, 245 }, 246 typepad_post: { 247 title: "TypePad Post", 248 locale: "en-US", 249 redirect_url: "http://www.typepad.com/services/quickpost/post?v=2&qp_show=ac&qp_title=" + postTitle + "&qp_href=" + postUrl + "&qp_text=" + postTitle, 250 }, 251 buffer: { 252 title: "Buffer", 253 locale: "en-US", 254 redirect_url: "http://bufferapp.com/add?url=" + postUrl + "&text=" + postTitle, 255 }, 256 flipboard: { 257 title: "Flipboard", 258 locale: "en-US", 259 redirect_url: "https://share.flipboard.com/bookmarklet/popout?v=2&url=" + postUrl + "&title=" + postTitle, 260 }, 261 mail: { 262 title: "Email", 263 locale: "en-US", 264 redirect_url: "mailto:?subject=" + postTitle + "&body=Link: " + postUrl, 265 }, 266 pocket: { 267 title: "Pocket", 268 locale: "en-US", 269 redirect_url: "https://readitlaterlist.com/save?url=" + postUrl + "&title=" + postTitle, 270 }, 271 fark: { 272 title: "Fark", 273 locale: "en-US", 274 redirect_url: "http://cgi.fark.com/cgi/fark/submit.pl?new_url=" + postUrl, 275 }, 276 fintel: { 277 title: "Fintel", 278 locale: "en-US", 279 redirect_url: "https://fintel.io/submit?url=" + postUrl, 280 }, 281 yummly: { 282 title: "Yummly", 283 locale: "en-US", 284 redirect_url: "http://www.yummly.com/urb/verify?url=" + postUrl + "&title=" + postTitle, 285 }, 286 app_net: { 287 title: "App.net", 288 locale: "en-US", 289 redirect_url: "https://account.app.net/login/", 290 }, 291 balatarin: { 292 title: "Balatarin", 293 locale: "en-US", 294 redirect_url: "https://www.balatarin.com/login", 295 }, 296 bibSonomy: { 297 title: "BibSonomy", 298 locale: "en-US", 299 redirect_url: "http://www.bibsonomy.org/login", 300 }, 301 Bitty_Browser: { 302 title: "Bitty Browser", 303 locale: "en-US", 304 redirect_url: "http://www.bitty.com/manual/?contenttype=&contentvalue=" + postUrl, 305 }, 306 Blinklist: { 307 title: "Blinklist", 308 locale: "en-US", 309 redirect_url: "http://blinklist.com/blink?t=" + postTitle + "&d=&u=" + postUrl, 310 }, 311 BlogMarks: { 312 title: "BlogMarks", 313 locale: "en-US", 314 redirect_url: "http://blogmarks.net/my/new.php?mini=1&simple=1&title=" + postTitle + "&url=" + postUrl, 315 }, 316 Bookmarks_fr: { 317 title: "Bookmarks.fr", 318 locale: "en-US", 319 redirect_url: "http://www.bookmarks.fr/Connexion/?action=add&address=" + postUrl + "&title=" + postTitle, 320 }, 321 BuddyMarks: { 322 title: "BuddyMarks", 323 locale: "en-US", 324 redirect_url: "http://buddymarks.com/login.php?bookmark_title=" + postTitle + "&bookmark_url=" + postUrl + "&bookmark_desc=&bookmark_tags=", 325 }, 326 Care2_news: { 327 title: "Care2 News", 328 locale: "en-US", 329 redirect_url: "http://www.care2.com/passport/login.html?promoID=10&pg=http://www.care2.com/news/compose?sharehint=news&share[share_type]news&bookmarklet=Y&share[title]=" + postTitle + "&share[link_url]=" + postUrl + "&share[content]=", 330 }, 331 CiteULike: { 332 title: "Cite U Like", 333 locale: "en-US", 334 redirect_url: "http://www.citeulike.org/posturl?url=" + postUrl + "&title=" + postTitle, 335 }, 336 Diary_Ru: { 337 title: "Diary.Ru", 338 locale: "en-US", 339 redirect_url: "http://www.diary.ru/?newpost&title=" + postTitle + "&text=" + postUrl, 340 }, 341 dzone: { 342 title: "DZone", 343 locale: "en-US", 344 redirect_url: "http://www.dzone.com/links/add.html?url=" + postUrl + "&title=" + postTitle, 345 }, 346 Folkd: { 347 title: "Folkd", 348 locale: "en-US", 349 redirect_url: "http://www.folkd.com/page/social-bookmarking.html?addurl=" + postUrl, 350 }, 351 Hatena: { 352 title: "Hatena", 353 locale: "en-US", 354 redirect_url: "http://b.hatena.ne.jp/bookmarklet?url=" + postUrl + "&btitle=" + postTitle, 355 }, 356 Jamespot: { 357 title: "Jamespot",
358 locale: "en-US", 359 redirect_url: "//my.jamespot.com/", 360 }, 361 Kakao: { 362 title: "Kakao", 363 locale: "en-US", 364 redirect_url: "https://story.kakao.com/share?url=" + postUrl, 365 }, 366 Kindle_It: { 367 title: "Kindle_It", 368 locale: "en-US", 369 redirect_url: "//fivefilters.org/kindle-it/send.php?url=" + postUrl, 370 }, 371 Known: { 372 title: "Known", 373 locale: "en-US", 374 redirect_url: "https://withknown.com/share/?url=" + postUrl + "&title=" + postTitle, 375 }, 376 Line: { 377 title: "Line", 378 locale: "en-US", 379 redirect_url: "https://social-plugins.line.me/lineit/share?url=" + postUrl, 380 }, 381 LiveJournal: { 382 title: "LiveJournal", 383 locale: "en-US", 384 redirect_url: "http://www.livejournal.com/update.bml?subject=" + postTitle + "&event=" + postUrl, 385 }, 386 Mail_Ru: { 387 title: "Mail.Ru", 388 locale: "en-US", 389 redirect_url: "https://connect.mail.ru/share?share_url=" + postUrl, 390 }, 391 Mendeley: { 392 title: "Mendeley", 393 locale: "en-US", 394 redirect_url: "https://www.mendeley.com/sign-in/", 395 }, 396 Meneame: { 397 title: "Meneame", 398 locale: "en-US", 399 redirect_url: "https://www.meneame.net/submit.php?url=" + postUrl, 400 }, 401 MeWe: { 402 title: "MeWe", 403 locale: "en-US", 404 redirect_url: "https://mewe.com/share?link=" + postUrl, 405 }, 406 Mix: { 407 title: "Mix", 408 locale: "en-US", 409 redirect_url: "https://mix.com/mixit?url=" + postUrl, 410 }, 411 Mixi: { 412 title: "Mixi", 413 locale: "en-US", 414 redirect_url: "https://mixi.jp/share.pl?mode=login&u=" + postUrl, 415 }, 416 MySpace: { 417 title: "MySpace", 418 locale: "en-US", 419 redirect_url: "https://myspace.com/post?u=" + encodeURIComponent(postUrl) + "&t=" + postTitle + "&l=3&c=" + postTitle, 420 }, 421 Netvouz: { 422 title: "Netvouz", 423 locale: "en-US", 424 redirect_url: "http://www.netvouz.com/action/submitBookmark?url=" + postUrl + "&title=" + postTitle + "&popup=no&description=", 425 }, 426 Odnoklassniki: { 427 title: "Odnoklassniki", 428 locale: "en-US", 429 redirect_url: "https://connect.ok.ru/dk?cmd=WidgetSharePreview&st.cmd=WidgetSharePreview&st.shareUrl=" + postUrl + "&st.client_id=-1", 430 }, 431 Outlook_com: { 432 title: "Outlook.com", 433 locale: "en-US", 434 redirect_url: "https://mail.live.com/default.aspx?rru=compose?subject=" + postTitle + "&body=" + postUrl + "&lc=1033&id=64855&mkt=en-us&cbcxt=mai", 435 }, 436 Protopage_Bookmarks: { 437 title: "Protopage_Bookmarks", 438 locale: "en-US", 439 redirect_url: "http://www.protopage.com/add-button-site?url=" + postUrl + "&label=&type=page", 440 }, 441 Pusha: { 442 title: "Pusha", 443 locale: "en-US", 444 redirect_url: "//www.pusha.se/posta?url=" + postUrl, 445 }, 446 Qzone: { 447 title: "Qzone", 448 locale: "en-US", 449 redirect_url: "http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=" + postUrl, 450 }, 451 Rediff_MyPage: { 452 title: "Rediff MyPage", 453 locale: "en-US", 454 redirect_url: "//share.rediff.com/bookmark/addbookmark?bookmarkurl=" + postUrl + "&title=" + postTitle, 455 }, 456 Renren: { 457 title: "Renren", 458 locale: "en-US", 459 redirect_url: "//www.connect.renren.com/share/sharer?url=" + postUrl + "&title=" + postTitle, 460 }, 461 Sina_Weibo: { 462 title: "Sina Weibo", 463 locale: "en-US", 464 redirect_url: "//service.weibo.com/share/share.php?url=" + postUrl + "&title=" + postTitle, 465 }, 466 SiteJot: { 467 title: "SiteJot", 468 locale: "en-US", 469 redirect_url: "http://www.sitejot.com/loginform.php?iSiteAdd=&iSiteDes=", 470 }, 471 Slashdot: { 472 title: "Slashdot", 473 locale: "en-US", 474 redirect_url: "//slashdot.org/submission?url=" + postUrl, 475 }, 476 StockTwits: { 477 title: "StockTwits", 478 locale: "en-US", 479 redirect_url: "https://stocktwits.com/widgets/share?body=" + postTitle + " " + postUrl, 480 }, 481 Svejo: { 482 title: "Svejo", 483 locale: "en-US", 484 redirect_url: "https://svejo.net/story/submit_by_url?url=" + postUrl + "&title=" + postTitle + "&summary=", 485 }, 486 Symbaloo_Feeds: { 487 title: "Symbaloo_Feeds", 488 locale: "en-US", 489 redirect_url: "//www.symbaloo.com/", 490 }, 491 Tuenti: { 492 title: "Tuenti", 493 locale: "en-US",
494 redirect_url: "https://www.tuenti.com/share?p=b5dd6602&url=" + postUrl, 495 }, 496 Twiddla: { 497 title: "Twiddla", 498 locale: "en-US", 499 redirect_url: "//www.twiddla.com/New.aspx?url=" + postUrl + "&title=" + postTitle, 500 }, 501 Webnews: { 502 title: "Webnews", 503 locale: "en-US", 504 redirect_url: "//www.webnews.de/login", 505 }, 506 Wykop: { 507 title: "Wykop", 508 locale: "en-US", 509 redirect_url: "//www.wykop.pl/dodaj?url=" + postUrl + "&title=" + postTitle, 510 }, 511 Xing: { 512 title: "Xing", 513 locale: "en-US", 514 redirect_url: "https://www.xing.com/spi/shares/new?cb=0&url=" + postUrl, 515 }, 516 Yoolink: { 517 title: "Yoolink", 518 locale: "en-US", 519 redirect_url: "//yoolink.to/addorshare?url_value=" + postUrl + "&title=" + postTitle, 520 } 521 } 522 var theChampMoreSharingServicesHtml = '<button id="the_champ_sharing_popup_close" class="close-button separated"><img src="'+ theChampCloseIconPath +'" /></button><div id="the_champ_sharing_more_content" data-href="'+ decodeURIComponent(shareContainer.getAttribute('class').indexOf('the_champ_horizontal_sharing') != -1 ? heateorSsHorSharingShortUrl : heateorSsVerticalSharingShortUrl) +'"><div class="filter"><input type="text" onkeyup="theChampFilterSharing(this.value.trim())" placeholder="Search" class="search"></div><div class="all-services"><ul class="mini">'; 523 for(var i in theChampMoreSharingServices){ 524 var tempTitle = theChampCapitaliseFirstLetter(theChampMoreSharingServices[i].title.replace(/[_. ]/g, "")); 525 theChampMoreSharingServicesHtml += '<li><a rel="nofollow" class="theChamp'+i+'Share" title="'+ theChampMoreSharingServices[i].title +'" alt="'+ theChampMoreSharingServices[i].title +'" '; 526 if(theChampMoreSharingServices[i].bookmarklet_url){ 527 theChampMoreSharingServicesHtml += 'href="' + theChampMoreSharingServices[i].bookmarklet_url + '" '; 528 }else if(theChampMoreSharingServices[i].redirect_url){ 529 theChampMoreSharingServicesHtml += 'onclick="theChampPopup(\'' + theChampMoreSharingServices[i].redirect_url + '\')" href="javascript:void(0)" '; 530 }else{ 531 theChampMoreSharingServicesHtml += 'href="javascript:void(0)" '; 532 } 533 theChampMoreSharingServicesHtml += '"><i style="width:22px;height:22px" title="'+ theChampMoreSharingServices[i].title +'" class="theChampSharing theChamp' + tempTitle + 'Background"><ss style="display:block;width:100%;height:100%;" class="theChampSharingSvg theChamp' + tempTitle + 'Svg"></ss></i>' + theChampMoreSharingServices[i].title + '</a></li>'; 534 } 535 theChampMoreSharingServicesHtml += concate; 536 537 var mainDiv = document.createElement('div'); 538 mainDiv.innerHTML = theChampMoreSharingServicesHtml; 539 mainDiv.setAttribute('id', 'the_champ_sharing_more_providers'); 540 var bgDiv = document.createElement('div'); 541 bgDiv.setAttribute('id', 'the_champ_popup_bg'); 542 jQuery('body').append(mainDiv).append(bgDiv); 543 document.getElementById('the_champ_popup_bg').onclick = document.getElementById('the_champ_sharing_popup_close').onclick = function(){ 544 mainDiv.parentNode.removeChild(mainDiv); 545 bgDiv.parentNode.removeChild(bgDiv); 546 } 547} 548 549if(typeof theChampHorizontalSharingCountEnable == 'undefined'){ 550 var theChampHorizontalSharingCountEnable = 0; 551} 552if(typeof theChampVerticalSharingCountEnable == 'undefined'){ 553 var theChampVerticalSharingCountEnable = 0; 554} 555if(theChampHorizontalSharingCountEnable || theChampVerticalSharingCountEnable){ 556 // get sharing counts on window load 557 theChampLoadEvent( 558 function(){ 559 // sharing counts 560 theChampCallAjax(function(){ 561 theChampGetSharingCounts(); 562 }); 563 } 564 ); 565} 566 567/** 568 * Search sharing services 569 */ 570function theChampFilterSharing(val) { 571 jQuery('ul.mini li a').each(function(){ 572 if (jQuery(this).text().toLowerCase().indexOf(val.toLowerCase()) != -1) { 573 jQuery(this).parent().css('display', 'block'); 574 } else { 575 jQuery(this).parent().css('display', 'none'); 576 } 577 }); 578}; 579 580var heateorSsFacebookTargetUrls = []; 581 582/** 583 * Get sharing counts 584 */ 585function theChampGetSharingCounts(){ 586 var targetUrls = []; 587 jQuery('.the_champ_sharing_container').each(function(){ 588 if(typeof jQuery(this).attr('super-socializer-no-counts') == 'undefined'){ 589 var currentTargetUrl = jQuery(this).attr('super-socializer-data-
589href'); 590 if(currentTargetUrl != null && jQuery.inArray(currentTargetUrl, heateorSsUrlCountFetched) == -1){ 591 targetUrls.push(currentTargetUrl); 592 heateorSsUrlCountFetched.push(currentTargetUrl); 593 } 594 } 595 }); 596 if(targetUrls.length == 0){ 597 return; 598 } 599 jQuery.ajax({ 600 type: 'GET', 601 dataType: 'json', 602 url: theChampSharingAjaxUrl, 603 data: { 604 action: 'the_champ_sharing_count', 605 urls: targetUrls, 606 }, 607 success: function(data, textStatus, XMLHttpRequest){ 608 if(data.status == 1){ 609 if(data.facebook){ 610 heateorSsFacebookTargetUrls = data.facebook_urls; 611 } 612 for(var i in data.message){ 613 var sharingContainers = jQuery("div[super-socializer-data-href='"+i+"']"); 614 615 jQuery(sharingContainers).each(function(){ 616 var totalCount = 0; 617 for(var j in data.message[i]){ 618 var sharingCount = parseInt(data.message[i][j]) || 0; 619 620 var targetElement = jQuery(this).find('.the_champ_'+j+'_count'); 621 622 if(jQuery(targetElement).attr('ss_st_count')){ 623 sharingCount = parseInt(sharingCount) + parseInt(jQuery(targetElement).attr('ss_st_count')); 624 } 625 totalCount += parseInt(sharingCount); 626 if(sharingCount < 1){ continue; } 627 jQuery(targetElement).html(theChampCalculateApproxCount(sharingCount)).css({'visibility': 'visible', 'display': 'block'}); 628 629 if ( ( typeof theChampReduceHorizontalSvgWidth != 'undefined' && jQuery(this).hasClass('the_champ_horizontal_sharing') ) || ( typeof theChampReduceVerticalSvgWidth != 'undefined' && jQuery(this).hasClass('the_champ_vertical_sharing') ) ) { 630 jQuery(targetElement).parents('li').find('.theChampSharingSvg').css('float', 'left'); 631 } 632 if ( ( typeof theChampReduceHorizontalSvgHeight != 'undefined' && jQuery(this).hasClass('the_champ_horizontal_sharing') ) || ( typeof theChampReduceVerticalSvgHeight != 'undefined' && jQuery(this).hasClass('the_champ_vertical_sharing') ) ) { 633 jQuery(targetElement).parents('li').find('.theChampSharingSvg').css('marginTop', '0'); 634 } 635 } 636 var totalCountContainer = jQuery(this).find('.theChampTCBackground'); 637 jQuery(totalCountContainer).each(function(){ 638 var containerHeight = jQuery(this).css('height'); 639 jQuery(this).html('<div class="theChampTotalShareCount" style="font-size: '+ (parseInt(containerHeight) * 62/100) +'px">' + theChampCalculateApproxCount(totalCount) + '</div><div class="theChampTotalShareText" style="font-size: '+ (parseInt(containerHeight) * 38/100) +'px">' + (totalCount == 0 || totalCount > 1 ? heateorSsSharesText : heateorSsShareText) + '</div>').css('visibility', 'visible'); 640 }); 641 }); 642 } 643 if(heateorSsFacebookTargetUrls.length != 0){ 644 theChampFetchFacebookShares(heateorSsFacebookTargetUrls); 645 } 646 } 647 } 648 }); 649} 650 651function theChampFetchFacebookShares(targetUrls){ 652 var loopCounter = 0; 653 for(var i in targetUrls){ 654 for(var j in targetUrls[i]){ 655 loopCounter++; 656 theChampFBShareJSONCall(targetUrls[i][j], loopCounter, targetUrls[0].length*targetUrls.length, targetUrls[0][j]); 657 } 658 } 659} 660 661function theChampFBShareJSONCall(targetUrl, loopCounter, targetUrlsLength, dataHref) { 662 jQuery.getJSON('//graph.facebook.com/?id=' + targetUrl, function(data){ 663 if(data.share && data.share.share_count >= 0){ 664 var sharingContainers = jQuery("div[super-socializer-data-href='"+dataHref+"']"); 665 666 jQuery(sharingContainers).each(function(){ 667 var targetElement = jQuery(this).find('.the_champ_facebook_count'); 668 var facebookBackground = jQuery(this).find('i.theChampFacebookBackground'); 669 var sharingCount = parseInt(data.share.share_count); 670 671 if(jQuery(targetElement).attr('ss_st_count') !== undefined){ 672 sharingCount += parseInt(jQuery(targetElement).attr('ss_st_count')); 673 } 674 if(sharingCount > 0){ 675 if(typeof jQuery(facebookBackground).attr('heateor-ss-fb-shares') == 'undefined'){ 676 jQuery(targetElement).html(theChampCalculateApproxCount(sharingCount)).css({'visibility': 'visible', 'display': 'block'});
677 jQuery(facebookBackground).attr('heateor-ss-fb-shares', sharingCount); 678 }else if(typeof jQuery(facebookBackground).attr('heateor-ss-fb-shares') != 'undefined'){ 679 var tempShareCount = parseInt(jQuery(facebookBackground).attr('heateor-ss-fb-shares')); 680 jQuery(facebookBackground).attr('heateor-ss-fb-shares', sharingCount + tempShareCount); 681 jQuery(targetElement).html(theChampCalculateApproxCount(sharingCount + tempShareCount)); 682 } 683 if ( ( typeof theChampReduceHorizontalSvgWidth != 'undefined' && jQuery(this).hasClass('the_champ_horizontal_sharing') ) || ( typeof theChampReduceVerticalSvgWidth != 'undefined' && jQuery(this).hasClass('the_champ_vertical_sharing') ) ) { 684 jQuery(targetElement).parents('li').find('.theChampSharingSvg').css('float', 'left'); 685 } 686 if ( ( typeof theChampReduceHorizontalSvgHeight != 'undefined' && jQuery(this).hasClass('the_champ_horizontal_sharing') ) || ( typeof theChampReduceVerticalSvgHeight != 'undefined' && jQuery(this).hasClass('the_champ_vertical_sharing') ) ) { 687 jQuery(targetElement).parents('li').find('.theChampSharingSvg').css('marginTop', '0'); 688 } 689 var totalCountContainer = jQuery(this).find('.theChampTCBackground'); 690 jQuery(totalCountContainer).each(function(){ 691 var totalShareCountElem = jQuery(this).find('.theChampTotalShareCount'); 692 var totalShareCount = jQuery(totalShareCountElem).text(); 693 var newTotalCount = theChampCalculateActualCount(totalShareCount) + sharingCount; 694 jQuery(totalShareCountElem).text(theChampCalculateApproxCount(newTotalCount)); 695 jQuery(this).find('.theChampTotalShareText').text(newTotalCount == 0 || newTotalCount > 1 ? heateorSsSharesText : heateorSsShareText); 696 }); 697 } 698 }); 699 } 700 701 if(loopCounter == targetUrlsLength){ 702 setTimeout(function(){ 703 var facebookShares = {}; 704 for(var i in heateorSsFacebookTargetUrls[0]){ 705 var sharingContainers = jQuery("div[super-socializer-data-href='"+heateorSsFacebookTargetUrls[0][i]+"']"); 706 jQuery(sharingContainers).each(function(){ 707 var facebookCountElement = jQuery(this).find('.the_champ_facebook_count'); 708 var facebookCountElementBg = jQuery(this).find('i.theChampFacebookBackground'); 709 var shareCountString = typeof jQuery(facebookCountElementBg).attr('heateor-ss-fb-shares') != 'undefined' ? jQuery(facebookCountElementBg).attr('heateor-ss-fb-shares').trim() : ''; 710 if(shareCountString != ''){ 711 var shareCount = parseInt(theChampCalculateActualCount(shareCountString)); 712 if(jQuery(facebookCountElement).attr('ss_st_count') !== undefined){ 713 var startingCount = parseInt(jQuery(facebookCountElement).attr('ss_st_count').trim()); 714 shareCount = Math.abs(shareCount - startingCount); 715 } 716 facebookShares[heateorSsFacebookTargetUrls[0][i]] = shareCount; 717 return; 718 } 719 }); 720 } 721 if(!jQuery.isEmptyObject(facebookShares)){ 722 theChampSaveFacebookShares(facebookShares); 723 } 724 }, 1000); 725 } 726 }); 727} 728 729function theChampSaveFacebookShares(facebookShares){ 730 jQuery.ajax({ 731 type: 'GET', 732 dataType: 'json', 733 url: theChampSharingAjaxUrl, 734 data: { 735 action: 'the_champ_save_facebook_shares', 736 share_counts: facebookShares, 737 }, 738 success: function(data, textStatus, XMLHttpRequest){} 739 }); 740} 741 742function theChampCalculateApproxCount(sharingCount){ 743 // round to one decimal 744 if(sharingCount > 999 && sharingCount < 10000){ 745 sharingCount = (Math.round(sharingCount/100))/10 + 'K'; 746 }else if(sharingCount > 9999 && sharingCount < 100000){ 747 sharingCount = (Math.round(sharingCount/100))/10 + 'K'; 748 }else if(sharingCount > 99999 && sharingCount < 1000000){ 749 sharingCount = (Math.round(sharingCount/100))/10 + 'K'; 750 }else if(sharingCount > 999999){ 751 sharingCount = (Math.round(sharingCount/100000))/10 + 'M'; 752 } 753 return sharingCount; 754} 755 756function theChampCalculateActualCount(sharingCount){ 757 if(sharingCount.indexOf('K') > 0){ 758 sharingCount = sharingCount.replace('K', '') * 1000; 759 }else if(sharingCount.indexOf('M') > 0){ 760 sharingCount = sharingCount.replace('M', '') * 1000000; 761 } 762 return parseInt(sharingCount); 763} 764 765function theChampCapitaliseFirstLetter(e) { 766 return e.charAt(0).toUpperCase() + e.slice(1) 767} 768 769jQuery(function(){ 770 var heateorSsWhatsappJSAPI = heateorSsDetermineWhatsappShareAPI(false); 771 var classes = ['the_champ_vertical_sharing', 'the_champ_vertical_counter']; 772 for(var i = 0; i < classes.length; i++){ 773 if(jQuery('.' + classes[i]).length){ 774 jQuery('.' + classes[i]).each(function(){ 775 var verticalSharingHtml = jQuery(this).html(); 776 if(jQuery(this).attr('style').indexOf('right') >= 0){ 777 var removeClass = 'theChampPushIn', margin = 'Right', alignment = 'right', addClass = 'theChampPullOut'; 778 }else{ 779 var removeClass = 'theChampPullOut', margin = 'Left', alignment = 'left', addClass = 'theChampPushIn'; 780 } 781 jQuery(this).html(verticalSharingHtml + '<div title="Hide" style="float:' + alignment + '" onclick="theChampHideSharing(this, \''+ removeClass +'\', \''+ addClass +'\',\'' + margin +'\', \'' + alignment + '\')" class="theChampSharingArrow ' + removeClass + '"></div>'); 782 }); 783 } 784 } 785 if(theChampMobileStickySharingEnabled == 1){ 786 if(jQuery('div.the_champ_vertical_sharing').length){ 787 // insert div before </body> 788 jQuery(document.body).append("<div class='heateor_ss_mobile_footer'></div>"); 789 } 790 } 791 792 var heateorSsClipboard = new Clipboard('.theChampCopyLinkBackgroun
792d, .theChampCopyLinkShare, .theChampCopyLinkSvg', { 793 text: function(trigger) { 794 if(jQuery(trigger).hasClass('theChampCopyLinkShare')){ 795 var element = trigger.parentElement.parentElement.parentElement.parentElement; 796 var url = jQuery(element).attr("data-href") || ""; 797 }else if(jQuery(trigger).hasClass('theChampCopyLinkSvg')){ 798 var element = trigger.parentElement.parentElement.parentElement.parentElement; 799 var url = jQuery(element).attr("super-socializer-data-href") || ""; 800 if(jQuery(element).hasClass('the_champ_horizontal_sharing') && typeof heateorSsHorSharingShortUrl != undefined){ 801 var url = heateorSsHorSharingShortUrl; 802 }else if(jQuery(element).hasClass('the_champ_vertical_sharing') && typeof heateorSsVerticalSharingShortUrl != undefined){ 803 var url = heateorSsVerticalSharingShortUrl; 804 } 805 if(!url){ 806 var element = trigger.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; 807 var url = jQuery(element).attr("data-href") || ""; 808 } 809 } 810 return url; 811 } 812 }); 813 heateorSsClipboard.on('success', function(e) { 814 alert(heateorSsCopyLinkMessage); 815 }); 816}); 817 818function theChampHideSharing(elem, removeClass, addClass, margin, alignment){ 819 var animation = {}, counter = jQuery(elem).parent().hasClass('the_champ_vertical_counter'), offset = parseInt(jQuery(elem).parent().css('width')) + 10 - (counter ? 16 : 0); 820 var ssOffset = jQuery(elem).parent().attr('ss-offset'); 821 if(ssOffset){ 822 var savedOffset = parseInt(ssOffset); 823 }else{ 824 var savedOffset = (counter ? theChampCounterOffset : theChampSharingOffset); 825 } 826 if(jQuery(elem).attr('title') == 'Hide'){ 827 animation[alignment] = "-=" + (offset + savedOffset); 828 jQuery(elem).parent().animate(animation, 400, function(){ 829 jQuery(elem).removeClass(removeClass).addClass(addClass).attr('title', 'Share'); 830 if(counter){ 831 var cssFloat = alignment == 'left' ? 'right' : 'left'; 832 jQuery(elem).css('float', cssFloat); 833 }else{ 834 jQuery(elem).css('margin' + margin, offset + 'px') 835 } 836 }); 837 }else{ 838 animation[alignment] = "+=" + (offset + savedOffset); 839 jQuery(elem).parent().animate(animation, 400, function(){ 840 jQuery(elem).removeClass(addClass).addClass(removeClass).attr('title', 'Hide'); 841 if(counter){ 842 jQuery(elem).css('float', alignment); 843 }else{ 844 jQuery(elem).css('margin' + margin, '0px'); 845 } 846 }); 847 } 848} 849 850/*! 851 * clipboard.js v1.7.1 852 * https://zenorocha.github.io/clipboard.js 853 * 854 * Licensed MIT é Zeno Rocha 855 */ 856!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function t(e,n,o){function i(a,c){if(!n[a]){if(!e[a]){var l="function"==typeof require&&require;if(!c&&l)return l(a,!0);if(r)return r(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var u=n[a]={exports:{}};e[a][0].call(u.exports,function(t){var n=e[a][1][t];return i(n||t)},u,u.exports,t,e,n,o)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(t,e,n){function o(t,e){for(;t&&t.nodeType!==i;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var i=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}e.exports=o},{}],2:[function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function i(t,e,n,o){return function(n){n.delegateTarget=r(n.target,e),n.delegateTarget&&o.call(t,n)}}var r=t("./closest");e.exports=o},{"./closest":1}],3:[function(t,e,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},{}],4:[function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return i(t,e,n);if(c.nodeList(t))return r(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function r(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return l(document.body,t,e,n)}var c=t("./is"),l=t("delegate");e.exports=o},{"./is":3,delegate:2}],5:[function(t,e,n){function o(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}
vendor: 7,655 bytes, line 856
856else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),i=document.createRange();i.selectNodeContents(t),o.removeAllRanges(),o.addRange(i),e=o.toString()}return e}e.exports=o},{}],6:[function(t,e,n){function o(){}o.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){i.off(t,o),e.apply(n,arguments)}var i=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,i=n.length;for(o;o<i;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],i=[];if(o&&e)for(var r=0,a=o.length;r<a;r++)o[r].fn!==e&&o[r].fn._!==e&&i.push(o[r]);return i.length?n[t]=i:delete n[t],this}},e.exports=o},{}],7:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","select"],r);else if(void 0!==o)r(n,e("select"));else{var a={exports:{}};r(a,i.select),i.clipboardAction=a.exports}}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var i=n(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),c=function(){function t(e){o(this,t),this.resolveOptions(e),this.initSelection()}return a(t,[{key:"resolveOptions",value:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function t(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function t(){var e=this,n="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[n?"right":"left"]="-9999px";var o=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=o+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,i.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function t(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function t(){this.selectedText=(0,i.default)(this.target),this.copyText()}},{key:"copyText",value:function t(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function t(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function t(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function t(){this.removeFake()}},{key:"action",set:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function t(){return this._action}},{key:"target",set:function t(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":r(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function t(){return this._target}}]),t}();t.exports=c})},{select:5}],8:[function(e,n,o){!function(i,r){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],r);else if(void 0!==o)r(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var a={exports:{}};r(a,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=a.exports}}(this,function(t,e,n,o){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var s=i(e),u=i(n),f=i(o),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),p=function(t){function e(t,n){r(this,e);var o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.resolveOptions(n),o.listenClick(t),o}return c(e,t),h(e,[{key:"resolveOptions",value:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function t(e){var n=this;this.listener=(0,f.default)(e,"click",function(t){return n.onClick(t)})}},{key:"onClick",value:function t(e){var n=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new s.default({action:this.action(n),target:this.target(n),text:this.text(n),container:this.container,trigger:n,emitter:this})}},{key:"defaultAction",value:function t(e){return l("action",e)}},{key:"defaultTarget",value:function t(e){var n=l("target",e);if(n)return document.querySelector(n)}},{key:"defaultText",value:function t(e){return l("text",e)}},{key:"destroy",value:function t(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],n="string"==typeof e?[e]:e,o=!!document.queryCommandSupported;
856return n.forEach(function(t){o=o&&!!document.queryCommandSupported(t)}),o}}]),e}(u.default);t.exports=p})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)});
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.