1/* share42.com | 28.05.2014 | (c) Dimox */ 2window.onload = function () 3{ 4 var e = document.getElementsByTagName('div'); 5 for (var k = 0; k < e.length; k++) 6 { 7 if (e[k].className.indexOf('share42init') != -1) 8 { 9 if (e[k].getAttribute('data-url') != -1) 10 var u = e[k].getAttribute('data-url'); 11 if (e[k].getAttribute('data-title') != -1) 12 var t = e[k].getAttribute('data-title'); 13 if (e[k].getAttribute('data-image') != -1) 14 var i = e[k].getAttribute('data-image'); 15 if (e[k].getAttribute('data-description') != -1) 16 var d = e[k].getAttribute('data-description'); 17 if (e[k].getAttribute('data-path') != -1) 18 var f = e[k].getAttribute('data-path'); 19 if (e[k].getAttribute('data-icons-file') != -1) 20 var fn = e[k].getAttribute('data-icons-file'); 21 if (!f) 22 { 23 function path(name) 24 { 25 var sc = document.getElementsByTagName('script'), sr = new RegExp('^(.*/|)(' + name + ')([#?]|$)'); 26 for (var p = 0, scL = sc.length; p < scL; p++) 27 { 28 var m = String(sc[p].src).match(sr); 29 if (m) 30 { 31 if (m[1].match(/^((https?|file)\:\/{2,}|\w:[\/\\])/)) 32 return m[1];
33 if (m[1].indexOf("/") == 0) 34 return m[1]; 35 b = document.getElementsByTagName('base'); 36 if (b[0] && b[0].href) 37 return b[0].href + m[1]; 38 else 39 return document.location.pathname.match(/(.*[\/\\])/)[0] + m[1]; 40 } 41 } 42 return null; 43 } 44 f = path('share42.js'); 45 } 46 if (!u) u = location.href; 47 if (!t) t = document.title; 48 if (!fn) fn = 'icons.png'; 49 function desc() 50 { 51 var meta = document.getElementsByTagName('meta'); 52 for (var m = 0; m < meta.length; m++) 53 { 54 if (meta[m].name.toLowerCase() == 'description') 55 { 56 return meta[m].content; 57 } 58 } 59 return ''; 60 } if (!d) d = desc(); 61 u = encodeURIComponent(u); 62 t = encodeURIComponent(t); 63 t = t.replace(/\'/g, '%27'); 64 i = encodeURIComponent(i); 65 d = encodeURIComponent(d); 66 d = d.replace(/\'/g, '%27'); 67 var fbQuery = 'u=' + u; 68 if (i != 'null' && i != '') 69 fbQuery = 's=100&p[url]=' + u + '&p[title]=' + t + '&p[summary]=' + d + '&p[images][0]=' + i; 70 var s = new Array('"#" data-count="fb" onclick="window.open(\'http://www.facebook.com/sharer.php?m2w&' + fbQuery + '\', \'_blank\', \'scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=550, height=440, toolbar=0, status=0\');return false" title="Share on Facebook"', 71 '"#" data-count="gplus" onclick="window.open(\'https://plus.google.com/share?url=' + u + '\', \'_blank\', \'scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=550, height=440, toolbar=0, status=0\');return false" title="Share on Google+"', 72 '"#" data-count="lnkd" onclick="window.open(\'http://www.linkedin.com/shareArticle?mini=true&url=' + u + '&title=' + t+'\', \'_blank\', \'scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=600, height=400, toolbar=0, status=0\');return false" title="Share on Linkedin"', 73 '"#" data-count="twi" onclick="window.open(\'https://twitter.com/intent/tweet?text=' + t + '&url=' + u + '\', \'_blank\', \'scrollbars=0, resizable=1, menubar=0, left=100, top=100, width=550, height=440, toolbar=0, status=0\');return false" title="Share on Twitter"', 74 '"http://share42.com/" title="Share42.com - Free Social Sharing Buttons Script"'); var l = ''; for (j = 0; j < s.length; j++) l += '<a rel="nofollow" style="display:inline-block;vertical-align:bottom;width:24px;height:24px;margin:0 6px 6px 0;padding:0;outline:none;background:url(' + f + fn + ') -' + 24 * j + 'px 0 no-repeat" href=' + s[j] + ' target="_blank"></a>'; e[k].innerHTML = '<span id="share42">' + l + '</span>'; 75 } 76 }; 77};
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.