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:
parent
60c0e58c64
commit
3de82f210a
1 changed files with 13 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue