mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
7537bab562
commit
d84c5a7c1d
226 changed files with 51770 additions and 4157 deletions
|
@ -1,15 +1,17 @@
|
|||
define([
|
||||
define( [
|
||||
"../core",
|
||||
"../var/document",
|
||||
"../ajax"
|
||||
], function( jQuery ) {
|
||||
], function( jQuery, document ) {
|
||||
|
||||
// Install script dataType
|
||||
jQuery.ajaxSetup({
|
||||
jQuery.ajaxSetup( {
|
||||
accepts: {
|
||||
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
|
||||
script: "text/javascript, application/javascript, " +
|
||||
"application/ecmascript, application/x-ecmascript"
|
||||
},
|
||||
contents: {
|
||||
script: /(?:java|ecma)script/
|
||||
script: /\b(?:java|ecma)script\b/
|
||||
},
|
||||
converters: {
|
||||
"text script": function( text ) {
|
||||
|
@ -17,7 +19,7 @@ jQuery.ajaxSetup({
|
|||
return text;
|
||||
}
|
||||
}
|
||||
});
|
||||
} );
|
||||
|
||||
// Handle cache's special case and crossDomain
|
||||
jQuery.ajaxPrefilter( "script", function( s ) {
|
||||
|
@ -27,20 +29,20 @@ jQuery.ajaxPrefilter( "script", function( s ) {
|
|||
if ( s.crossDomain ) {
|
||||
s.type = "GET";
|
||||
}
|
||||
});
|
||||
} );
|
||||
|
||||
// Bind script tag hack transport
|
||||
jQuery.ajaxTransport( "script", function( s ) {
|
||||
|
||||
// This transport only deals with cross domain requests
|
||||
if ( s.crossDomain ) {
|
||||
var script, callback;
|
||||
return {
|
||||
send: function( _, complete ) {
|
||||
script = jQuery("<script>").prop({
|
||||
async: true,
|
||||
script = jQuery( "<script>" ).prop( {
|
||||
charset: s.scriptCharset,
|
||||
src: s.url
|
||||
}).on(
|
||||
} ).on(
|
||||
"load error",
|
||||
callback = function( evt ) {
|
||||
script.remove();
|
||||
|
@ -50,6 +52,8 @@ jQuery.ajaxTransport( "script", function( s ) {
|
|||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Use native DOM manipulation to avoid our domManip AJAX trickery
|
||||
document.head.appendChild( script[ 0 ] );
|
||||
},
|
||||
abort: function() {
|
||||
|
@ -59,6 +63,6 @@ jQuery.ajaxTransport( "script", function( s ) {
|
|||
}
|
||||
};
|
||||
}
|
||||
});
|
||||
} );
|
||||
|
||||
});
|
||||
} );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue