jellyfin-web/dashboard-ui/scripts/supporterpage.js

30 lines
817 B
JavaScript
Raw Normal View History

2013-02-20 18:33:05 -07:00
var SupporterPage = {
onPageShow: function () {
SupporterPage.load();
},
onPageHide: function () {
},
load: function() {
Dashboard.showLoadingMsg();
var page = $.mobile.activePage;
ApiClient.getPluginSecurityInfo().done(function (info) {
$('#txtSupporterKey', page).val(info.SupporterKey);
if (info.IsMBSupporter) {
$('.supporterOnly', page).show();
} else {
$('.supporterOnly', page).hide();
}
2014-01-16 15:49:31 -07:00
$('#paypalReturnUrl', page).val(ApiClient.getUrl("supporterkey.html"));
2013-02-20 18:33:05 -07:00
Dashboard.hideLoadingMsg();
});
}
};
$(document).on('pageshow', "#supporterPage", SupporterPage.onPageShow)
.on('pagehide', "#supporterPage", SupporterPage.onPageHide);