1jQuery(document).ready( function($) { 2 3 /* Hide Whatsapp button on other devices than iPhones and Androids */ 4 if(navigator.userAgent.match(/(iPhone)/i) || navigator.userAgent.match(/(Android)/i)){ 5 $('.mashicon-whatsapp').show(); 6 } 7 /* Network sharer scripts */ 8 $('.mashicon-google').click( function(e) { 9 e.preventDefault(); 10 winWidth = 520; 11 winHeight = 350; 12 var winTop = (screen.height / 2) - (winHeight / 2); 13 var winLeft = (screen.width / 2) - (winWidth / 2); 14 var url = $(this).attr('href'); 15 //if (mashsb.singular === '1') { 16 //window.open('https://plus.google.com/share?text=' + mashsb.title + '&url=' + mashsb.share_url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 17 /*}else{ 18 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 19 }*/ 20 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 21 }); 22 $('.mashicon-buffer').click( function(e) { 23 e.preventDefault(); 24 console.log("buffer"); 25 winWidth = 800; 26 winHeight = 470; 27 var winTop = (screen.height / 2) - (winHeight / 2); 28 var winLeft = (screen.width / 2) - (winWidth / 2); 29 var url = $(this).attr('href'); 30 //if (mashsb.singular === '1') { 31 //window.open('https://bufferapp.com/add?url=' + mashsb.share_url + '&text=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 32 /*} else{ 33 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 34 }*/ 35 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 36 }); 37 $('.mashicon-pinterest').click( function(e) { 38 e.preventDefault(); 39 winWidth = 520; 40 winHeight = 350; 41 var winTop = (screen.height / 2) - (winHeight / 2); 42 var winLeft = (screen.width / 2) - (winWidth / 2); 43 var url = $(this).attr('href'); 44 //if (mashsb.singular === '1') { 45 //window.open('http://www.pinterest.com/pin/create/bookmarklet/?pinFave=1&url=' + mashsb.share_url + '&media=' + mashsb.image + '&description=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 46 /*} else { 47 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 48 }*/ 49 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 50 }); 51 $('.mashicon-linkedin').click( function(e) { 52 e.preventDefault(); 53 winWidth = 520; 54 winHeight = 350; 55 var winTop = (screen.height / 2) - (winHeight / 2); 56 var winLeft = (screen.width / 2) - (winWidth / 2); 57 var url = $(this).attr('href'); 58 //if (mashsb.singular === '1') { 59 //window.open('https://www.linkedin.com/shareArticle?trk=' + mashsb.title + '&url=' + mashsb.share_url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 60 /*} else { 61 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 62 }*/ 63 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 64 }); 65 $('.mashicon-digg').click( function(e) { 66 e.preventDefault(); 67 winWidth = 520; 68 winHeight = 350; 69 var winTop = (screen.height / 2) - (winHeight / 2); 70 var winLeft = (screen.width / 2) - (winWidth / 2); 71 var url = $(this).attr('href'); 72 //window.open('http://digg.com/submit?phase=2%20&url=' + mashsb.share_url + '&title=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 73 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 74 }); 75 $('.mashicon-stumbleupon').click( function(e) { 76 e.preventDefault(); 77 winWidth = 520; 78 winHeight = 350; 79 var winTop = (screen.height / 2) - (winHeight / 2); 80 var winLeft = (screen.width / 2) - (winWidth / 2); 81 var url = $(this).attr('href'); 82 /*if (mashsb.singular === '1') { 83 window.open('http://www.stumbleupon.com/submit?url=' + encodeURIComponent(mashsb.share_url), 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 84 }else{*/ 85 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 86 //} 87 }); 88 $('.mashicon-vk').click( function(e) { 89 e.preventDefault(); 90 winWidth = 520; 91 winHeight = 350; 92 var winTop = (screen.height / 2) - (winHeight / 2); 93 var winLeft = (screen.width / 2) - (winWidth / 2); 94 var url = $(this).attr('href'); 95 //if (mashsb.singular === '1') { 96 //window.open('http://vkontakte.ru/share.php?url=' + mashsb.share_url + '&item=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 97 /*}else{*/ 98 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 99 //} 100 }); 101 $('.mashicon-print').click( function(e) { 102 e.preventDefault(); 103 winWidth = 520; 104 winHeight = 350; 105 var winTop = (screen.height / 2) - (winHeight / 2); 106 var winLeft = (screen.width / 2) - (winWidth / 2); 107 var url = $(this).attr('href'); 108 //window.open('http://www.printfriendly.com/print/?url=' + mashsb.share_url + '&item=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 109 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 110 }); 111 $('.mashicon-reddit').click( function(e) { 112 e.preventDefault(); 113 winWidth = 520; 114 winHeight = 820; 115 var winTop = (screen.height / 2) - (winHeight / 2); 116 var winLeft = (screen.width / 2) - (winWidth / 2); 117 var url = $(this).attr('href'); 118 /*if (mashsb.singular === '1') { 119 window.open('http://www.reddit.com/submit?url=' + mashsb.share_url + '&title=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 120 }else{*/ 121 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 122 //} 123 }); 124 $('.mashicon-delicious').click( function(e) { 125 e.preventDefault(); 126 winWidth = 520; 127 winHeight = 350; 128 var winTop = (screen.height / 2) - (winHeight / 2); 129 var winLeft = (screen.width / 2) - (winWidth / 2); 130 var url = $(this).attr('href'); 131 /*if (mashsb.singular === '1') { 132 window.open('https://delicious.com/save?v=5&noui&jump=close&url=' + mashsb.share_url + '&title=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 133 }else{*/ 134 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 135 //} 136 }); 137 $('.mashicon-weibo').click( function(e) { 138 e.preventDefault(); 139 winWidth = 520; 140 winHeight = 350; 141 var winTop = (screen.height / 2) - (winHeight / 2); 142 var winLeft = (screen.width / 2) - (winWidth / 2); 143 var url = $(this).attr('href'); 144 /*if (mashsb.singular === '1') { 145 window.open('http://service.weibo.com/share/share.php?url=' + mashsb.share_url + '&title=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 146 }else{*/ 147 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 148 //} 149 }); 150 $('.mashicon-pocket').click( function(e) { 151 e.preventDefault(); 152 winWidth = 520; 153 winHeight = 350; 154 var winTop = (screen.height / 2) - (winHeight / 2); 155 var winLeft = (screen.width / 2) - (winWidth / 2); 156 var url = $(this).attr('href'); 157 /*if (mashsb.singular === '1') { 158 window.open('https://getpocket.com/save?title=' + mashsb.title + '&url=' + mashsb.share_url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 159 }else{*/ 160 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 161 //} 162 }); 163 $('.mashicon-xing').click( function(e) { 164 e.preventDefault(); 165 winWidth = 520; 166 winHeight = 350; 167 var winTop = (screen.height / 2) - (winHeight / 2); 168 var winLeft = (screen.width / 2) - (winWidth / 2); 169 var url = $(this).attr('href'); 170 /*if (mashsb.singular === '1') { 171 window.open('https://www.xing.com/social_plugins/share?h=1;url=' + mashsb.share_url + '&title=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 172 }else{*/ 173 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 174 //} 175 }); 176 $('.mashicon-odnoklassniki').click( function(e) { 177 e.preventDefault(); 178 winWidth = 520; 179 winHeight = 350; 180 var winTop = (screen.height / 2) - (winHeight / 2); 181 var winLeft = (screen.width / 2) - (winWidth / 2); 182 var url = $(this).attr('href'); 183 /*if (mashsb.singular === '1') { 184 window.open('http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl=' + mashsb.share_url + '&title=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 185 }else{ 186 */ 187 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 188 //} 189 }); 190 $('.mashicon-managewp').click( function(e) { 191 e.preventDefault(); 192 winWidth = 520; 193 winHeight = 350; 194 var winTop = (screen.height / 2) - (winHeight / 2); 195 var winLeft = (screen.width / 2) - (winWidth / 2); 196 var url = $(this).attr('href'); 197 /*if (mashsb.singular === '1') { 198 window.open('http://managewp.org/share/form?url=' + mashsb.share_url + '&title=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 199 }else{*/ 200 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 201 //} 202 }); 203 $('.mashicon-tumblr').click( function(e) { 204 e.preventDefault(); 205 winWidth = 520; 206 winHeight = 350; 207 var winTop = (screen.height / 2) - (winHeight / 2); 208 var winLeft = (screen.width / 2) - (winWidth / 2); 209 var url = $(this).attr('href'); 210 /*if (mashsb.singular === '1') { 211 window.open('https://www.tumblr.com/share?v=3&u='+ encodeURIComponent(mashsb.share_url) + '&t=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 212 }else{*/ 213 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 214 //} 215 }); 216 $('.mashicon-meneame').click( function(e) { 217 e.preventDefault(); 218 winWidth = 520; 219 winHeight = 350; 220 var winTop = (screen.height / 2) - (winHeight / 2); 221 var winLeft = (screen.width / 2) - (winWidth / 2); 222 var url = $(this).attr('href'); 223 /*if (mashsb.singular === '1') { 224 window.open('http://www.meneame.net/submit.php?url=' + mashsb.share_url + '&title=' + mashsb.title, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 225 }else{*/ 226 window.open(url, 'sharer', 'top=' + winTop + ',left=' + winLeft + ',toolbar=0,status=0,width=' + winWidth + ',height=' + winHeight); 227 //} 228 }); 229 $('.mashicon-whatsapp').click( function(e) { 230 //e.preventDefault(); 231 function escapeRegExp(string) { 232 return string.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); 233 } 234 235 function replaceAll(string, find, replace) { 236 return string.replace(new RegExp(escapeRegExp(find), 'g'), replace); 237 } 238 var title = mashsb.title; 239 var url = $(this).attr('href'); 240 var href = 'whatsapp://send?text=' + replaceAll(title, '+', '%20') + '%20' + mashsb.share_url; 241 /*if (mashsb.singular === '1') { 242 $(this).attr("href", href); 243 }else{*/ 244 $(this).attr("href", url); 245 //} 246 }); 247 $('.mashicon-mail').click( function(e) { 248 if (typeof mashnet !== 'undefined'){ 249 var subject = mashnet.subject; 250 var body = mashnet.body; 251 } else { 252 var subject = 'Check out this site: '; 253 var body = ''; 254 } 255 256 /*if (mashsb.singular === '1') { 257 var href = 'mailto:?subject=' + subject + '&body=' + body + mashsb.share_url; 258 $(this).attr("href", href); 259 }else{*/ 260 var href = $(this).attr('href'); 261 $(this).attr("href", href); 262 //} 263 $(this).attr('target', '_blank'); 264 }); 265 266});
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.