2018-12-30 23:16:09 +01:00
import Debug from './Debug' ;
import currentBrowser from './BrowserDetect' ;
2021-02-08 23:04:54 +01:00
import VideoAlignmentType from '../../common/enums/VideoAlignmentType.enum' ;
import StretchType from '../../common/enums/StretchType.enum' ;
import ExtensionMode from '../../common/enums/ExtensionMode.enum' ;
import AntiGradientMode from '../../common/enums/AntiGradientMode.enum' ;
import AspectRatioType from '../../common/enums/AspectRatioType.enum' ;
import CropModePersistence from '../../common/enums/CropModePersistence.enum' ;
2021-02-09 00:37:54 +01:00
import SettingsInterface from '../../common/interfaces/SettingsInterface' ;
2021-04-05 03:30:29 +02:00
import BrowserDetect from './BrowserDetect' ;
2023-01-07 03:05:17 +01:00
import { Extension } from 'typescript' ;
2018-12-30 23:16:09 +01:00
2018-03-13 23:55:38 +01:00
if ( Debug . debug )
console . log ( "Loading: ExtensionConf.js" ) ;
2017-12-17 22:56:07 +01:00
2021-02-09 00:37:54 +01:00
const ExtensionConf : SettingsInterface = {
2025-04-22 02:42:33 +02:00
dev : {
loadFromSnapshot : false ,
} ,
2018-03-13 23:55:38 +01:00
arDetect : {
2024-12-26 14:58:14 +01:00
aardType : 'auto' ,
2024-12-30 23:02:55 +01:00
earlyStopOptions : {
stopAfterFirstDetection : false ,
stopAfterTimeout : false ,
stopTimeout : 30 ,
} ,
2018-05-04 00:27:40 +02:00
disabledReason : "" , // if automatic aspect ratio has been disabled, show reason
2021-07-05 00:51:15 +02:00
allowedMisaligned : 0.05 , // top and bottom letterbox thickness can differ by this much.
2018-03-13 23:55:38 +01:00
// Any more and we don't adjust ar.
2024-12-31 02:50:33 +01:00
allowedArVariance : 0.0125 , // amount by which old ar can differ from the new (1 = 100%)
2019-01-26 17:52:50 +01:00
timers : { // autodetection frequency
2019-06-02 03:00:07 +02:00
playing : 333 , // while playing
2024-12-30 23:02:55 +01:00
playingReduced : 5000 , // while playing at small sizes
2019-01-26 17:52:50 +01:00
paused : 3000 , // while paused
error : 3000 , // after error
minimumTimeout : 5 ,
2019-06-02 23:49:48 +02:00
tickrate : 10 , // 1 tick every this many milliseconds
2019-01-26 17:52:50 +01:00
} ,
2018-05-04 00:27:40 +02:00
autoDisable : { // settings for automatically disabling the extension
2018-06-27 23:55:37 +02:00
maxExecutionTime : 6000 , // if execution time of main autodetect loop exceeds this many milliseconds,
2018-05-04 00:27:40 +02:00
// we disable it.
2018-07-11 00:01:44 +02:00
consecutiveTimeoutCount : 5 , // we only do it if it happens this many consecutive times
// FOR FUTURE USE
consecutiveArResets : 5 // if aspect ratio reverts immediately after AR change is applied, we disable everything
2018-05-04 00:27:40 +02:00
} ,
2019-02-15 00:00:22 +01:00
canvasDimensions : {
blackframeCanvas : { // smaller than sample canvas, blackframe canvas is used to recon for black frames
// it's not used to detect aspect ratio by itself, so it can be tiny af
width : 16 ,
height : 9 ,
} ,
sampleCanvas : { // size of image sample for detecting aspect ratio. Bigger size means more accurate results,
// at the expense of performance
width : 640 ,
height : 360 ,
} ,
2019-01-26 17:52:50 +01:00
} ,
2019-02-15 00:00:22 +01:00
2024-10-23 01:23:37 +02:00
blackLevels : {
defaultBlack : 16 ,
blackTolerance : 4 ,
imageDelta : 16 ,
} ,
2019-01-26 17:52:50 +01:00
sampling : {
2024-10-23 01:23:37 +02:00
edgePosition : 0.25 ,
staticCols : 16 , // we take a column at [0-n]/n-th parts along the width and sample it
2019-01-26 17:52:50 +01:00
randomCols : 0 , // we add this many randomly selected columns to the static columns
staticRows : 9 , // forms grid with staticSampleCols. Determined in the same way. For black frame checks
} ,
2018-03-13 23:55:38 +01:00
edgeDetection : {
2024-10-23 01:23:37 +02:00
slopeTestWidth : 8 ,
gradientTestSamples : 8 ,
gradientTestBlackThreshold : 16 ,
gradientTestDeltaThreshold : 32 ,
gradientTestMinDelta : 8 ,
thresholds : {
2024-12-31 02:50:33 +01:00
edgeDetectionLimit : 12 ,
2024-10-23 01:23:37 +02:00
minQualitySingleEdge : 6 ,
minQualitySecondEdge : 3 ,
} ,
maxLetterboxOffset : 0.1 ,
2018-03-13 23:55:38 +01:00
sampleWidth : 8 , // we take a sample this wide for edge detection
2019-02-22 23:02:48 +01:00
detectionThreshold : 4 , // sample needs to have this many non-black pixels to be a valid edge
2021-07-05 00:51:15 +02:00
confirmationThreshold : 1 , //
2019-06-02 02:44:02 +02:00
singleSideConfirmationThreshold : 3 , // we need this much edges (out of all samples, not just edges) in order
2018-03-13 23:55:38 +01:00
// to confirm an edge in case there's no edges on top or bottom (other
// than logo, of course)
2019-02-22 23:02:48 +01:00
logoThreshold : 0.15 , // if edge candidate sits with count greater than this*all_samples, it can't be logo
2018-03-13 23:55:38 +01:00
// or watermark.
2019-01-26 17:52:50 +01:00
edgeTolerancePx : 1 , // we check for black edge violation this far from detection point
2018-03-13 23:55:38 +01:00
edgeTolerancePercent : null , // we check for black edge detection this % of height from detection point. unused
middleIgnoredArea : 0.2 , // we ignore this % of canvas height towards edges while detecting aspect ratios
minColsForSearch : 0.5 , // if we hit the edge of blackbars for all but this many columns (%-wise), we don't
// continue with search. It's pointless, because black edge is higher/lower than we
// are now. (NOTE: keep this less than 1 in case we implement logo detection)
2024-12-31 02:50:33 +01:00
edgeMismatchTolerancePx : 3 , // corners and center are considered equal if they differ by at most this many px
2018-04-11 00:19:44 +02:00
} ,
pillarTest : {
2021-07-05 00:51:15 +02:00
ignoreThinPillarsPx : 5 , // ignore pillars that are less than this many pixels thick.
2018-04-11 00:19:44 +02:00
allowMisaligned : 0.05 // left and right edge can vary this much (%)
} ,
textLineTest : {
2021-07-05 00:51:15 +02:00
nonTextPulse : 0.10 , // if a single continuous pulse has this many non-black pixels, we aren't dealing
2018-04-11 00:19:44 +02:00
// with text. This value is relative to canvas width (%)
2019-02-22 23:02:48 +01:00
pulsesToConfirm : 10 , // this is a threshold to confirm we're seeing text.
pulsesToConfirmIfHalfBlack : 5 , // this is the threshold to confirm we're seeing text if longest black pulse
2018-04-11 00:19:44 +02:00
// is over 50% of the canvas width
testRowOffset : 0.02 // we test this % of height from detected edge
2018-03-13 23:55:38 +01:00
}
} ,
2024-06-12 20:29:00 +02:00
ui : {
inPlayer : {
enabled : true , // enable by default on new installs
2024-12-17 14:19:30 +01:00
enabledFullscreenOnly : false ,
2024-12-17 02:02:49 +01:00
minEnabledWidth : 0.75 ,
2024-12-28 01:42:13 +01:00
minEnabledHeight : 0.75 ,
2024-12-17 02:02:49 +01:00
activation : 'player' ,
2024-12-17 14:19:30 +01:00
popupAlignment : 'left' ,
2024-12-17 02:02:49 +01:00
triggerZoneDimensions : {
width : 0.5 ,
height : 0.5 ,
offsetX : - 50 ,
offsetY : 0
}
2025-04-20 19:29:47 +02:00
} ,
dev : {
aardDebugOverlay : {
showOnStartup : false ,
showDetectionDetails : true
}
2024-06-12 20:29:00 +02:00
}
} ,
2021-11-23 01:32:42 +01:00
crop : {
default : {
type : AspectRatioType . Automatic ,
}
} ,
2018-09-21 00:26:08 +02:00
zoom : {
minLogZoom : - 1 ,
maxLogZoom : 3 ,
announceDebounce : 200 // we wait this long before announcing new zoom
} ,
2022-09-28 00:39:49 +02:00
kbm : {
2022-09-27 22:15:01 +02:00
enabled : true ,
keyboardEnabled : true ,
mouseEnabled : true
} ,
2018-12-03 00:31:28 +01:00
miscSettings : {
2018-09-17 00:39:32 +02:00
mousePan : {
enabled : false
} ,
2018-12-03 00:31:28 +01:00
mousePanReverseMouse : false ,
2018-03-13 23:55:38 +01:00
} ,
2018-05-12 02:51:58 +02:00
stretch : {
2021-11-23 01:32:42 +01:00
default : {
type : StretchType . NoStretch
} ,
2018-05-12 02:51:58 +02:00
conditionalDifferencePercent : 0.05 // black bars less than this wide will trigger stretch
// if mode is set to '1'. 1.0=100%
} ,
2018-05-13 15:22:28 +02:00
resizer : {
setStyleString : {
maxRetries : 3 ,
retryTimeout : 200
}
} ,
2018-05-21 22:43:56 +02:00
pageInfo : {
timeouts : {
urlCheck : 200 ,
rescan : 1500
}
} ,
2021-10-28 22:53:43 +02:00
commands : {
crop : [ {
action : 'set-ar' ,
label : 'Automatic' ,
comment : 'Automatically detect aspect ratio' ,
arguments : {
type : AspectRatioType . Automatic
} ,
shortcut : {
key : 'a' ,
code : 'KeyA' ,
ctrlKey : false ,
metaKey : false ,
altKey : false ,
shiftKey : false ,
onKeyUp : true ,
onKeyDown : false ,
}
} , {
action : 'set-ar' ,
label : 'Reset' ,
arguments : {
type : AspectRatioType . Reset
} ,
shortcut : {
key : 'r' ,
code : 'KeyR' ,
ctrlKey : false ,
metaKey : false ,
altKey : false ,
shiftKey : false ,
onKeyUp : true ,
onKeyDown : false ,
}
} , {
action : 'set-ar' ,
label : 'Fit width' ,
comment : 'Make the video fit the entire width of the player, crop top and bottom if necessary' ,
arguments : {
type : AspectRatioType . FitWidth
} ,
shortcut : {
key : 'w' ,
code : 'KeyW' ,
ctrlKey : false ,
metaKey : false ,
altKey : false ,
shiftKey : false ,
onKeyUp : true ,
onKeyDown : false ,
}
} , {
action : 'set-ar' ,
label : 'Fit height' ,
comment : 'Make the video fit the entire height of the player, crop left and right if necessary' ,
arguments : {
type : AspectRatioType . FitHeight
} ,
shortcut : {
key : 'e' ,
code : 'KeyE' ,
ctrlKey : false ,
metaKey : false ,
altKey : false ,
shiftKey : false ,
onKeyUp : true ,
onKeyDown : false ,
}
2023-03-30 00:43:30 +02:00
} , {
action : 'set-ar' ,
label : 'Cycle' ,
comment : 'Cycle through crop options' ,
arguments : {
type : AspectRatioType . Cycle
} ,
shortcut : {
key : 'c' ,
code : 'KeyC' ,
ctrlKey : false ,
metaKey : false ,
altKey : false ,
shiftKey : false ,
onKeyUp : true ,
onKeyDown : false ,
}
2021-10-28 22:53:43 +02:00
} , {
action : 'set-ar' ,
label : '21:9' ,
comment : 'Crop for 21:9 aspect ratio (1:2.39)' ,
arguments : {
type : AspectRatioType . Fixed ,
ratio : 2.39
} ,
shortcut : {
key : 'd' ,
code : 'KeyD' ,
ctrlKey : false ,
metaKey : false ,
altKey : false ,
shiftKey : false ,
onKeyUp : false ,
onKeyDown : true ,
}
} , {
action : 'set-ar' ,
label : '18:9' ,
comment : 'Crop for 18:9 aspect ratio (1:2)' ,
arguments : {
type : AspectRatioType . Fixed ,
ratio : 1.78
} ,
shortcut : {
key : 's' ,
code : 'KeyS' ,
ctrlKey : false ,
metaKey : false ,
altKey : false ,
shiftKey : false ,
onKeyUp : false ,
onKeyDown : true ,
}
2023-03-30 00:49:09 +02:00
} , {
action : 'set-ar' ,
label : '32:9' ,
comment : 'Crop for 32:9 aspect ratio' ,
arguments : {
type : AspectRatioType . Fixed ,
ratio : 3.56
} ,
2021-10-28 22:53:43 +02:00
} ] ,
stretch : [ {
action : 'set-stretch' ,
label : 'Don\'t stretch' ,
arguments : {
type : StretchType . NoStretch
}
} , {
action : 'set-stretch' ,
label : 'Basic stretch' ,
comment : 'There\'s literally no legitimate reason to use this option' ,
arguments : {
type : StretchType . Basic
}
} , {
action : 'set-stretch' ,
label : 'Hybrid stretch' ,
comment : 'Applies crop first, then stretches to fill the remainder of the screen' ,
arguments : {
type : StretchType . Hybrid
}
} , {
action : 'set-stretch' ,
label : 'On thin borders' ,
comment : 'Applies crop first. If only narrow black borders exist, the video will be stretched to cover the remainder of the screen. However, if stretching would be substantial, the video will NOT be stretched.' ,
arguments : {
type : StretchType . Conditional ,
limit : 0.1 ,
} ,
} , {
action : 'set-stretch' ,
label : 'Stretch to 16:9' ,
comment : 'Applies crop first, then stretches video to 16:9.' ,
arguments : {
type : StretchType . FixedSource ,
ratio : 1.77 ,
}
} , {
action : 'set-stretch' ,
label : 'Stretch to 4:3' ,
comment : 'Applies crop first, then stretches video to 4:3' ,
arguments : {
type : StretchType . FixedSource ,
ratio : 1.33
}
} , {
action : 'set-stretch' ,
label : 'Default' ,
comment : 'Uses the default stretch mode' ,
arguments : {
type : StretchType . Default
}
} ] ,
zoom : [ {
action : 'change-zoom' ,
2025-04-20 16:11:17 +02:00
label : 'Zoom +5%' ,
2021-10-28 22:53:43 +02:00
arguments : {
2025-04-20 16:11:17 +02:00
zoom : 0.05
2021-10-28 22:53:43 +02:00
} ,
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' ,
2025-04-20 16:11:17 +02:00
label : 'Zoom -5%' ,
2021-10-28 22:53:43 +02:00
arguments : {
2025-04-20 16:11:17 +02:00
zoom : - 0.05
2021-10-28 22:53:43 +02:00
} ,
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'
} ] ,
pan : [ {
action : 'set-alignment' ,
label : 'Set alignment: top left' ,
arguments : {
x : VideoAlignmentType.Left ,
y : VideoAlignmentType.Top
} ,
internalOnly : true ,
actionId : 'set-alignment-top-left'
} , {
action : 'set-alignment' ,
label : 'Set alignment: top center' ,
arguments : {
x : VideoAlignmentType.Center ,
y : VideoAlignmentType.Top
} ,
internalOnly : true ,
actionId : 'set-alignment-top-center' ,
} , {
action : 'set-alignment' ,
label : 'Set alignment: top right' ,
arguments : {
x : VideoAlignmentType.Right ,
y : VideoAlignmentType.Top
} ,
internalOnly : true ,
actionId : 'set-alignment-top-right'
} , {
action : 'set-alignment' ,
label : 'Set alignment: center left' ,
arguments : {
x : VideoAlignmentType.Left ,
y : VideoAlignmentType.Center
} ,
internalOnly : true ,
actionId : 'set-alignment-center-left'
} , {
action : 'set-alignment' ,
label : 'Set alignment: center' ,
arguments : {
x : VideoAlignmentType.Center ,
y : VideoAlignmentType.Center
} ,
internalOnly : true ,
actionId : 'set-alignment-center'
} , {
action : 'set-alignment' ,
label : 'Set alignment: center right' ,
arguments : {
x : VideoAlignmentType.Right ,
y : VideoAlignmentType.Center
} ,
internalOnly : true ,
actionId : 'set-alignment-center-right'
} , {
action : 'set-alignment' ,
label : 'Set alignment: bottom left' ,
arguments : {
x : VideoAlignmentType.Left ,
y : VideoAlignmentType.Bottom
} ,
internalOnly : true ,
actionId : 'set-alignment-bottom-left'
} , {
action : 'set-alignment' ,
label : 'Set alignment: bottom center' ,
arguments : {
x : VideoAlignmentType.Center ,
y : VideoAlignmentType.Bottom
} ,
internalOnly : true ,
actionId : 'set-alignment-bottom-center'
} , {
action : 'set-alignment' ,
label : 'Set alignment: bottom right' ,
arguments : {
x : VideoAlignmentType.Right ,
y : VideoAlignmentType.Bottom
} ,
internalOnly : true ,
actionId : 'set-alignment-bottom-right'
} , {
action : 'set-alignment' ,
label : 'Set alignment: default' ,
arguments : {
x : VideoAlignmentType.Default ,
y : VideoAlignmentType.Default
}
} ] ,
internal : [ {
action : 'set-ar-persistence' ,
label : 'AR resets for every video' ,
arguments : {
arPersistence : CropModePersistence.Disabled
}
} , {
action : 'set-ar-persistence' ,
label : 'AR changes persist until changed or until next page reload' ,
arguments : {
arPersistence : CropModePersistence.UntilPageReload
}
} , {
action : 'set-ar-persistence' ,
label : 'AR changes persist until changed or until next browser restart' ,
arguments : {
arPersistence : CropModePersistence.CurrentSession
}
} , {
action : 'set-ar-persistence' ,
label : 'AR changes persist until changed' ,
arguments : {
arPersistence : CropModePersistence.Forever
}
} , {
action : 'set-ar-persistence' ,
label : 'Use default options' ,
arguments : {
arPersistence : CropModePersistence.Default
}
} , {
action : 'set-extension-enabled' ,
label : 'Enable extension' ,
arguments : {
mode : ExtensionMode.Enabled ,
} ,
internalOnly : true ,
} , {
action : 'set-extension-enabled' ,
label : 'Whitelist' ,
arguments : {
mode : ExtensionMode.Whitelist ,
} ,
internalOnly : true ,
} , {
action : 'set-extension-enabled' ,
label : 'Disable' ,
arguments : {
mode : ExtensionMode.Disabled
} ,
internalOnly : true ,
} , {
action : 'set-extension-enabled' ,
label : 'Use default option' ,
arguments : {
mode : ExtensionMode.Default
} ,
internalOnly : true
} , {
action : 'set-autoar-enabled' ,
label : 'Enabled' ,
comment : 'Enable automatic aspect ratio detection if possible' ,
arguments : {
mode : ExtensionMode.Enabled
} ,
internalOnly : true
} , {
action : 'set-autoar-enabled' ,
label : 'Whitelist' ,
comment : 'Enable automatic aspect ratio detection if possible, but only on whitelisted sites' ,
arguments : {
mode : ExtensionMode.Whitelist ,
} ,
internalOnly : true ,
} , {
action : 'set-autoar-enabled' ,
label : 'Disable' ,
comment : 'Disable aspect ratio detection' ,
arguments : {
mode : ExtensionMode.Disabled
} ,
internalOnly : true ,
} , {
action : 'set-autoar-enabled' ,
label : 'Use default option' ,
arguments : {
mode : ExtensionMode.Default
} ,
internalOnly : true
} ]
} ,
2021-04-05 03:30:29 +02:00
mitigations : {
zoomLimit : {
2021-04-10 04:03:14 +02:00
enabled : true ,
2021-04-05 03:30:29 +02:00
limit : 0.997 ,
fullscreenOnly : true
}
} ,
2019-12-06 00:17:09 +01:00
whatsNewChecked : true ,
2024-12-17 02:02:49 +01:00
newFeatureTracker : {
'uw6.ui-popup' : { show : 10 }
} ,
2018-11-14 23:32:37 +01:00
// -----------------------------------------
2018-06-27 23:55:37 +02:00
// ::: SITE CONFIGURATION :::
// -----------------------------------------
// Config for a given page:
2021-07-05 00:51:15 +02:00
//
2018-06-27 23:55:37 +02:00
// <hostname> : {
// status: <option> // should extension work on this site?
// arStatus: <option> // should we do autodetection on this site?
2021-07-05 00:51:15 +02:00
//
2019-01-20 23:36:08 +01:00
// defaultAr?: <ratio> // automatically apply this aspect ratio on this side. Use extension defaults if undefined.
2018-09-16 14:14:16 +02:00
// stretch? <stretch mode> // automatically stretch video on this site in this manner
// videoAlignment? <left|center|right>
//
2021-11-23 01:32:42 +01:00
// type: <official|community|user-added> // 'official' — blessed by Tam.
// // 'community' — blessed by people sending me messages.
// // 'user-added' — user-defined (not here)
// override: <true|false> // override user settings for this site on update
2021-07-05 00:51:15 +02:00
// }
//
2018-06-27 23:55:37 +02:00
// Valid values for options:
//
// status, arStatus, statusEmbedded:
2021-07-05 00:51:15 +02:00
//
2018-11-02 02:52:01 +01:00
// * enabled — always allow, full
// * basic — allow, but only the basic version without playerData
2018-06-27 23:55:37 +02:00
// * default — allow if default is to allow, block if default is to block
// * disabled — never allow
2021-07-05 00:51:15 +02:00
//
2018-06-27 23:55:37 +02:00
sites : {
2023-01-07 03:05:17 +01:00
"@global" : { // global defaults. Possible options will state site-only options in order
// to avoid writing this multiple times. Tags:
// #g — only available in @global
// #s — only available for specific site
enable : { // How should extension work:
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Disabled , // 'enabled' - work everywhere except blacklist
theater : ExtensionMode.Disabled , //
2023-01-07 03:05:17 +01:00
normal : ExtensionMode.Disabled , // 'disabled' - work nowhere
} , // 'default' - follow global rules (#s)
enableAard : { // Should we try to automatically detect aspect ratio?
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Disabled , // Options: 'enabled', 'default' (#s), 'disabled'
theater : ExtensionMode.Disabled ,
2023-01-07 03:05:17 +01:00
normal : ExtensionMode.Disabled ,
} ,
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Disabled ,
theater : ExtensionMode.Disabled ,
2023-01-07 03:05:17 +01:00
normal : ExtensionMode.Disabled
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Disabled ,
theater : ExtensionMode.Disabled , // Lies! means 'theater-ish'
normal : ExtensionMode.Disabled // Not actually used.
2025-01-27 02:59:30 +01:00
} ,
2023-07-15 01:28:20 +02:00
defaultType : 'unknown' ,
2023-01-15 22:11:47 +01:00
persistCSA : CropModePersistence.Disabled ,
2023-01-07 03:05:17 +01:00
defaults : {
2024-06-12 01:55:12 +02:00
crop : { type : AspectRatioType . Automatic } ,
2025-01-14 01:44:25 +01:00
stretch : { type : StretchType . NoStretch } ,
2023-04-16 02:16:57 +02:00
alignment : { x : VideoAlignmentType.Center , y : VideoAlignmentType.Center } ,
2023-01-07 03:05:17 +01:00
}
} ,
"@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
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
fullscreen : ExtensionMode.Default ,
theater : ExtensionMode.Default ,
normal : ExtensionMode.Disabled
} ,
2023-01-07 03:05:17 +01:00
type : 'user-defined' ,
2023-07-15 01:28:20 +02:00
defaultType : 'user-defined' ,
2023-01-15 22:11:47 +01:00
persistCSA : CropModePersistence.Default ,
2023-01-07 03:05:17 +01:00
defaults : {
crop : null ,
2025-01-14 01:44:25 +01:00
stretch : { type : StretchType . Default } ,
2023-04-16 02:16:57 +02:00
alignment : { x : VideoAlignmentType.Default , y : VideoAlignmentType.Default } ,
2023-01-07 03:05:17 +01:00
}
2019-01-20 22:59:06 +01:00
} ,
2018-06-27 23:55:37 +02:00
"www.youtube.com" : {
2023-01-07 03:05:17 +01:00
enable : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
} ,
enableAard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
} ,
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled
2023-01-07 03:05:17 +01:00
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
2025-01-27 02:59:30 +01:00
} ,
2018-08-30 00:56:15 +02:00
override : false , // ignore value localStorage in favour of this
2018-11-14 23:32:37 +01:00
type : 'official' , // is officially supported? (Alternatives are 'community' and 'user-defined')
2025-04-22 02:42:33 +02:00
defaultType : 'official' , // if user mucks around with settings, type changes to 'user-defined'.
// We still want to know what the original type was, hence defaultType
activeDOMConfig : 'official' ,
DOMConfig : {
'official' : {
type : 'official' ,
elements : {
player : {
manual : true ,
querySelectors : "#movie_player, #player, #c4-player" ,
}
}
}
}
} ,
"www.youtube-nocookie.com" : {
enable : {
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled ,
} ,
enableAard : {
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled ,
} ,
enableKeyboard : {
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled
} ,
enableUI : {
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
} ,
override : false , // ignore value localStorage in favour of this
type : 'official' , // is officially supported? (Alternatives are 'community' and 'user-defined')
2023-07-15 01:28:20 +02:00
defaultType : 'official' , // if user mucks around with settings, type changes to 'user-defined'.
// We still want to know what the original type was, hence defaultType
2023-01-07 03:05:17 +01:00
activeDOMConfig : 'official' ,
DOMConfig : {
'official' : {
type : 'official' ,
elements : {
player : {
manual : true ,
querySelectors : "#movie_player, #player, #c4-player" ,
}
}
2019-07-03 20:17:55 +02:00
}
}
2018-06-27 23:55:37 +02:00
} ,
"www.netflix.com" : {
2023-01-07 03:05:17 +01:00
enable : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
normal : ExtensionMode.Default ,
} ,
enableAard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Disabled ,
theater : ExtensionMode.Disabled ,
normal : ExtensionMode.Disabled ,
2023-01-07 03:05:17 +01:00
} ,
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled
2023-01-07 03:05:17 +01:00
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
2025-01-27 02:59:30 +01:00
} ,
2018-08-30 00:56:15 +02:00
override : false ,
2023-01-07 03:05:17 +01:00
type : 'community' ,
2023-07-15 01:28:20 +02:00
defaultType : 'community' ,
2020-03-09 22:36:17 +01:00
} ,
"www.disneyplus.com" : {
2023-01-07 03:05:17 +01:00
enable : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
normal : ExtensionMode.Default ,
} ,
enableAard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
normal : ExtensionMode.Default ,
} ,
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
normal : ExtensionMode.Default
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
2025-01-27 02:59:30 +01:00
normal : ExtensionMode.Default
} ,
2020-03-09 22:36:17 +01:00
type : 'community' ,
2023-07-15 01:28:20 +02:00
defaultType : 'community' ,
2023-01-07 03:05:17 +01:00
activeDOMConfig : 'community-mstefan99' ,
DOMConfig : {
'community-mstefan99' : {
type : 'official' ,
elements : {
player : {
manual : true ,
querySelectors : ".btm-media-player" ,
} ,
video : {
manual : true ,
querySelectors : ".btm-media-client-element"
}
} ,
2024-06-12 01:55:12 +02:00
// customCss: ".hudson-container { height: 100%; }"
2020-03-09 22:36:17 +01:00
}
2023-01-07 03:05:17 +01:00
}
2018-06-27 23:55:37 +02:00
} ,
2019-07-03 20:17:55 +02:00
"www.twitch.tv" : {
2023-01-07 03:05:17 +01:00
enable : {
2025-01-27 02:59:30 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
} ,
enableAard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
} ,
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled
2023-01-07 03:05:17 +01:00
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled
2025-01-27 02:59:30 +01:00
} ,
2019-07-03 21:37:03 +02:00
type : 'official' ,
2023-07-15 01:28:20 +02:00
defaultType : 'official' ,
2019-07-03 21:37:03 +02:00
} ,
2019-06-07 01:50:13 +02:00
"old.reddit.com" : {
2023-01-07 03:05:17 +01:00
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 ,
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
fullscreen : ExtensionMode.Disabled ,
theater : ExtensionMode.Disabled ,
normal : ExtensionMode.Disabled
} ,
2023-01-07 03:05:17 +01:00
type : 'officially-disabled' ,
2023-07-15 01:28:20 +02:00
defaultType : 'officially-disabled' ,
2023-01-07 03:05:17 +01:00
activeDOMConfig : 'official' ,
DOMConfig : {
'official' : {
type : 'official' ,
2024-06-12 01:55:12 +02:00
// customCss: 'video {\n width: 100% !important;\n height: 100% !important;\n}',
2023-01-07 03:05:17 +01:00
elements : {
player : {
manual : false ,
querySelectors : '.reddit-video-player-root, .media-preview-content'
}
}
2019-06-24 14:05:37 +02:00
}
} ,
} ,
"www.reddit.com" : {
2023-01-07 03:05:17 +01:00
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 ,
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
fullscreen : ExtensionMode.Disabled ,
theater : ExtensionMode.Disabled ,
normal : ExtensionMode.Disabled
} ,
2023-01-07 03:05:17 +01:00
type : 'officially-disabled' ,
2023-07-15 01:28:20 +02:00
defaultType : 'officially-disabled' ,
2023-01-07 03:05:17 +01:00
activeDOMConfig : 'official' ,
DOMConfig : {
'official' : {
type : 'official' ,
2024-06-12 01:55:12 +02:00
// customCss: 'video {\n width: 100% !important;\n height: 100% !important;\n}',
2023-01-07 03:05:17 +01:00
elements : {
player : {
manual : false ,
querySelectors : '.reddit-video-player-root, .media-preview-content'
}
}
2019-06-10 23:45:15 +02:00
}
2019-06-14 02:15:24 +02:00
} ,
2019-06-14 23:20:47 +02:00
} ,
"imgur.com" : {
2023-01-07 03:05:17 +01:00
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 ,
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
fullscreen : ExtensionMode.Disabled ,
theater : ExtensionMode.Disabled ,
normal : ExtensionMode.Disabled
} ,
2023-01-07 03:05:17 +01:00
type : 'officially-disabled' ,
2023-07-15 01:28:20 +02:00
defaultType : 'officially-disabled' ,
2019-06-07 01:50:13 +02:00
} ,
2019-06-15 23:03:19 +02:00
"gfycat.com" : {
2023-01-07 03:05:17 +01:00
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 ,
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
fullscreen : ExtensionMode.Default ,
theater : ExtensionMode.Default ,
normal : ExtensionMode.Default
} ,
2023-01-07 03:05:17 +01:00
type : 'officially-disabled' ,
2023-07-15 01:28:20 +02:00
defaultType : 'officially-disabled' ,
2019-06-15 23:03:19 +02:00
} ,
"giant.gfycat.com" : {
2023-01-07 03:05:17 +01:00
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 ,
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
fullscreen : ExtensionMode.Default ,
theater : ExtensionMode.Default ,
normal : ExtensionMode.Default
} ,
2023-01-07 03:05:17 +01:00
type : 'officially-disabled' ,
2023-07-15 01:28:20 +02:00
defaultType : 'officially-disabled' ,
2019-06-15 23:03:19 +02:00
} ,
2020-12-01 01:48:02 +01:00
"www.wakanim.tv" : {
2023-01-07 03:05:17 +01:00
enable : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
} ,
enableAard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled ,
2023-01-07 03:05:17 +01:00
} ,
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled
2023-01-07 03:05:17 +01:00
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Enabled
2025-01-27 02:59:30 +01:00
} ,
2020-12-01 01:48:02 +01:00
type : 'community' ,
2023-07-15 01:28:20 +02:00
defaultType : 'community' ,
2023-01-07 03:05:17 +01:00
activeDOMConfig : 'community' ,
DOMConfig : {
'community' : {
type : 'community' ,
elements : {
player : {
manual : true ,
querySelectors : "#jwplayer-container"
}
}
2020-12-01 01:48:02 +01:00
}
2023-01-07 03:05:17 +01:00
} ,
2020-12-01 01:48:02 +01:00
} ,
2021-07-05 00:51:15 +02:00
"app.plex.tv" : {
2023-01-07 03:05:17 +01:00
enable : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled ,
2023-01-07 03:05:17 +01:00
} ,
enableAard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled ,
2021-07-05 00:51:15 +02:00
} ,
2023-01-07 03:05:17 +01:00
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
2023-01-07 03:05:17 +01:00
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
2025-01-27 02:59:30 +01:00
} ,
2023-01-07 03:05:17 +01:00
type : 'community' ,
2023-07-15 01:28:20 +02:00
defaultType : 'community' ,
2023-01-07 03:05:17 +01:00
activeDOMConfig : 'community' ,
DOMConfig : {
'community' : {
type : 'community' ,
2024-06-12 01:55:12 +02:00
// customCss: "body {\n background-color: #000;\n}\n\n.application {\n background-color: #000;\n}"
2023-01-07 03:05:17 +01:00
}
}
2021-07-14 21:17:32 +02:00
} ,
"metaivi.com" : {
2023-01-07 03:05:17 +01:00
enable : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled ,
2023-01-07 03:05:17 +01:00
} ,
enableAard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled ,
2023-01-07 03:05:17 +01:00
} ,
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
2023-01-07 03:05:17 +01:00
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
2025-01-27 02:59:30 +01:00
} ,
2021-07-14 21:17:32 +02:00
type : "community" ,
2023-07-15 01:28:20 +02:00
defaultType : "community" ,
2023-01-07 03:05:17 +01:00
activeDOMConfig : 'community' ,
DOMConfig : {
'community' : {
type : 'community' ,
elements : {
video : {
nodeCss : { 'position' : 'absolute !important' }
}
}
2021-07-14 21:17:32 +02:00
}
} ,
2021-07-14 22:45:00 +02:00
} ,
"piped.kavin.rocks" : {
2023-01-07 03:05:17 +01:00
enable : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled ,
2023-01-07 03:05:17 +01:00
} ,
enableAard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled ,
2021-07-14 22:45:00 +02:00
} ,
2023-01-07 03:05:17 +01:00
enableKeyboard : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
2023-01-07 03:05:17 +01:00
} ,
2025-01-27 02:59:30 +01:00
enableUI : {
2025-01-30 01:29:00 +01:00
fullscreen : ExtensionMode.Enabled ,
theater : ExtensionMode.Enabled ,
normal : ExtensionMode.Disabled
2025-01-27 02:59:30 +01:00
} ,
2023-01-07 03:05:17 +01:00
type : "community" ,
2023-07-15 01:28:20 +02:00
defaultType : "community" ,
2023-01-07 03:05:17 +01:00
activeDOMConfig : 'community' ,
DOMConfig : {
'community' : {
type : 'community' ,
2024-06-12 01:55:12 +02:00
// customCss: ".shaka-video-container {\n flex-direction: column !important;\n}"
2023-01-07 03:05:17 +01:00
}
}
2021-07-14 22:45:00 +02:00
} ,
2017-12-31 18:26:59 +01:00
}
2017-12-17 22:56:07 +01:00
}
2018-12-30 23:16:09 +01:00
2021-10-28 22:53:43 +02:00
export default ExtensionConf ;