Merge branch 'master' into stable

This commit is contained in:
Tamius Han 2020-01-04 02:47:56 +01:00
commit 0920c234d0
8 changed files with 72 additions and 26 deletions

View File

@ -4,22 +4,33 @@
### Plans for the future
* WebGL
* Settings page looks ugly af right now. Maybe fix it some time later
* rework keyboard shortcuts so things like russian layouts don't mess thigns up
* other bug fixes
QoL improvements for me:
* logging: allow to enable logging at will and export said logs to a file
### v.4.4.1 (current)
### v4.4.3
* Fixed conf patch for disney+ (hopefully)
* `Settings.save()` adds missing values to site config when saving extension configuration.
### v4.4.2
* New stretching modes that squish video to a specified aspect ratio. One of the two modes correct aspect ratio before cropping, the other corrects after cropping.
* Potential fix for disney+ — added an option that forces extension to force player re-detection.
* Fixed bug where certain custom actions that should be removable weren't removable
### v4.4.1
* Changes to player detection that fix issues with vk
* Extension tries to avoid setting aspect ratio pointlessly
* (Hopefully) fixed mailto: and reddit compose links.
* When reporting bugs, email/reddit template now automatically gathers browser, extension version and OS.
### v.4.4.0
### v4.4.0
* Russian users (and users of other non-latin keyboard layouts) can now use keyboard shortcuts by default, without having to rebind them manually. (NOTE: if you've changed keyboard shortcuts manually, this change will ***NOT*** be applied to your configuration.)
* NOTE: when using non-latin layouts, 'zoom' shortcut (`z` by default) uses the position of 'Y' on QWERTY layout.

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "ultravidify",
"version": "4.3.0",
"version": "4.4.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "ultravidify",
"version": "4.4.2",
"version": "4.4.3",
"description": "Aspect ratio fixer for youtube that works around some people's disability to properly encode 21:9 (and sometimes, 16:9) videos.",
"author": "Tamius Han <tamius.han@gmail.com>",
"scripts": {

View File

@ -299,6 +299,24 @@ const ExtensionConfPatch = [
console.error("PROBLEM APPLYING SETTINGS", e);
}
}
}, {
forVersion: '4.4.3',
sites: {
"www.disneyplus.com": {
mode: ExtensionMode.Enabled,
autoar: ExtensionMode.Enabled,
autoarFallback: ExtensionMode.Enabled,
override: true, // ignore value localStorage in favour of this
stretch: Stretch.Default,
videoAlignment: VideoAlignment.Default,
keyboardShortcutsEnabled: ExtensionMode.Default,
DOM: {
player: {
periodicallyRefreshPlayerElement: true,
}
}
}
}
}
];

View File

@ -282,11 +282,36 @@ class Settings {
}
}
fixSitesSettings(sites) {
for (const site in sites) {
if (site === '@global') {
continue;
}
if (sites[site].mode === undefined) {
sites[site].mode = ExtensionMode.Default;
}
if (sites[site].autoar === undefined) {
sites[site].mode = ExtensionMode.Default;
}
if (sites[site].stretch === undefined) {
sites[site].mode = Stretch.Default;
}
if (sites[site].videoAlignment === undefined) {
sites[site].mode = VideoAlignment.Default;
}
if (sites[site].keyboardShortcutsEnabled === undefined) {
sites[site].mode = ExtensionMode.Default;
}
}
}
async set(extensionConf, options) {
if (!options || !options.forcePreserveVersion) {
extensionConf.version = this.version;
}
fixSitesSettings(sites);
this.logger.log('info', 'settings', "[Settings::set] setting new settings:", extensionConf)
if (currentBrowser.firefox || currentBrowser.edge) {
@ -377,10 +402,14 @@ class Settings {
return ExtensionMode.Enabled;
} else if (this.active.sites[site].mode === ExtensionMode.Basic) {
return ExtensionMode.Basic;
} else if (this.active.sites[site].mode === ExtensionMode.Default && site !== '@global') {
return this.getExtensionMode('@global');
} else {
} else if (this.active.sites[site].mode === ExtensionMode.Disabled) {
return ExtensionMode.Disabled;
} else {
if (site !== '@global') {
return this.getExtensionMode('@global');
} else {
return ExtensionMode.Disabled;
}
}
} catch(e){

View File

@ -464,7 +464,7 @@ class ArDetector {
// poglejmo, če se je razmerje stranic spremenilo
// check if aspect ratio is changed:
var lastAr = this.conf.resizer.getLastAr();
if (lastAr.type === AspectRatio.Automatic && lastAr.ratio !== null){
if (lastAr.type === AspectRatio.Automatic && lastAr.ratio !== null && lastAr.ratio !== undefined){
// spremembo lahko zavrnemo samo, če uporabljamo avtomatski način delovanja in če smo razmerje stranic
// že nastavili.
//

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "Ultrawidify",
"description": "Removes black bars on ultrawide videos and offers advanced options to fix aspect ratio.",
"version": "4.4.2",
"version": "4.4.3",
"applications": {
"gecko": {
"id": "{cf02b1a7-a01a-4e37-a609-516a283f1ed3}"

View File

@ -2,23 +2,11 @@
<div>
<h2>What's new</h2>
<p>Full changelog for older versions <a href="https://github.com/xternal7/ultrawidify/blob/master/CHANGELOG.md">is available here</a>.</p>
<p class="label">4.4.2</p>
<p class="label">4.4.3</p>
This update mostly attempts to fix disney+ (again). Consider commenting <a href="https://github.com/xternal7/ultrawidify/issues/84">on this issue</a> if issues with disney+ persist.
<ul>
<li>Stretching supports two new kinds of stretching (both hybrid). One stretches (or squishes) the video before
applying any possible crop, the other option first crops and then stretches/squishes to specified aspect ratio.<br/>
Especially the first option should be great for all men of culture who prefer watching content in its native aspect
ratio (even if that means seeing black bars) who get outright triggered when some uncivilized barbarians stretch 4:3
content to 16:9. You're welcome.<br/><small>Okay maybe I shouldn't soapboax like that in my patch notes.</small><br/>
There's two new buttons in 'stretch' section (video only). You can add more in extension settings if you want.<br/>
<b>This is experimental af and wasn't tested thoroughly — feedback welcome.</b> Links in 'report a problem' tab of
this popup.
</li>
<li>Disney+ didn't work for some. I've attempted to do a fix, but I am unable to test it (by the virtue of D+ not
being available in my country). If Disney+ continues to be problematic, I will probably need some help with it.
I would love to hear some feedback on whether extension works on Disney+ or not please consider contacting me
via <a href="mailto:tamius.han@gmail.com" target="_blank">email</a> or <a href="https://www.reddit.com/message/compose?to=xternal7" target="_blank">reddit</a>.
</li>
<li>Fixed a bug where user added actions would not be removable the nice way.</li>
<li>Fixed conf patch for disney+ (hopefully)</li>
<li><code>Settings.save()</code> adds missing values to site config when saving extension configuration.</li>
</ul>
</div>
</template>