v1.4.1-beta/HBO Fixes

This commit is contained in:
Ayushya Amitabh
2020-06-16 14:40:32 -04:00
parent 03afbfb8bd
commit 59843834d6
6 changed files with 38 additions and 5 deletions
+4
View File
@@ -55,6 +55,10 @@ switch (getPlayerSource()) {
break;
case PLAYER_SOURCE.HBONOW:
case PLAYER_SOURCE.HBOMAX:
const hboClickInject = `var hboInputFix=function(ev){if(ev.target.tagName==='INPUT'||ev.target.tagName==='TEXTAREA'){ev.target.focus();}ev.stopImmediatePropagation();ev.stopPropagation();};document.addEventListener('keydown',hboInputFix,{capture:true});var hboClickFix=function(ev){if(document.querySelector('body.visible')){if(ev.clientX > window.innerWidth - 400){if(ev.target.tagName==='INPUT'||ev.target.tagName==='TEXTAREA'){ev.target.focus();}ev.preventDefault();ev.stopPropagation();ev.stopImmediatePropagation();}}};document.addEventListener("mousedown",hboClickFix,{capture:true});`;
const hboClickInjectScript = document.createElement('script');
hboClickInjectScript.text = hboClickInject;
document.head.appendChild(hboClickInjectScript);
document.body.classList.add('hbo');
break;
case PLAYER_SOURCE.LOCAL: