Merge branch 'master' into stable
This commit is contained in:
commit
c28651d9f7
@ -16,6 +16,7 @@ QoL improvements for me:
|
|||||||
|
|
||||||
* Minor rework of settings page (actions & shortcuts section)
|
* Minor rework of settings page (actions & shortcuts section)
|
||||||
* Fixed bug that prevented settings page from opening
|
* Fixed bug that prevented settings page from opening
|
||||||
|
* **[4.3.1.1]** quick patch for twitch.tv
|
||||||
|
|
||||||
### v4.3.0
|
### v4.3.0
|
||||||
|
|
||||||
|
@ -102,6 +102,21 @@ const ExtensionConfPatch = [
|
|||||||
css: 'video {\n width: 100% !important;\n height: 100% !important;\n}',
|
css: 'video {\n width: 100% !important;\n height: 100% !important;\n}',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
forVersion: '4.3.1.1',
|
||||||
|
sites: {
|
||||||
|
'www.twitch.tv': {
|
||||||
|
DOM: {
|
||||||
|
player: {
|
||||||
|
manual: false,
|
||||||
|
querySelectors: "",
|
||||||
|
additionalCss: "",
|
||||||
|
useRelativeAncestor: false,
|
||||||
|
playerNodeCss: ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -940,8 +940,8 @@ whatsNewChecked: true,
|
|||||||
keyboardShortcutsEnabled: ExtensionMode.Default,
|
keyboardShortcutsEnabled: ExtensionMode.Default,
|
||||||
DOM: {
|
DOM: {
|
||||||
player: {
|
player: {
|
||||||
manual: true,
|
manual: false,
|
||||||
querySelectors: ".video-player__container.player",
|
querySelectors: "",
|
||||||
additionalCss: "",
|
additionalCss: "",
|
||||||
useRelativeAncestor: false,
|
useRelativeAncestor: false,
|
||||||
playerNodeCss: ""
|
playerNodeCss: ""
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import Debug from '../conf/Debug';
|
import Debug from '../conf/Debug';
|
||||||
|
|
||||||
class ObjectCopy {
|
class ObjectCopy {
|
||||||
static addNew(existing, target){
|
static addNew(current, newValues){
|
||||||
|
|
||||||
// clone target
|
// clone target
|
||||||
var out = JSON.parse(JSON.stringify(target));
|
var out = JSON.parse(JSON.stringify(newValues));
|
||||||
|
|
||||||
if(! existing) {
|
if(! current) {
|
||||||
if(Debug.debug) {
|
if(Debug.debug) {
|
||||||
console.log("[ObjectCopy::addNew] There's no existing value. Returning target value.");
|
console.log("[ObjectCopy::addNew] There's no existing value. Returning target value.");
|
||||||
}
|
}
|
||||||
@ -16,10 +16,10 @@ class ObjectCopy {
|
|||||||
|
|
||||||
for(var k in out) {
|
for(var k in out) {
|
||||||
// if current key exist, replace it with existing value. Take no action otherwise.
|
// if current key exist, replace it with existing value. Take no action otherwise.
|
||||||
if(existing[k]) {
|
if(current[k]) {
|
||||||
|
|
||||||
// Types and constructors of objects must match. If they don't, we always use the new value.
|
// Types and constructors of objects must match. If they don't, we always use the new value.
|
||||||
if(typeof out[k] === typeof existing[k] && out[k].constructor === existing[k].constructor) {
|
if(typeof out[k] === typeof current[k] && out[k].constructor === current[k].constructor) {
|
||||||
|
|
||||||
// objects are special, we need to check them recursively.
|
// objects are special, we need to check them recursively.
|
||||||
if(out[k] && typeof out[k] === 'object' && out[k].constructor === Object ) {
|
if(out[k] && typeof out[k] === 'object' && out[k].constructor === Object ) {
|
||||||
@ -27,9 +27,9 @@ class ObjectCopy {
|
|||||||
console.log("[ObjectCopy::addNew] current key contains an object. Recursing!")
|
console.log("[ObjectCopy::addNew] current key contains an object. Recursing!")
|
||||||
}
|
}
|
||||||
|
|
||||||
out[k] = this.addNew(existing[k], out[k]);
|
out[k] = this.addNew(current[k], out[k]);
|
||||||
} else {
|
} else {
|
||||||
out[k] = existing[k];
|
out[k] = current[k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,39 +37,41 @@ class ObjectCopy {
|
|||||||
|
|
||||||
// add the values that would otherwise be deleted back to our object. (We need that so user-defined
|
// add the values that would otherwise be deleted back to our object. (We need that so user-defined
|
||||||
// sites don't get forgotten)
|
// sites don't get forgotten)
|
||||||
for(var k in existing) {
|
for(var k in current) {
|
||||||
if (! out[k]) {
|
if (! out[k]) {
|
||||||
out[k] = existing[k];
|
out[k] = current[k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static overwrite(existing, target){
|
static overwrite(current, newValues){
|
||||||
for(var k in target) {
|
for(var k in newValues) {
|
||||||
// if current key exist, replace it with existing value. Take no action otherwise.
|
// if current key exist, replace it with existing value. Take no action otherwise.
|
||||||
if (existing[k]) {
|
if (current[k] !== undefined) {
|
||||||
|
|
||||||
// Types and constructors of objects must match. If they don't, we always use the new value.
|
// Types and constructors of objects must match. If they don't, we always use the new value.
|
||||||
if (typeof target[k] === typeof existing[k] && target[k].constructor === existing[k].constructor) {
|
if (typeof newValues[k] === typeof current[k] && newValues[k].constructor === current[k].constructor) {
|
||||||
|
|
||||||
// objects are special, we need to check them recursively.
|
// objects are special, we need to check them recursively.
|
||||||
if(existing[k] && typeof existing[k] === 'object' && existing[k].constructor === Object ) {
|
if(current[k] && typeof current[k] === 'object' && current[k].constructor === Object ) {
|
||||||
if(Debug.debug && Debug.settings) {
|
if(Debug.debug && Debug.settings) {
|
||||||
console.log("[ObjectCopy::addNew] current key contains an object. Recursing!")
|
console.log("[ObjectCopy::addNew] current key contains an object. Recursing!")
|
||||||
}
|
}
|
||||||
|
|
||||||
existing[k] = this.overwrite(existing[k], target[k]);
|
current[k] = this.overwrite(current[k], newValues[k]);
|
||||||
} else {
|
} else {
|
||||||
existing[k] = target[k];
|
current[k] = newValues[k];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
existing[k] = target[k];
|
current[k] = newValues[k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (newValues[k] !== undefined) {
|
||||||
|
current[k] = newValues[k];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return existing;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
static pruneUnused(existing, target, ignoreKeys) {
|
static pruneUnused(existing, target, ignoreKeys) {
|
||||||
|
@ -158,7 +158,6 @@ class Settings {
|
|||||||
while (index < patches.length) {
|
while (index < patches.length) {
|
||||||
delete patches[index].forVersion;
|
delete patches[index].forVersion;
|
||||||
ObjectCopy.overwrite(this.active, patches[index]);
|
ObjectCopy.overwrite(this.active, patches[index]);
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Ultrawidify",
|
"name": "Ultrawidify",
|
||||||
"description": "Removes black bars on ultrawide videos and offers advanced options to fix aspect ratio.",
|
"description": "Removes black bars on ultrawide videos and offers advanced options to fix aspect ratio.",
|
||||||
"version": "4.3.1",
|
"version": "4.3.1.1",
|
||||||
"applications": {
|
"applications": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
"id": "{cf02b1a7-a01a-4e37-a609-516a283f1ed3}"
|
"id": "{cf02b1a7-a01a-4e37-a609-516a283f1ed3}"
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<h2>What's new</h2>
|
<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>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.3.1</p>
|
<p class="label">4.3.1.1</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><b>[4.3.3.1]</b> Patched twitch.tv</li>
|
||||||
<li>Minor rework of settings page (actions & shortcuts section)</li>
|
<li>Minor rework of settings page (actions & shortcuts section)</li>
|
||||||
<li>Fixed bug that prevented settings page from opening</li>
|
<li>Fixed bug that prevented settings page from opening</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -20,8 +20,8 @@ https://streamable.com/vrb4w
|
|||||||
|
|
||||||
https://clips.twitch.tv/DirtyHotLampOpieOP
|
https://clips.twitch.tv/DirtyHotLampOpieOP
|
||||||
|
|
||||||
Also full stream — minor aspect ratio corrections are being triggered after the intro: https://www.twitch.tv/videos/330639009
|
Also full stream: https://www.twitch.tv/videos/330639009
|
||||||
Gets especially bad during WoW segment: https://www.twitch.tv/videos/330639009?t=1h49m20s
|
WoW segment with switch from 16:9 -> 21:9: https://www.twitch.tv/videos/330639009?t=1h49m20s
|
||||||
|
|
||||||
## Youtube
|
## Youtube
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user