1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/require/requiretext.js

1 line
517 B
JavaScript
Raw Normal View History

2018-09-12 19:26:21 +02:00
define(function(){"use strict";var addRedirectPrevention=null!=self.dashboardVersion&&self.Dashboard&&!self.Dashboard.isConnectMode();return{load:function(url,req,load,config){-1===url.indexOf("://")&&(url=config.baseUrl+url),config.urlArgs&&(url+=config.urlArgs(url,url)),addRedirectPrevention&&(-1===url.indexOf("?")?url+="?":url+="&",url+="r=0");var xhr=new XMLHttpRequest;xhr.open("GET",url,!0),xhr.onload=function(e){load(this.response)},xhr.send()},normalize:function(name,normalize){return normalize(name)}}});