1$(function() 2{ 3 let shareButtons = document.querySelectorAll('.share-icon'), thisUrl = window.location.href, thisTitle = document.title; 4 // removing "work." 5 thisUrl = thisUrl.split('/'); 6 if (thisUrl[2].includes('work')){ 7 thisUrl[2] = 'dom.com.cy'; 8 } 9 if (thisUrl[thisUrl.length - 1] && thisUrl[thisUrl.length - 1][0] == '?'){ 10 thisUrl[thisUrl.length - 1] = '' 11 } 12 thisUrl = thisUrl.join('/'); 13 14 if (navigator.share && document.querySelector('html.bx-touch') != undefined) 15 { 16 document.querySelector('html').classList.add('share-true'); 17 shareButtons.forEach(function(shareButton) 18 { 19 shareButton.addEventListener('click', e => 20 { 21 var url = thisUrl; 22 if ($(e.target).data('url')) 23 url = $(e.target).data('url'); 24 25 if ($(e.target).attr('data-title')) 26 { 27 thisTitle = $(e.target).attr('data-title'); 28 } 29 30 if (navigator.share) 31 { 32 navigator.share({ 33 title: thisTitle, 34 url: url 35 }).then().catch(console.error); 36 } 37 else alert('Web Share API не поддеÑживаеÑÑÑ'); 38 }); 39 }); 40 } 41});
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.