1/*! 2 * Get JSONP data 3 * (c) 2017 Chris Ferdinandi, MIT License, https://gomakethings.com 4 * @param {String} url The JSON URL 5 * @param {Function} callback The function to run after JSONP data loaded 6 */ 7var getJSONP = function ( url, callback ) { 8 9 // Create script with url and callback (if specified) 10 var ref = window.document.getElementsByTagName( 'script' )[ 0 ]; 11 var script = window.document.createElement( 'script' ); 12 script.src = url + (url.indexOf( '?' ) + 1 ? '&' : '?') + 'callback=' + callback; 13 14 // Insert script tag into the DOM (append to <head>) 15 ref.parentNode.insertBefore( script, ref ); 16 17 // After the script is loaded (and executed), remove it 18 script.onload = function () { 19 this.remove(); 20 }; 21 22};
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.