Redefine settings interface, write function to migrate some settings on update
This commit is contained in:
parent
64bad6758b
commit
d0ba619b45
@ -32,6 +32,12 @@ interface RestrictionsSettings {
|
|||||||
onlyAllowAutodetectionInFullScreen?: boolean; // if enabled, autodetection will only start once in full screen
|
onlyAllowAutodetectionInFullScreen?: boolean; // if enabled, autodetection will only start once in full screen
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface ExtensionEnvironmentSettingsInterface {
|
||||||
|
normal: ExtensionMode,
|
||||||
|
theater: ExtensionMode,
|
||||||
|
fullscreen: ExtensionMode,
|
||||||
|
}
|
||||||
|
|
||||||
export interface CommandInterface {
|
export interface CommandInterface {
|
||||||
action: string,
|
action: string,
|
||||||
label: string,
|
label: string,
|
||||||
@ -294,49 +300,112 @@ interface SettingsInterface {
|
|||||||
// * disabled — never allow
|
// * disabled — never allow
|
||||||
//
|
//
|
||||||
sites: {
|
sites: {
|
||||||
[x: string]: {
|
[x: string]: SiteSettingsInterface,
|
||||||
defaultCrop?: any, // v6 new
|
|
||||||
defaultStretch?: any, // v6 new
|
|
||||||
|
|
||||||
// everything 'superseded by' needs to be implemented
|
|
||||||
// as well as ported from the old settings
|
|
||||||
mode?: ExtensionMode, // v6 — superseded by defaultCrop
|
|
||||||
autoar?: ExtensionMode, // v6 — superseded by defaultCrop
|
|
||||||
autoarFallback?: ExtensionMode, // v6 — deprecated, no replacement
|
|
||||||
stretch?: StretchType, // v6 — superseded by defaultStretch
|
|
||||||
videoAlignment?: VideoAlignmentType,
|
|
||||||
keyboardShortcutsEnabled?: ExtensionMode,
|
|
||||||
type?: string,
|
|
||||||
override?: boolean,
|
|
||||||
arPersistence?: boolean,
|
|
||||||
actions?: any;
|
|
||||||
|
|
||||||
cropModePersistence?: CropModePersistence;
|
|
||||||
|
|
||||||
DOM?: {
|
|
||||||
player?: {
|
|
||||||
manual?: boolean,
|
|
||||||
querySelectors?: string,
|
|
||||||
additionalCss?: string,
|
|
||||||
useRelativeAncestor?: boolean,
|
|
||||||
videoAncestor?: any,
|
|
||||||
playerNodeCss?: string,
|
|
||||||
periodicallyRefreshPlayerElement?: boolean
|
|
||||||
},
|
|
||||||
video?: {
|
|
||||||
manual?: boolean,
|
|
||||||
querySelectors?: string,
|
|
||||||
additionalCss?: string,
|
|
||||||
useRelativeAncestor?: boolean,
|
|
||||||
playerNodeCss?: string
|
|
||||||
}
|
|
||||||
},
|
|
||||||
css?: string;
|
|
||||||
usePlayerArInFullscreen?: boolean;
|
|
||||||
|
|
||||||
restrictions?: RestrictionsSettings;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// sites: {
|
||||||
|
// [x: string]: {
|
||||||
|
// defaultCrop?: any, // v6 new
|
||||||
|
// defaultStretch?: any, // v6 new
|
||||||
|
// enabled: ExtensionEnvironmentSettingsInterface, // v6 new
|
||||||
|
// enabledAard: ExtensionEnvironmentSettingsInterface,// v6 new
|
||||||
|
|
||||||
|
// // everything 'superseded by' needs to be implemented
|
||||||
|
// // as well as ported from the old settings
|
||||||
|
// mode?: ExtensionMode, // v6 — superseded by looking at enableIn
|
||||||
|
// autoar?: ExtensionMode, // v6 — superseded by looking at enableIn
|
||||||
|
// autoarFallback?: ExtensionMode, // v6 — deprecated, no replacement
|
||||||
|
// stretch?: StretchType, // v6 — superseded by defaultStretch
|
||||||
|
// videoAlignment?: VideoAlignmentType,
|
||||||
|
// keyboardShortcutsEnabled?: ExtensionMode,
|
||||||
|
// type?: string,
|
||||||
|
// override?: boolean,
|
||||||
|
// arPersistence?: boolean,
|
||||||
|
// actions?: any;
|
||||||
|
|
||||||
|
// cropModePersistence?: CropModePersistence;
|
||||||
|
|
||||||
|
// DOM?: {
|
||||||
|
// player?: {
|
||||||
|
// manual?: boolean,
|
||||||
|
// querySelectors?: string,
|
||||||
|
// additionalCss?: string,
|
||||||
|
// useRelativeAncestor?: boolean,
|
||||||
|
// videoAncestor?: any,
|
||||||
|
// playerNodeCss?: string,
|
||||||
|
// periodicallyRefreshPlayerElement?: boolean
|
||||||
|
// },
|
||||||
|
// video?: {
|
||||||
|
// manual?: boolean,
|
||||||
|
// querySelectors?: string,
|
||||||
|
// additionalCss?: string,
|
||||||
|
// useRelativeAncestor?: boolean,
|
||||||
|
// playerNodeCss?: string
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// css?: string;
|
||||||
|
// usePlayerArInFullscreen?: boolean;
|
||||||
|
|
||||||
|
// restrictions?: RestrictionsSettings;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SiteSettingsInterface {
|
||||||
|
enable: ExtensionEnvironmentSettingsInterface;
|
||||||
|
enableAard: ExtensionEnvironmentSettingsInterface;
|
||||||
|
enableKeyboard: ExtensionEnvironmentSettingsInterface;
|
||||||
|
|
||||||
|
type?: 'official' | 'community' | 'user-defined' | 'testing' | 'officially-disabled';
|
||||||
|
|
||||||
|
persistOption?: { // must be defined in @global and @empty
|
||||||
|
crop?: CropModePersistence,
|
||||||
|
stretch?: CropModePersistence,
|
||||||
|
alignment?: CropModePersistence
|
||||||
|
},
|
||||||
|
|
||||||
|
defaults?: { // must be defined in @global and @empty
|
||||||
|
crop?: {type: AspectRatioType, [x: string]: any},
|
||||||
|
stretch?: StretchType,
|
||||||
|
alignment?: any,
|
||||||
|
}
|
||||||
|
|
||||||
|
cropModePersistence?: CropModePersistence;
|
||||||
|
stretchModePersistence?: CropModePersistence;
|
||||||
|
alignmentPersistence?: CropModePersistence;
|
||||||
|
|
||||||
|
|
||||||
|
activeDOMConfig?: string;
|
||||||
|
DOMConfig?: { [x: string]: SiteDOMSettingsInterface };
|
||||||
|
|
||||||
|
// the following script are for extension caching and shouldn't be saved.
|
||||||
|
// if they _are_ saved, they will be overwritten
|
||||||
|
currentDOMConfig?: SiteDOMSettingsInterface;
|
||||||
|
|
||||||
|
// the following fields are for use with extension update script
|
||||||
|
override?: boolean; // whether settings for this site will be overwritten by extension upgrade script
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SiteDOMSettingsInterface {
|
||||||
|
type: 'official' | 'community' | 'user-defined' | undefined;
|
||||||
|
elements?: {
|
||||||
|
player?: SiteDOMElementSettingsInterface,
|
||||||
|
video?: SiteDOMElementSettingsInterface,
|
||||||
|
other?: { [x: number]: SiteDOMElementSettingsInterface }
|
||||||
|
};
|
||||||
|
customCss?: string;
|
||||||
|
periodicallyRefreshPlayerElement?: boolean;
|
||||||
|
|
||||||
|
// the following script are for extension caching and shouldn't be saved.
|
||||||
|
// if they _are_ saved, they will be overwritten
|
||||||
|
anchorElementIndex?: number;
|
||||||
|
anchorElement?: HTMLElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SiteDOMElementSettingsInterface {
|
||||||
|
manual?: boolean;
|
||||||
|
querySelectors?: string;
|
||||||
|
index?: number; // previously: useRelativeAncestor + videoAncestor
|
||||||
|
nodeCss?: {[x: string]: string};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SettingsInterface;
|
export default SettingsInterface;
|
||||||
|
@ -5,6 +5,7 @@ import ExtensionMode from '../../common/enums/ExtensionMode.enum';
|
|||||||
import VideoAlignmentType from '../../common/enums/VideoAlignmentType.enum';
|
import VideoAlignmentType from '../../common/enums/VideoAlignmentType.enum';
|
||||||
import BrowserDetect from './BrowserDetect';
|
import BrowserDetect from './BrowserDetect';
|
||||||
import SettingsInterface from '../../common/interfaces/SettingsInterface';
|
import SettingsInterface from '../../common/interfaces/SettingsInterface';
|
||||||
|
import { _cp } from '../../common/js/utils';
|
||||||
|
|
||||||
const ExtensionConfPatch = [
|
const ExtensionConfPatch = [
|
||||||
{
|
{
|
||||||
@ -128,6 +129,78 @@ const ExtensionConfPatch = [
|
|||||||
// add new commands
|
// add new commands
|
||||||
userOptions.commands = defaultOptions.commands;
|
userOptions.commands = defaultOptions.commands;
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
// NOTE - when releasing shit, ensure ALL alpha migrations are combined together in one function
|
||||||
|
forVersion: '6.0.0-alpha2',
|
||||||
|
updateFn: (userOptions, defaultOptions) => {
|
||||||
|
userOptions.commands = defaultOptions.commands;
|
||||||
|
|
||||||
|
// migrates old settings regarding whether extension is enabled or not
|
||||||
|
const copyEnabled = (site) => {
|
||||||
|
userOptions.sites[site].enable = {
|
||||||
|
fullscreen: userOptions.sites[site].mode,
|
||||||
|
theater: userOptions.sites[site].mode,
|
||||||
|
normal: ExtensionMode.Disabled
|
||||||
|
};
|
||||||
|
userOptions.sites[site].enableKeyboard = {
|
||||||
|
fullscreen: userOptions.sites[site].keyboardShortcutsEnabled,
|
||||||
|
theater: userOptions.sites[site].keyboardShortcutsEnabled,
|
||||||
|
normal: ExtensionMode.Disabled
|
||||||
|
};
|
||||||
|
userOptions.sites[site].enableAard = {
|
||||||
|
fullscreen: userOptions.sites[site].autoar,
|
||||||
|
theater: userOptions.sites[site].autoar,
|
||||||
|
normal: ExtensionMode.Disabled
|
||||||
|
};
|
||||||
|
|
||||||
|
userOptions.sites[site].stretchModePersistence = userOptions.sites[site].cropModePersistence;
|
||||||
|
|
||||||
|
// remove old options
|
||||||
|
delete userOptions.sites[site].mode;
|
||||||
|
delete userOptions.sites[site].keyboardShortcutsEnabled;
|
||||||
|
delete userOptions.sites[site].autoar;
|
||||||
|
}
|
||||||
|
|
||||||
|
// globals get carried over before other sites:
|
||||||
|
copyEnabled('@global');
|
||||||
|
|
||||||
|
// we make another guess about a new option we just added
|
||||||
|
|
||||||
|
|
||||||
|
for (const key in userOptions.sites) {
|
||||||
|
// we already had this
|
||||||
|
if (key === '@global') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
copyEnabled(key);
|
||||||
|
|
||||||
|
userOptions.sites[key].DOMConfig = _cp(defaultOptions.sites[key].DOMConfig)
|
||||||
|
|
||||||
|
// convert old site.DOM to site.DOMConfig[]
|
||||||
|
if (userOptions.sites[key].type === 'user-defined') {
|
||||||
|
const DOM = userOptions.sites[key].DOM;
|
||||||
|
if (DOM) {
|
||||||
|
userOptions.sites[key].DOMConfig['user-defined'] = {
|
||||||
|
type: 'user-1',
|
||||||
|
customCss: DOM?.css,
|
||||||
|
periodicallyRefreshPlayerElement: DOM?.player?.periodicallyRefreshPlayerElement,
|
||||||
|
elements: !(DOM?.player) ? undefined : {
|
||||||
|
player: {
|
||||||
|
manual: DOM?.player?.manual,
|
||||||
|
querySelectors: DOM?.player?.useRelativeAncestor ? undefined : DOM?.player?.querySelectors,
|
||||||
|
index: DOM?.player?.useRelativeAncestor ? DOM?.player?.videoAncestor : undefined,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
userOptions.sites[key].activeDOMConfig = 'user-1';
|
||||||
|
|
||||||
|
// remove old configuration
|
||||||
|
delete userOptions.sites[key].DOM;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import AspectRatioType from '../../common/enums/AspectRatioType.enum';
|
|||||||
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
|
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
|
||||||
import SettingsInterface from '../../common/interfaces/SettingsInterface';
|
import SettingsInterface from '../../common/interfaces/SettingsInterface';
|
||||||
import BrowserDetect from './BrowserDetect';
|
import BrowserDetect from './BrowserDetect';
|
||||||
|
import { Extension } from 'typescript';
|
||||||
|
|
||||||
if(Debug.debug)
|
if(Debug.debug)
|
||||||
console.log("Loading: ExtensionConf.js");
|
console.log("Loading: ExtensionConf.js");
|
||||||
@ -1389,252 +1390,449 @@ const ExtensionConf: SettingsInterface = {
|
|||||||
// * disabled — never allow
|
// * disabled — never allow
|
||||||
//
|
//
|
||||||
sites: {
|
sites: {
|
||||||
"@global": { // global defaults. Possible options will state site-only options in order
|
"@global": { // global defaults. Possible options will state site-only options in order
|
||||||
// to avoid writing this multiple times. Tags:
|
// to avoid writing this multiple times. Tags:
|
||||||
// #g — only available in @global
|
// #g — only available in @global
|
||||||
// #s — only available for specific site
|
// #s — only available for specific site
|
||||||
mode: ExtensionMode.Enabled, // How should extension work:
|
enable: { // How should extension work:
|
||||||
// 'enabled' - work everywhere except blacklist
|
fullscreen: ExtensionMode.Enabled, // 'enabled' - work everywhere except blacklist
|
||||||
// 'whitelist' - only work on whitelisted sites (#g)
|
theater: ExtensionMode.Enabled, // 'whitelist' - only work on whitelisted sites (#g)
|
||||||
// 'disabled' - work nowhere
|
normal: ExtensionMode.Disabled, // 'disabled' - work nowhere
|
||||||
// 'basic' - (Possible future use)
|
}, // 'default' - follow global rules (#s)
|
||||||
// 'default' - follow global rules (#s)
|
enableAard: { // Should we try to automatically detect aspect ratio?
|
||||||
autoar: ExtensionMode.Enabled, // Should we try to automatically detect aspect ratio?
|
fullscreen: ExtensionMode.Enabled, // Options: 'enabled', 'whitelist' (#g), 'default' (#s), 'disabled'
|
||||||
// Options: 'enabled', 'whitelist' (#g), 'default' (#s), 'disabled'
|
theater: ExtensionMode.Enabled,
|
||||||
autoarFallback: currentBrowser.firefox ? // if autoAr fails, try fallback mode?
|
normal: ExtensionMode.Disabled,
|
||||||
ExtensionMode.Enabled : // Options same as in autoar.
|
},
|
||||||
ExtensionMode.Disabled, // if autoar is disabled, this setting is irrelevant
|
enableKeyboard: {
|
||||||
stretch: StretchType.NoStretch, // Default stretch mode.
|
fullscreen: ExtensionMode.Enabled,
|
||||||
videoAlignment: VideoAlignmentType.Center, // Video alignment
|
theater: ExtensionMode.Enabled,
|
||||||
keyboardShortcutsEnabled: ExtensionMode.Enabled,
|
normal: ExtensionMode.Disabled
|
||||||
|
},
|
||||||
|
|
||||||
|
persistOption: {
|
||||||
|
crop: CropModePersistence.Disabled,
|
||||||
|
stretch: CropModePersistence.Disabled,
|
||||||
|
alignment: CropModePersistence.Disabled,
|
||||||
|
},
|
||||||
|
|
||||||
|
defaults: {
|
||||||
|
crop: {type: AspectRatioType.Reset}, // does NOT override Aard
|
||||||
|
stretch: StretchType.NoStretch,
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
"@empty": { // placeholder settings object with fallbacks to @global
|
||||||
|
enable: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
|
type: 'user-defined',
|
||||||
|
persistOption: {
|
||||||
|
crop: CropModePersistence.Default,
|
||||||
|
stretch: CropModePersistence.Default,
|
||||||
|
alignment: CropModePersistence.Default,
|
||||||
|
},
|
||||||
|
defaults: {
|
||||||
|
crop: null,
|
||||||
|
stretch: StretchType.Default,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"www.youtube.com" : {
|
"www.youtube.com" : {
|
||||||
mode: ExtensionMode.Enabled,
|
enable: {
|
||||||
autoar: ExtensionMode.Enabled,
|
fullscreen: ExtensionMode.Default,
|
||||||
autoarFallback: ExtensionMode.Enabled,
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
override: false, // ignore value localStorage in favour of this
|
override: false, // ignore value localStorage in favour of this
|
||||||
type: 'official', // is officially supported? (Alternatives are 'community' and 'user-defined')
|
type: 'official', // is officially supported? (Alternatives are 'community' and 'user-defined')
|
||||||
actions: null, // overrides global keyboard shortcuts and button configs. Is array, is optional.
|
|
||||||
stretch: StretchType.Default,
|
activeDOMConfig: 'official',
|
||||||
videoAlignment: VideoAlignmentType.Default,
|
DOMConfig: {
|
||||||
keyboardShortcutsEnabled: ExtensionMode.Default,
|
'official': {
|
||||||
DOM: {
|
type: 'official',
|
||||||
player: {
|
elements: {
|
||||||
manual: true,
|
player: {
|
||||||
querySelectors: "#movie_player, #player, #c4-player",
|
manual: true,
|
||||||
additionalCss: "",
|
querySelectors: "#movie_player, #player, #c4-player",
|
||||||
useRelativeAncestor: false,
|
}
|
||||||
playerNodeCss: "",
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"www.netflix.com" : {
|
"www.netflix.com" : {
|
||||||
mode: ExtensionMode.Enabled,
|
enable: {
|
||||||
autoar: ExtensionMode.Enabled,
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Disabled
|
||||||
|
},
|
||||||
override: false,
|
override: false,
|
||||||
type: 'official',
|
type: 'community',
|
||||||
stretch: StretchType.Default,
|
|
||||||
videoAlignment: VideoAlignmentType.Default,
|
|
||||||
keyboardShortcutsEnabled: ExtensionMode.Default,
|
|
||||||
arPersistence: true, // persist aspect ratio between different videos
|
|
||||||
DOM: {
|
|
||||||
player: {
|
|
||||||
manual: false, // as of 2021-09, netflix no longer requires manual player class. This may change in the future tho.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"www.disneyplus.com" : {
|
"www.disneyplus.com" : {
|
||||||
mode: ExtensionMode.Enabled,
|
enable: {
|
||||||
autoar: ExtensionMode.Enabled,
|
fullscreen: ExtensionMode.Default,
|
||||||
override: false,
|
theater: ExtensionMode.Default,
|
||||||
type: 'community',
|
normal: ExtensionMode.Default,
|
||||||
stretch: StretchType.Default,
|
|
||||||
videoAlignment: VideoAlignmentType.Default,
|
|
||||||
keyboardShortcutsEnabled: ExtensionMode.Default,
|
|
||||||
arPersistence: true, // persist aspect ratio between different videos
|
|
||||||
DOM: {
|
|
||||||
"player": {
|
|
||||||
"manual": true,
|
|
||||||
"querySelectors": ".btm-media-client-element",
|
|
||||||
"additionalCss": "",
|
|
||||||
"useRelativeAncestor": false,
|
|
||||||
"videoAncestor": 1,
|
|
||||||
"playerNodeCss": ""
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
css: ".hudson-container { height: 100%; }",
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
|
type: 'community',
|
||||||
|
activeDOMConfig: 'community-mstefan99',
|
||||||
|
DOMConfig: {
|
||||||
|
'community-mstefan99': {
|
||||||
|
type: 'official',
|
||||||
|
elements: {
|
||||||
|
player: {
|
||||||
|
manual: true,
|
||||||
|
querySelectors: ".btm-media-player",
|
||||||
|
},
|
||||||
|
video: {
|
||||||
|
manual: true,
|
||||||
|
querySelectors: ".btm-media-client-element"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
customCss: ".hudson-container { height: 100%; }"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"www.twitch.tv": {
|
"www.twitch.tv": {
|
||||||
mode: ExtensionMode.Enabled,
|
enable: {
|
||||||
autoar: ExtensionMode.Enabled,
|
fullscreen: ExtensionMode.Default,
|
||||||
override: true,
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
type: 'official',
|
type: 'official',
|
||||||
stretch: StretchType.Default,
|
|
||||||
videoAlignment: VideoAlignmentType.Default,
|
|
||||||
keyboardShortcutsEnabled: ExtensionMode.Default,
|
|
||||||
DOM: {
|
|
||||||
player: {
|
|
||||||
manual: false,
|
|
||||||
querySelectors: "",
|
|
||||||
additionalCss: "",
|
|
||||||
useRelativeAncestor: false,
|
|
||||||
playerNodeCss: ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"streamable.com": {
|
"streamable.com": {
|
||||||
mode: 3,
|
enable: {
|
||||||
autoar: 3,
|
fullscreen: ExtensionMode.Default,
|
||||||
type: 'official',
|
theater: ExtensionMode.Default,
|
||||||
stretch: -1,
|
normal: ExtensionMode.Default,
|
||||||
videoAlignment: -1,
|
|
||||||
keyboardShortcutsEnabled: 0,
|
|
||||||
css: ".player {text-align: left}"
|
|
||||||
},
|
|
||||||
"vimeo.com": {
|
|
||||||
mode: 3,
|
|
||||||
autoar: 3,
|
|
||||||
type: 'official',
|
|
||||||
stretch: -1,
|
|
||||||
videoAlignment: -1,
|
|
||||||
keyboardShortcutsEnabled: 0,
|
|
||||||
DOM: {
|
|
||||||
player: {
|
|
||||||
manual: true,
|
|
||||||
querySelectors: ".player_outro_area",
|
|
||||||
useRelativeAncestor: false,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
css: ".player_outro_area {\n width: 100% !important;\n display: flex !important;\n justify-content: center !important;\n}\n\n.player_container, .player {\n width: 100% !important; \n}"
|
enableAard: {
|
||||||
},
|
fullscreen: ExtensionMode.Default,
|
||||||
"old.reddit.com" : {
|
theater: ExtensionMode.Default,
|
||||||
mode: ExtensionMode.Enabled,
|
normal: ExtensionMode.Default,
|
||||||
autoar:ExtensionMode.Enabled,
|
|
||||||
override: false,
|
|
||||||
type: 'testing',
|
|
||||||
stretch: StretchType.Default,
|
|
||||||
videoAlignment: VideoAlignmentType.Default,
|
|
||||||
keyboardShortcutsEnabled: ExtensionMode.Default,
|
|
||||||
DOM: {
|
|
||||||
player: {
|
|
||||||
manual: false,
|
|
||||||
useRelativeAncestor: false,
|
|
||||||
querySelectors: '.reddit-video-player-root, .media-preview-content'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
css: 'video {\n width: 100% !important;\n height: 100% !important;\n}',
|
enableKeyboard: {
|
||||||
},
|
fullscreen: ExtensionMode.Default,
|
||||||
"www.reddit.com" : {
|
theater: ExtensionMode.Default,
|
||||||
mode: ExtensionMode.Enabled,
|
normal: ExtensionMode.Default
|
||||||
autoar: ExtensionMode.Enabled,
|
|
||||||
override: false,
|
|
||||||
type: 'testing',
|
|
||||||
stretch: StretchType.Default,
|
|
||||||
videoAlignment: VideoAlignmentType.Default,
|
|
||||||
keyboardShortcutsEnabled: ExtensionMode.Default,
|
|
||||||
DOM: {
|
|
||||||
player: {
|
|
||||||
manual: false,
|
|
||||||
useRelativeAncestor: false,
|
|
||||||
querySelectors: '.reddit-video-player-root, .media-preview-content'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
css: 'video {\n width: 100% !important;\n height: 100% !important;\n}',
|
|
||||||
},
|
|
||||||
"imgur.com": {
|
|
||||||
mode: -1,
|
|
||||||
autoar: -1,
|
|
||||||
autoarFallback: 0,
|
|
||||||
stretch: -1,
|
|
||||||
videoAlignment: 1,
|
|
||||||
type: 'official',
|
type: 'official',
|
||||||
},
|
activeDOMConfig: 'official',
|
||||||
"gfycat.com": {
|
DOMConfig: {
|
||||||
mode: -1,
|
'official': {
|
||||||
autoar: -1,
|
type: 'official',
|
||||||
autoarFallback: 0,
|
customCss: ".player {text-align: left}"
|
||||||
stretch: -1,
|
|
||||||
videoAlignment: 1,
|
|
||||||
type: 'official,'
|
|
||||||
},
|
|
||||||
"giant.gfycat.com": {
|
|
||||||
mode: -1,
|
|
||||||
autoar: -1,
|
|
||||||
autoarFallback: 0,
|
|
||||||
stretch: -1,
|
|
||||||
videoAlignment: 1,
|
|
||||||
type: 'official',
|
|
||||||
},
|
|
||||||
"www.wakanim.tv": {
|
|
||||||
type: 'community',
|
|
||||||
DOM: {
|
|
||||||
player: {
|
|
||||||
manual: true,
|
|
||||||
querySelectors: "#jwplayer-container",
|
|
||||||
additionalCss: "",
|
|
||||||
useRelativeAncestor: false,
|
|
||||||
playerNodeCss: "",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"app.plex.tv": {
|
"vimeo.com": {
|
||||||
mode: 3,
|
enable: {
|
||||||
autoar: 3,
|
fullscreen: ExtensionMode.Default,
|
||||||
type: "community",
|
theater: ExtensionMode.Default,
|
||||||
stretch: -1,
|
normal: ExtensionMode.Default,
|
||||||
videoAlignment: -1,
|
},
|
||||||
keyboardShortcutsEnabled: 0,
|
enableAard: {
|
||||||
DOM: {
|
fullscreen: ExtensionMode.Default,
|
||||||
player: {
|
theater: ExtensionMode.Default,
|
||||||
manual: false,
|
normal: ExtensionMode.Default,
|
||||||
querySelectors: "",
|
},
|
||||||
additionalCss: "",
|
enableKeyboard: {
|
||||||
useRelativeAncestor: false,
|
fullscreen: ExtensionMode.Default,
|
||||||
playerNodeCss: ""
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
|
type: 'official',
|
||||||
|
activeDOMConfig: 'official',
|
||||||
|
DOMConfig: {
|
||||||
|
'official': {
|
||||||
|
type: 'official',
|
||||||
|
customCss: ".player_outro_area {\n width: 100% !important;\n display: flex !important;\n justify-content: center !important;\n}\n\n.player_container, .player {\n width: 100% !important; \n}",
|
||||||
|
elements: {
|
||||||
|
player: {
|
||||||
|
manual: true,
|
||||||
|
querySelectors: ".player_outro_area",
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
css: "body {\n background-color: #000;\n}\n\n.application {\n background-color: #000;\n}"
|
},
|
||||||
|
"old.reddit.com" : {
|
||||||
|
enable: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
type: 'officially-disabled',
|
||||||
|
activeDOMConfig: 'official',
|
||||||
|
DOMConfig: {
|
||||||
|
'official': {
|
||||||
|
type: 'official',
|
||||||
|
customCss: 'video {\n width: 100% !important;\n height: 100% !important;\n}',
|
||||||
|
elements: {
|
||||||
|
player: {
|
||||||
|
manual: false,
|
||||||
|
querySelectors: '.reddit-video-player-root, .media-preview-content'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"www.reddit.com" : {
|
||||||
|
enable: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
type: 'officially-disabled',
|
||||||
|
activeDOMConfig: 'official',
|
||||||
|
DOMConfig: {
|
||||||
|
'official': {
|
||||||
|
type: 'official',
|
||||||
|
customCss: 'video {\n width: 100% !important;\n height: 100% !important;\n}',
|
||||||
|
elements: {
|
||||||
|
player: {
|
||||||
|
manual: false,
|
||||||
|
querySelectors: '.reddit-video-player-root, .media-preview-content'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"imgur.com": {
|
||||||
|
enable: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
type: 'officially-disabled',
|
||||||
|
},
|
||||||
|
"gfycat.com": {
|
||||||
|
enable: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
type: 'officially-disabled',
|
||||||
|
},
|
||||||
|
"giant.gfycat.com": {
|
||||||
|
enable: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Disabled,
|
||||||
|
theater: ExtensionMode.Disabled,
|
||||||
|
normal: ExtensionMode.Disabled,
|
||||||
|
},
|
||||||
|
type: 'officially-disabled',
|
||||||
|
},
|
||||||
|
"www.wakanim.tv": {
|
||||||
|
enable: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
|
type: 'community',
|
||||||
|
activeDOMConfig: 'community',
|
||||||
|
DOMConfig: {
|
||||||
|
'community': {
|
||||||
|
type: 'community',
|
||||||
|
elements: {
|
||||||
|
player: {
|
||||||
|
manual: true,
|
||||||
|
querySelectors: "#jwplayer-container"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"app.plex.tv": {
|
||||||
|
enable: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
|
type: 'community',
|
||||||
|
activeDOMConfig: 'community',
|
||||||
|
DOMConfig: {
|
||||||
|
'community': {
|
||||||
|
type: 'community',
|
||||||
|
customCss: "body {\n background-color: #000;\n}\n\n.application {\n background-color: #000;\n}"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"metaivi.com": {
|
"metaivi.com": {
|
||||||
mode: 0,
|
enable: {
|
||||||
autoar: 0,
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
type: "community",
|
type: "community",
|
||||||
stretch: -1,
|
activeDOMConfig: 'community',
|
||||||
videoAlignment: -1,
|
DOMConfig: {
|
||||||
DOM: {
|
'community': {
|
||||||
video: {
|
type: 'community',
|
||||||
manual: false,
|
elements: {
|
||||||
querySelectors: "",
|
video: {
|
||||||
additionalCss: "position: absolute !important;"
|
nodeCss: {'position': 'absolute !important'}
|
||||||
},
|
}
|
||||||
player: {
|
}
|
||||||
manual: false,
|
|
||||||
querySelectors: "",
|
|
||||||
additionalCss: "",
|
|
||||||
useRelativeAncestor: false,
|
|
||||||
playerNodeCss: ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"css": ""
|
|
||||||
},
|
},
|
||||||
"piped.kavin.rocks": {
|
"piped.kavin.rocks": {
|
||||||
mode: 0,
|
enable: {
|
||||||
autoar: 0,
|
fullscreen: ExtensionMode.Default,
|
||||||
type: 'community',
|
theater: ExtensionMode.Default,
|
||||||
autoarFallback: 0,
|
normal: ExtensionMode.Default,
|
||||||
stretch: 0,
|
|
||||||
videoAlignment: -1,
|
|
||||||
keyboardShortcutsEnabled: 0,
|
|
||||||
DOM: {
|
|
||||||
player: {
|
|
||||||
manual: false,
|
|
||||||
querySelectors: "",
|
|
||||||
additionalCss: "",
|
|
||||||
useRelativeAncestor: false,
|
|
||||||
playerNodeCss: ""
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
css: ".shaka-video-container {\n flex-direction: column !important;\n}"
|
enableAard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default,
|
||||||
|
},
|
||||||
|
enableKeyboard: {
|
||||||
|
fullscreen: ExtensionMode.Default,
|
||||||
|
theater: ExtensionMode.Default,
|
||||||
|
normal: ExtensionMode.Default
|
||||||
|
},
|
||||||
|
type: "community",
|
||||||
|
activeDOMConfig: 'community',
|
||||||
|
DOMConfig: {
|
||||||
|
'community': {
|
||||||
|
type: 'community',
|
||||||
|
customCss: ".shaka-video-container {\n flex-direction: column !important;\n}"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user