2019-07-05 23:45:29 +02:00
|
|
|
// How to use:
|
|
|
|
|
// version: {ExtensionConf object, but only properties that get overwritten}
|
2021-02-08 23:04:54 +01:00
|
|
|
import StretchType from '../../common/enums/StretchType.enum';
|
|
|
|
|
import ExtensionMode from '../../common/enums/ExtensionMode.enum';
|
|
|
|
|
import VideoAlignmentType from '../../common/enums/VideoAlignmentType.enum';
|
2021-04-05 03:30:29 +02:00
|
|
|
import BrowserDetect from './BrowserDetect';
|
2021-10-28 22:53:23 +02:00
|
|
|
import SettingsInterface from '../../common/interfaces/SettingsInterface';
|
2023-01-07 03:05:17 +01:00
|
|
|
import { _cp } from '../../common/js/utils';
|
2023-01-15 22:11:47 +01:00
|
|
|
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
|
2023-03-30 00:45:34 +02:00
|
|
|
import AspectRatioType from '../../common/enums/AspectRatioType.enum';
|
2025-04-20 16:11:17 +02:00
|
|
|
import { update } from 'lodash';
|
2019-07-05 23:45:29 +02:00
|
|
|
|
2019-09-03 00:28:35 +02:00
|
|
|
const ExtensionConfPatch = [
|
|
|
|
|
{
|
2025-01-27 02:59:30 +01:00
|
|
|
forVersion: '6.2.4',
|
|
|
|
|
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
|
|
|
|
for (const site in userOptions.sites) {
|
|
|
|
|
userOptions.sites[site].enableUI = {
|
|
|
|
|
fullscreen: ExtensionMode.Default,
|
|
|
|
|
theater: ExtensionMode.Default,
|
|
|
|
|
normal: ExtensionMode.Default,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const uiEnabled =
|
|
|
|
|
userOptions.sites['@global'].enableUI = {
|
|
|
|
|
fullscreen: userOptions.ui.inPlayer.enabled ? ExtensionMode.Enabled : ExtensionMode.Disabled,
|
|
|
|
|
theater: ExtensionMode.Enabled,
|
|
|
|
|
normal: (userOptions.ui.inPlayer.enabled && !userOptions.ui.inPlayer.enabledFullscreenOnly) ? ExtensionMode.Enabled : ExtensionMode.Disabled
|
|
|
|
|
}
|
|
|
|
|
userOptions.sites['@empty'].enableUI = {
|
|
|
|
|
fullscreen: ExtensionMode.Default,
|
|
|
|
|
theater: ExtensionMode.Default,
|
|
|
|
|
normal: ExtensionMode.Default,
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-20 16:11:17 +02:00
|
|
|
}, {
|
|
|
|
|
forVersion: '6.2.6',
|
|
|
|
|
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
|
|
|
|
userOptions.commands.zoom = [{
|
|
|
|
|
action: 'change-zoom',
|
|
|
|
|
label: 'Zoom +5%',
|
|
|
|
|
arguments: {
|
|
|
|
|
zoom: 0.05
|
|
|
|
|
},
|
|
|
|
|
shortcut: {
|
|
|
|
|
key: 'z',
|
|
|
|
|
code: 'KeyY',
|
|
|
|
|
ctrlKey: false,
|
|
|
|
|
metaKey: false,
|
|
|
|
|
altKey: false,
|
|
|
|
|
shiftKey: false,
|
|
|
|
|
onKeyUp: true,
|
|
|
|
|
onKeyDown: false,
|
|
|
|
|
},
|
|
|
|
|
internalOnly: true,
|
|
|
|
|
actionId: 'change-zoom-10in'
|
|
|
|
|
}, {
|
|
|
|
|
action: 'change-zoom',
|
|
|
|
|
label: 'Zoom -5%',
|
|
|
|
|
arguments: {
|
|
|
|
|
zoom: -0.05
|
|
|
|
|
},
|
|
|
|
|
shortcut: {
|
|
|
|
|
key: 'u',
|
|
|
|
|
code: 'KeyU',
|
|
|
|
|
ctrlKey: false,
|
|
|
|
|
metaKey: false,
|
|
|
|
|
altKey: false,
|
|
|
|
|
shiftKey: false,
|
|
|
|
|
onKeyUp: true,
|
|
|
|
|
onKeyDown: false,
|
|
|
|
|
},
|
|
|
|
|
internalOnly: true,
|
|
|
|
|
actionId: 'change-zoom-10out'
|
|
|
|
|
}, {
|
|
|
|
|
action: 'set-zoom',
|
|
|
|
|
label: 'Reset zoom',
|
|
|
|
|
arguments: {
|
|
|
|
|
zoom: 1,
|
|
|
|
|
},
|
|
|
|
|
internalOnly: true,
|
|
|
|
|
actionId: 'set-zoom-reset'
|
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
delete (userOptions as any).actions;
|
|
|
|
|
}
|
2019-09-03 00:28:35 +02:00
|
|
|
}
|
|
|
|
|
];
|
2019-07-05 23:45:29 +02:00
|
|
|
|
2019-11-02 01:05:36 +01:00
|
|
|
|
2021-10-28 22:53:23 +02:00
|
|
|
export default ExtensionConfPatch;
|