From 5fc867b4a39520a4fb52ca9b6844ff7e57a5e3eb Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Mon, 4 Nov 2019 23:53:08 +0100 Subject: [PATCH] Fix for vk --- src/ext/lib/video-data/PlayerData.js | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/ext/lib/video-data/PlayerData.js b/src/ext/lib/video-data/PlayerData.js index b9f87bb..ec6ae3f 100644 --- a/src/ext/lib/video-data/PlayerData.js +++ b/src/ext/lib/video-data/PlayerData.js @@ -283,17 +283,20 @@ class PlayerData { score = 100; - - if (element.id.indexOf('player') !== -1) { // prefer elements with 'player' in id - score += 75; - } + // 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 + // score += 75; + // } // this has only been observed on steam - if (element.id.indexOf('movie') !== -1) { - score += 75; - } - if (element.classList.toString().indexOf('player') !== -1) { // prefer elements with 'player' in classlist, but a bit less than id - score += 50; - } + // if (element.id.indexOf('movie') !== -1) { + // score += 75; + // } + // if (element.classList.toString().indexOf('player') !== -1) { // prefer elements with 'player' in classlist, but a bit less than id + // score += 50; + // } score -= scorePenalty++; // prefer elements closer to