mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
1 line
875 B
JavaScript
1 line
875 B
JavaScript
define(["events","loading"],function(events,loading){"use strict";function onListingsSubmitted(){Dashboard.navigate("livetvstatus.html")}function init(page,type,providerId){var url="components/tvproviders/"+type+".js";require([url],function(factory){var instance=new factory(page,providerId,{});events.on(instance,"submitted",onListingsSubmitted),instance.init()})}function loadTemplate(page,type,providerId){var xhr=new XMLHttpRequest;xhr.open("GET","components/tvproviders/"+type+".template.html",!0),xhr.onload=function(e){var html=this.response,elem=page.querySelector(".providerTemplate");elem.innerHTML=Globalize.translateDocument(html),init(page,type,providerId)},xhr.send()}pageIdOn("pageshow","liveTvGuideProviderPage",function(){loading.show();var providerId=getParameterByName("id"),type=getParameterByName("type"),page=this;loadTemplate(page,type,providerId)})}); |