{"version":3,"sources":["src/scripts/components/full-twitter.js"],"names":["$","jQuery","fullTwitter","each","cleanedHost","location","host","indexOf","window","replace","a","RegExp","test","prop","click","event","preventDefault","stopPropagation","open","href","attr"],"mappings":";;;;;AAAA,IAAIA,IAAIC,MAAR;;AAEA;AACA,SAASC,WAAT,GAAuB;AACrB;AACAF,IAAE,GAAF,EAAOG,IAAP,CAAY,YAAW;AACrB,QAAIC,WAAJ;;AAEA,QAAGC,SAASC,IAAT,CAAcC,OAAd,CAAsB,MAAtB,MAAkC,CAArC,EAAwC;AACtCH,oBAAcI,OAAOH,QAAP,CAAgBC,IAAhB,CAAqBG,OAArB,CAA6B,MAA7B,EAAoC,EAApC,CAAd;AACD,KAFD,MAGK;AACHL,oBAAcI,OAAOH,QAAP,CAAgBC,IAA9B;AACD;;AAED,QAAII,IAAI,IAAIC,MAAJ,CAAWP,WAAX,CAAR;;AAEA,QAAG,CAACM,EAAEE,IAAF,CAAOZ,EAAE,IAAF,EAAQa,IAAR,CAAa,MAAb,CAAP,CAAJ,EAAkC;AAChCb,QAAE,IAAF,EAAQc,KAAR,CAAc,UAASC,KAAT,EAAgB;AAC5BA,cAAMC,cAAN;AACAD,cAAME,eAAN;AACAT,eAAOU,IAAP,CAAY,KAAKC,IAAjB,EAAuB,QAAvB;AACD,OAJD,EAIGC,IAJH,CAIQ,eAJR,EAIyB,KAJzB;AAKD;AACF,GAnBD;AAoBA;AACD;;QAEQlB,W,GAAAA,W","file":"full-twitter.js","sourcesContent":["var $ = jQuery;\n\n//opens all external links in new tabs\nfunction fullTwitter() {\n // if($('.full-twitter').length) {\n $('a').each(function() {\n var cleanedHost;\n\n if(location.host.indexOf('www.') === 0) {\n cleanedHost = window.location.host.replace('www.','');\n }\n else {\n cleanedHost = window.location.host;\n }\n\n var a = new RegExp(cleanedHost);\n\n if(!a.test($(this).prop('host'))) {\n $(this).click(function(event) {\n event.preventDefault();\n event.stopPropagation();\n window.open(this.href, '_blank');\n }).attr('data-external', 'yes');\n }\n });\n // }\n}\n\nexport { fullTwitter };\n\n"]}