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';
|
2019-07-05 23:45:29 +02:00
|
|
|
|
2019-09-03 00:28:35 +02:00
|
|
|
const ExtensionConfPatch = [
|
|
|
|
{
|
2020-12-01 01:48:02 +01:00
|
|
|
forVersion: '4.5.0',
|
|
|
|
sites: {
|
|
|
|
"www.wakanim.tv": {
|
|
|
|
type: 'community',
|
|
|
|
DOM: {
|
|
|
|
player: {
|
|
|
|
manual: true,
|
|
|
|
querySelectors: "#jwplayer-container",
|
|
|
|
additionalCss: "",
|
|
|
|
useRelativeAncestor: false,
|
|
|
|
playerNodeCss: "",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-12-15 20:13:23 +01:00
|
|
|
}, {
|
2020-12-22 23:23:03 +01:00
|
|
|
forVersion: '4.5.1',
|
2020-12-15 20:13:23 +01:00
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
|
|
|
for (const site in userOptions.sites) {
|
|
|
|
try {
|
|
|
|
delete userOptions[sites].autoarPreventConditions
|
|
|
|
} catch (e) {
|
|
|
|
// doesn't matter if site doesn't have that option,
|
|
|
|
// everything is still fine
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-12-24 23:26:22 +01:00
|
|
|
}, {
|
|
|
|
forVersion: '4.5.1.1',
|
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
|
|
|
if (!userOptions.sites['streamable.com']) {
|
|
|
|
userOptions.sites['streamable.com'] = {
|
|
|
|
mode: 3,
|
|
|
|
autoar: 3,
|
|
|
|
type: 'official',
|
|
|
|
stretch: -1,
|
|
|
|
videoAlignment: -1,
|
|
|
|
keyboardShortcutsEnabled: 0,
|
|
|
|
css: ".player {text-align: left}"
|
|
|
|
};
|
|
|
|
}
|
|
|
|
if (!userOptions.sites['streamable.com'].css) {
|
|
|
|
userOptions.sites['streamable.com'].css = '.player {text-align: left}'
|
|
|
|
};
|
|
|
|
}
|
2021-01-10 17:22:02 +01:00
|
|
|
}, {
|
|
|
|
forVersion: '4.5.1.3',
|
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
|
|
|
try {
|
|
|
|
userOptions.sites['wwww.disneyplus.com']['css'] = ".hudson-container {\n height: 100%;\n}";
|
2021-01-10 17:25:36 +01:00
|
|
|
} catch (e) {
|
|
|
|
// do nothing if disney+ is missing
|
2021-01-10 17:22:02 +01:00
|
|
|
}
|
|
|
|
}
|
2021-04-05 03:30:29 +02:00
|
|
|
}, {
|
|
|
|
forVersion: '5.0.1',
|
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
|
|
|
try {
|
|
|
|
userOptions.mitigations = {
|
|
|
|
zoomLimit: {
|
|
|
|
enabled: BrowserDetect.edge || BrowserDetect.isEdgeUA,
|
|
|
|
limit: 0.997,
|
|
|
|
fullscreenOnly: true
|
|
|
|
}
|
2021-07-05 00:51:15 +02:00
|
|
|
}
|
2021-04-05 03:30:29 +02:00
|
|
|
} catch (e) {
|
|
|
|
// do nothing
|
|
|
|
}
|
|
|
|
}
|
2021-04-08 21:53:49 +02:00
|
|
|
}, {
|
|
|
|
forVersion: '5.0.1.1',
|
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
|
|
|
try {
|
|
|
|
userOptions.mitigations = {
|
|
|
|
zoomLimit: {
|
|
|
|
enabled: true,
|
|
|
|
limit: 0.997,
|
|
|
|
fullscreenOnly: true
|
|
|
|
}
|
2021-07-05 00:51:15 +02:00
|
|
|
}
|
2021-04-08 21:53:49 +02:00
|
|
|
} catch (e) {
|
|
|
|
// do nothing
|
|
|
|
}
|
|
|
|
}
|
2021-04-12 20:30:42 +02:00
|
|
|
}, {
|
|
|
|
forVersion: '5.0.2',
|
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
|
|
|
try {
|
|
|
|
if (! userOptions.mitigations) {
|
|
|
|
userOptions.mitigations = {
|
|
|
|
zoomLimit: {
|
|
|
|
enabled: true,
|
|
|
|
limit: 0.997,
|
|
|
|
fullscreenOnly: true
|
|
|
|
}
|
2021-07-05 00:51:15 +02:00
|
|
|
}
|
2021-04-12 20:30:42 +02:00
|
|
|
} else if (BrowserDetect.chrome) {
|
|
|
|
userOptions.mitigations = {
|
|
|
|
zoomLimit: {
|
|
|
|
enabled: true,
|
|
|
|
limit: 0.997,
|
|
|
|
fullscreenOnly: true
|
|
|
|
}
|
2021-07-05 00:51:15 +02:00
|
|
|
}
|
2021-04-12 20:30:42 +02:00
|
|
|
}
|
|
|
|
} catch (e) {
|
|
|
|
// do nothing
|
|
|
|
}
|
|
|
|
}
|
2021-06-07 21:56:57 +02:00
|
|
|
}, {
|
|
|
|
forVersion: '5.0.4',
|
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
2021-06-13 02:18:47 +02:00
|
|
|
userOptions.sites['www.disneyplus.com'].DOM.player = {
|
|
|
|
... userOptions.sites['www.disneyplus.com'].DOM.player,
|
|
|
|
querySelectors: ".btm-media-client-element",
|
|
|
|
useRelativeAncestor: true,
|
|
|
|
videoAncestor: 1
|
2021-06-07 21:56:57 +02:00
|
|
|
}
|
|
|
|
}
|
2021-07-05 00:51:15 +02:00
|
|
|
}, {
|
|
|
|
forVersion: '5.0.5',
|
|
|
|
sites: {
|
|
|
|
"app.plex.tv": {
|
|
|
|
mode: 3,
|
|
|
|
autoar: 3,
|
2021-07-14 21:17:32 +02:00
|
|
|
type: "community",
|
2021-07-05 00:51:15 +02:00
|
|
|
stretch: -1,
|
|
|
|
videoAlignment: -1,
|
|
|
|
keyboardShortcutsEnabled: 0,
|
|
|
|
DOM: {
|
|
|
|
player: {
|
|
|
|
manual: false,
|
|
|
|
querySelectors: "",
|
|
|
|
additionalCss: "",
|
|
|
|
useRelativeAncestor: false,
|
|
|
|
playerNodeCss: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
css: "body {\n background-color: #000;\n}\n\n.application {\n background-color: #000;\n}"
|
|
|
|
}
|
|
|
|
}
|
2021-07-14 21:17:32 +02:00
|
|
|
}, {
|
|
|
|
forVersion: '5.0.6',
|
|
|
|
sites: {
|
|
|
|
"metaivi.com": {
|
|
|
|
mode: 0,
|
|
|
|
autoar: 0,
|
|
|
|
type: "community",
|
|
|
|
stretch: -1,
|
|
|
|
videoAlignment: -1,
|
|
|
|
DOM: {
|
|
|
|
video: {
|
|
|
|
manual: false,
|
|
|
|
querySelectors: "",
|
|
|
|
additionalCss: "position: absolute !important;"
|
|
|
|
},
|
|
|
|
player: {
|
|
|
|
manual: false,
|
|
|
|
querySelectors: "",
|
|
|
|
additionalCss: "",
|
|
|
|
useRelativeAncestor: false,
|
|
|
|
playerNodeCss: ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"css": ""
|
2021-07-14 22:45:00 +02:00
|
|
|
},
|
|
|
|
"piped.kavin.rocks": {
|
|
|
|
mode: 0,
|
|
|
|
autoar: 0,
|
|
|
|
type: 'community',
|
|
|
|
autoarFallback: 0,
|
|
|
|
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}"
|
|
|
|
},
|
2021-07-14 21:17:32 +02:00
|
|
|
},
|
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
|
|
|
// 5.0.5 initially incorrectly had app.plex.tv marked as 'user-added'
|
|
|
|
// when 'user-added' is generally reserved for marking sites with user-
|
|
|
|
// changed configuration. Site patches submitted by community should have
|
|
|
|
// 'community' type. extConfPatch for 5.0.5 was also retroactively corrected.
|
|
|
|
userOptions.sites['app.plex.tv'].type = 'community';
|
2021-07-14 22:45:00 +02:00
|
|
|
userOptions.sites['piped.kavin.rocks'] = {
|
|
|
|
mode: 0,
|
|
|
|
autoar: 0,
|
|
|
|
type: 'community',
|
|
|
|
autoarFallback: 0,
|
|
|
|
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}"
|
|
|
|
};
|
2021-07-14 21:17:32 +02:00
|
|
|
}
|
2021-08-17 19:38:45 +02:00
|
|
|
}, {
|
|
|
|
forVersion: '5.0.7',
|
|
|
|
updateFn: (userOptions, defaultOptions) => {
|
|
|
|
// 5.0.5 initially incorrectly had app.plex.tv marked as 'user-added'
|
|
|
|
// when 'user-added' is generally reserved for marking sites with user-
|
|
|
|
// changed configuration. Site patches submitted by community should have
|
|
|
|
// 'community' type. extConfPatch for 5.0.5 was also retroactively corrected.
|
|
|
|
userOptions.sites['www.youtube.com'].DOM.player = {
|
|
|
|
manual: true,
|
|
|
|
querySelectors: "#movie_player, #player, #c4-player",
|
|
|
|
additionalCss: "",
|
|
|
|
useRelativeAncestor: false,
|
|
|
|
playerNodeCss: "",
|
|
|
|
}
|
|
|
|
}
|
2019-09-03 00:28:35 +02:00
|
|
|
}
|
|
|
|
];
|
2019-07-05 23:45:29 +02:00
|
|
|
|
2019-11-02 01:05:36 +01:00
|
|
|
|
2019-07-05 23:45:29 +02:00
|
|
|
export default ExtensionConfPatch;
|