Download node_modules/jquery/src/ajax/script.js from Leon4gr45/matomo: direct link, hf CLI and curl.
- Browser
- Download file 1.64 kB
-
https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/node_modules/jquery/src/ajax/script.js
- Command line
-
hf download hf://spaces/Leon4gr45/matomo/node_modules/jquery/src/ajax/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Leon4gr45/matomo/resolve/main/node_modules/jquery/src/ajax/script.js
1.64 kB
| define( [ | |
| "../core", | |
| "../var/document", | |
| "../ajax" | |
| ], function( jQuery, document ) { | |
| ; | |
| // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) | |
| jQuery.ajaxPrefilter( function( s ) { | |
| if ( s.crossDomain ) { | |
| s.contents.script = false; | |
| } | |
| } ); | |
| // Install script dataType | |
| jQuery.ajaxSetup( { | |
| accepts: { | |
| script: "text/javascript, application/javascript, " + | |
| "application/ecmascript, application/x-ecmascript" | |
| }, | |
| contents: { | |
| script: /\b(?:java|ecma)script\b/ | |
| }, | |
| converters: { | |
| "text script": function( text ) { | |
| jQuery.globalEval( text ); | |
| return text; | |
| } | |
| } | |
| } ); | |
| // Handle cache's special case and crossDomain | |
| jQuery.ajaxPrefilter( "script", function( s ) { | |
| if ( s.cache === undefined ) { | |
| s.cache = false; | |
| } | |
| if ( s.crossDomain ) { | |
| s.type = "GET"; | |
| } | |
| } ); | |
| // Bind script tag hack transport | |
| jQuery.ajaxTransport( "script", function( s ) { | |
| // This transport only deals with cross domain or forced-by-attrs requests | |
| if ( s.crossDomain || s.scriptAttrs ) { | |
| var script, callback; | |
| return { | |
| send: function( _, complete ) { | |
| script = jQuery( "<script>" ) | |
| .attr( s.scriptAttrs || {} ) | |
| .prop( { charset: s.scriptCharset, src: s.url } ) | |
| .on( "load error", callback = function( evt ) { | |
| script.remove(); | |
| callback = null; | |
| if ( evt ) { | |
| complete( evt.type === "error" ? 404 : 200, evt.type ); | |
| } | |
| } ); | |
| // Use native DOM manipulation to avoid our domManip AJAX trickery | |
| document.head.appendChild( script[ 0 ] ); | |
| }, | |
| abort: function() { | |
| if ( callback ) { | |
| callback(); | |
| } | |
| } | |
| }; | |
| } | |
| } ); | |
| } ); | |