1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #490 from thornbill/global-jquery

Add jQuery to global scope
This commit is contained in:
Joshua M. Boniface 2019-09-30 00:30:57 -04:00 committed by GitHub
commit 832c1d8308
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -695,6 +695,31 @@ var AppInfo = {};
};
paths.flvjs = "thirdparty/flvjs/flv.min";
paths.shaka = "thirdparty/shaka/shaka-player.compiled";
paths.apphost = componentsPath + "/apphost";
requirejs.config({
waitSeconds: 0,
map: {
"*": {
css: "components/require/requirecss",
text: "components/require/requiretext"
}
},
bundles: {
bundle: ["jstree", "jQuery", "hlsjs", "howler", "swiper", "sortable", "libjass"]
},
urlArgs: urlArgs,
paths: paths,
onError: onRequireJsError
});
requirejs.onError = onRequireJsError;
// Expose jQuery globally
require(["jQuery"], function(jQuery) {
window.$ = jQuery;
window.jQuery = jQuery;
});
define("chromecastHelper", [componentsPath + "/chromecast/chromecasthelpers"], returnFirstDependency);
define("mediaSession", [componentsPath + "/playback/mediasession"], returnFirstDependency);
define("actionsheet", [componentsPath + "/actionsheet/actionsheet"], returnFirstDependency);
@ -783,27 +808,7 @@ var AppInfo = {};
viewManager.dispatchPageEvents(true);
return viewManager;
});
paths.apphost = componentsPath + "/apphost";
define('appStorage', [apiClientBowerPath + '/appStorage'], returnFirstDependency);
requirejs.config({
waitSeconds: 0,
map: {
"*": {
css: "components/require/requirecss",
text: "components/require/requiretext"
}
},
bundles: {
bundle: ["jstree", "jQuery", "hlsjs", "howler", "swiper", "sortable", "libjass"]
},
urlArgs: urlArgs,
paths: paths,
onError: onRequireJsError
});
requirejs.onError = onRequireJsError;
define("dashboardcss", ["css!css/dashboard"], returnFirstDependency);
define("slideshow", [componentsPath + "/slideshow/slideshow"], returnFirstDependency);
define("fetch", [bowerPath + "/fetch/fetch"], returnFirstDependency);