1jQuery(document).ready(function($) { 2 setTimeout(function() { 3 jQuery("a").on( "click", function(event) { 4 var isdownlod = event.target.attributes["download"] ? "1" : "0"; 5 if(isdownlod == 1){ 6 event.preventDefault(); 7 console.log(isdownlod); 8 var url = jQuery(this).attr('href'); 9 console.log("this: ",jQuery(this)); 10 jQuery(this).removeAttr("href"); 11 jQuery(this).attr("link", url); 12 var xhr = new XMLHttpRequest(); 13 xhr.open('GET', url, true); 14 xhr.responseType = 'blob'; 15 xhr.onload = function(e) { 16 if (this.status == 200) { 17 var myBlob = this.response; 18 console.log(myBlob); 19 var link = document.createElement('a'); 20 link.href = window.URL.createObjectURL(myBlob); 21 link.download = url; 22 link.click(); 23 console.log("link",link); 24 } 25 }; 26 xhr.send(); 27 } 28 }); 29 }, 1000); 30});
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.