diff --git a/CHANGELOG.md b/CHANGELOG.md index c04e575..8ea4d31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/package-lock.json b/package-lock.json index 5b0f519..b79e50b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ultravidify", - "version": "4.3.0", + "version": "4.4.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9e9476b..0dec4c5 100644 --- a/package.json +++ b/package.json @@ -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 ", "scripts": { diff --git a/src/ext/conf/ExtConfPatches.js b/src/ext/conf/ExtConfPatches.js index 8912888..5b017a8 100644 --- a/src/ext/conf/ExtConfPatches.js +++ b/src/ext/conf/ExtConfPatches.js @@ -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, + } + } + } + } } ]; diff --git a/src/ext/lib/Settings.js b/src/ext/lib/Settings.js index 173f380..3b23f3d 100644 --- a/src/ext/lib/Settings.js +++ b/src/ext/lib/Settings.js @@ -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){ diff --git a/src/ext/lib/ar-detect/ArDetector.js b/src/ext/lib/ar-detect/ArDetector.js index 20a7231..1f95469 100644 --- a/src/ext/lib/ar-detect/ArDetector.js +++ b/src/ext/lib/ar-detect/ArDetector.js @@ -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. // diff --git a/src/manifest.json b/src/manifest.json index 46818da..0f59055 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -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}" diff --git a/src/popup/panels/WhatsNewPanel.vue b/src/popup/panels/WhatsNewPanel.vue index fa23145..6944777 100644 --- a/src/popup/panels/WhatsNewPanel.vue +++ b/src/popup/panels/WhatsNewPanel.vue @@ -2,23 +2,11 @@

What's new

Full changelog for older versions is available here.

-

4.4.2

+

4.4.3

+ This update mostly attempts to fix disney+ (again). Consider commenting on this issue if issues with disney+ persist.