From 2404cd775711a1107da6656ba5f184c872a55636 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 29 Nov 2018 21:07:27 +0100 Subject: [PATCH] Settings page: basic html --- res/settings/css/flex.css | 15 ++ res/settings/settings.html | 314 ++++++++++++++++--------------------- 2 files changed, 148 insertions(+), 181 deletions(-) create mode 100644 res/settings/css/flex.css diff --git a/res/settings/css/flex.css b/res/settings/css/flex.css new file mode 100644 index 0000000..a413bfb --- /dev/null +++ b/res/settings/css/flex.css @@ -0,0 +1,15 @@ +.flex { + display: flex; +} + +.flex-row { + flex-direction: row; +} + +.flex-column { + flex-direction: column; +} + +.flex-auto { + flex: 1 1 auto; +} \ No newline at end of file diff --git a/res/settings/settings.html b/res/settings/settings.html index f70cabe..df606c7 100644 --- a/res/settings/settings.html +++ b/res/settings/settings.html @@ -5,8 +5,10 @@ + +
@@ -31,91 +33,141 @@
-
- -
- Enable this extension: - - - Always enables this extension on every site you visit that you didn't blacklist. - On whitelisted sites enables this extension only on sites you explicitly whitelisted. - Never disables extension on all sites, even on those you whitelisted. - +
+
+ Enable this extension: + +
+
- -
- Enable autodetection: - - - Always enables autodetection on every site this extension is enabled for, unless blacklisted. - On whitelisted sites enables autodetection only for sites that you explicitly enabled. - Never disables autodetection on all sites, even on those you whitelisted. - + + Always enables this extension on every site you visit that you didn't blacklist.
+ On whitelisted sites enables this extension only on sites you explicitly whitelisted.
+ Never disables extension on all sites, even on those you whitelisted. +
+
+ +
+
+
Whitelisted sites
+
List of whitelisted sites. One per line.
+
+
+
Blacklisted sites
+
List of blacklisted sites. One per line.
+ +
+
-
- In-player UI -
- Always/a> - On whitelisted sites - Never +
+ Enable autodetection: +
+
+ + Always enables autodetection on every site this extension is enabled for, unless blacklisted.
+ On whitelisted sites enables autodetection only for sites that you explicitly enabled.
+ Never disables autodetection on all sites, even on those you whitelisted.
+
+ For more settings related to autodetection, please check the 'Autodetection' tab. +
+
+ +
+ Default video alignment: +
+
+
+ +
+
Default stretch mode
+
+
+ + None: do not stretch the video at all. This is the default option, for men of culture.
+ Basic: stretches video to fit the player or screen unconditionally. If video has letterbox encoded, this option will not try to remove letterbox before stretching. You probably shouldn't be using this option.
+ Hybrid: stretches the video to fit the player, but only if cropping didn't completely remove the black bars.
+ Thin borders: stretches only if the width of black borders after cropping is thin. +
+ Treshold for thin borders can be defined below. +
+
+
+ Thin border treshold (%): +
+
+
- - -
- Video alignment: -
- left - center - right -
-
- -
- -
-
- -
+
+
- - - +
Enable autodetection: -
- Always - On whitelisted sites - Never + +
+
-
- Always enables autodetection on every site this extension is enabled for, unless blacklisted. - On whitelisted sites enables autodetection only for sites that you explicitly enabled. - Never disables autodetection on all sites, even on those you whitelisted. + + Always enables autodetection on every site you visit that you didn't blacklist.
+ On whitelisted sites enables autodetection only on sites you explicitly whitelisted.
+ Never disables autodetection on all sites, even on those you whitelisted. +
+
+ +
+
+
Whitelisted sites
+
List of whitelisted sites. One per line.
+ +
+
+
Blacklisted sites
+
List of blacklisted sites. One per line.
+
+

Advanced automatic detection options

+
- Checking for aspect ratio changes -
+
Aspect ratio check frequency
+
+

Options here decide how often the extension will check for changes in aspect ratio of a given video.

+

Values are given in milliseconds. Longer intervals increase delay between aspect ratio changing and extension re-correcting for the change. Using shorter intervals than the default ones can cause lage and immense RAM usage.

+
+
+
+
+ Check frequency when video is playing (ms): +
+
+ +
+
+
+
+ Check frequency when video is paused (ms): +
+
+ +
+
+
+
+ Recheck delay on error (ms): +
+
+ +
+
+
+
- - todo: insert checkbox +
Fallback mode

In order for autodetection to work, the extension grabs a frame of the video you're watching and takes a look at it. Some websites use DRM, which prevents you from using the HTML5-blessed way of getting a frame from a video. Some browsers offer some features that can be used to circumvent DRM protection. With this option enabled, the extension will use said features to basically do that.

-

Technical details: tl;dr — only works in Firefox and maybe its forks.
- Fallback mode depends on two things: -

    -
  1. Attempting to grab a video frame from DRM protected video stream must return an error (Chrome returns black image)
  2. -
  3. Supports CanvasRenderingContext2D.drawWindow() method, which pretty much only Firefox does
  4. -
-

-

But I thought it's illegal to circumvent DRM?
- Courts disagree (at least as far as our use-case is concerned). - At this point I'd also throw in some choice words about DRM and everyone using it, but AMO gives me "you're breaking terms of conduct" warnings over use of the word for thing you flush down the toilet, prepended by a word for male cow*, in the code comments.
*'cow' is term for the female
-

+

At the moment, Firefox is the only browser to support this.

+
+ This browser doesn't support fallback mode. +
+
Enable fallback mode
- +
- -
- - - - -
-

PLEASE NOTE: THIS IS COMPLETELY NON-FUNCTIONAL ATM. YOU CANT SET SITE-SPECIFIC OPTIONS ATM

-
- +
Actions
+
+

In this sections, you can define custom actions, add or change keyboard shortcut or hide buttons from the popup.

-
- +
- - -
-
-

Keyboard shortcuts

- -
- - - -
-
Autodetect aspect ratio
- Ctrl + - Shift + - Alt + - -
- - -
-
Fit to width
- Ctrl + - Shift + - Alt + - -
- - -
-
Fit to height
- Ctrl + - Shift + - Alt + - -
- - -
-
Reset
- Ctrl + - Shift + - Alt + - -
- - -
-
Force 21:9
- Ctrl + - Shift + - Alt + - -
- - -
-
Force 2:1 (18:9)
- Ctrl + - Shift + - Alt + - -
- - -
-
Force 16:9
- Ctrl + - Shift + - Alt + - -
- - -
-
Cancel
Save
-
-
Note: keyboard shortcut conflicts aren't handled by this extension. You must know your shortcuts.
Pro tip: If you don't want to have a keybind for a shortcut, just uncheck all boxes for the action and remove the letter
-
- +