mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
minify
This commit is contained in:
parent
82bcca376f
commit
8a6884abef
494 changed files with 256 additions and 120180 deletions
|
@ -1,50 +1 @@
|
|||
define(function () {
|
||||
'use strict';
|
||||
|
||||
var importedFiles = [];
|
||||
|
||||
return {
|
||||
|
||||
load: function (cssId, req, load, config) {
|
||||
|
||||
// Somehow if the url starts with /html, require will get all screwed up since this extension is also called html
|
||||
cssId = cssId.replace('js/requirehtml', 'html');
|
||||
|
||||
var url = cssId + '.html';
|
||||
|
||||
if (url.indexOf('://') === -1) {
|
||||
url = config.baseUrl + url;
|
||||
}
|
||||
|
||||
if (importedFiles.indexOf(url) === -1) {
|
||||
importedFiles.push(url);
|
||||
|
||||
var link = document.createElement('link');
|
||||
link.rel = 'import';
|
||||
|
||||
if (config.urlArgs) {
|
||||
if (url.toLowerCase().indexOf('bower_') === -1 || url.toLowerCase().indexOf('emby-webcomponents') !== -1) {
|
||||
url = url + config.urlArgs(cssId, url);
|
||||
}
|
||||
}
|
||||
|
||||
link.onload = load;
|
||||
link.href = url;
|
||||
|
||||
document.head.appendChild(link);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
load();
|
||||
},
|
||||
|
||||
normalize: function (name, normalize) {
|
||||
if (name.substr(name.length - 5, 5) === '.html') {
|
||||
name = name.substr(0, name.length - 5);
|
||||
}
|
||||
|
||||
return normalize(name);
|
||||
}
|
||||
};
|
||||
});
|
||||
define(function(){"use strict";var importedFiles=[];return{load:function(cssId,req,load,config){cssId=cssId.replace("js/requirehtml","html");var url=cssId+".html";if(url.indexOf("://")===-1&&(url=config.baseUrl+url),importedFiles.indexOf(url)===-1){importedFiles.push(url);var link=document.createElement("link");return link.rel="import",config.urlArgs&&(url.toLowerCase().indexOf("bower_")!==-1&&url.toLowerCase().indexOf("emby-webcomponents")===-1||(url+=config.urlArgs(cssId,url))),link.onload=load,link.href=url,void document.head.appendChild(link)}load()},normalize:function(name,normalize){return".html"===name.substr(name.length-5,5)&&(name=name.substr(0,name.length-5)),normalize(name)}}});
|
Loading…
Add table
Add a link
Reference in a new issue