Fix for vk

This commit is contained in:
Tamius Han 2019-11-04 23:53:08 +01:00
parent 414bf7b36f
commit 5fc867b4a3

View File

@ -283,17 +283,20 @@ class PlayerData {
score = 100; score = 100;
// This entire section is disabled because of some bullshit on vk and some shady CIS streaming sites.
// Possibly removal of this criteria is not necessary, because there was also a bug with force player
//
if (element.id.indexOf('player') !== -1) { // prefer elements with 'player' in id // if (element.id.indexOf('player') !== -1) { // prefer elements with 'player' in id
score += 75; // score += 75;
} // }
// this has only been observed on steam // this has only been observed on steam
if (element.id.indexOf('movie') !== -1) { // if (element.id.indexOf('movie') !== -1) {
score += 75; // score += 75;
} // }
if (element.classList.toString().indexOf('player') !== -1) { // prefer elements with 'player' in classlist, but a bit less than id // if (element.classList.toString().indexOf('player') !== -1) { // prefer elements with 'player' in classlist, but a bit less than id
score += 50; // score += 50;
} // }
score -= scorePenalty++; // prefer elements closer to <video> score -= scorePenalty++; // prefer elements closer to <video>
elementQ.push({ elementQ.push({
@ -325,7 +328,7 @@ class PlayerData {
} }
forceRefreshPlayerElement() { forceRefreshPlayerElement() {
this.checkPlayerSizeChange(); this.getPlayer();
} }
checkPlayerSizeChange(){ checkPlayerSizeChange(){