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

using NativeShell api for native apps in shell.js

This commit is contained in:
vitorsemeano 2019-03-16 18:11:46 +00:00
parent 60c0e58c64
commit 3de82f210a

View file

@ -2,8 +2,13 @@ define([], function () {
'use strict';
return {
openUrl: function (url) {
window.open(url, '_blank');
openUrl: function (url, target) {
if (window.NativeShell) {
window.NativeShell.openUrl(url, target);
} else {
window.open(url, target || '_blank');
}
},
canExec: false,
exec: function (options) {
@ -12,10 +17,14 @@ define([], function () {
return Promise.reject();
},
enableFullscreen: function () {
// do nothing since this is for native apps
if (window.NativeShell) {
window.NativeShell.enableFullscreen();
}
},
disableFullscreen: function () {
// do nothing since this is for native apps
if (window.NativeShell) {
window.NativeShell.disableFullscreen();
}
}
};
});