Maximize Video

Maximize all video players.Support Piture-in-picture.

< Відгуки до Maximize Video

Відгук: Добре - скрипт працює добре

§
Опубліковано: 29.03.2023

Hello, I think this script is 20/10, but I'd love you to add an option for us to use our own keybind(s). Something similar to what I have below.


Add this to the top of the script (the keybind is escape):

(function() {
    'use strict';

    var KEYCODE_ESCAPE = 27;
    var button = document.getElementById('playerControlBtn');
    var clicked = false;

    document.addEventListener('keydown', function(e) {
        if (e.keyCode === KEYCODE_ESCAPE) {
            if (clicked) {
                button.classList.remove('clicked');
                clicked = false;
            } else {
                button.classList.add('clicked');
                clicked = true;
                button.click();
            }
        }
    });
})();

Once you've added the code above, press ctrl+f and find this:

'#playerControlBtn {text-shadow: none;visibility:hidden;opacity:0;display:none;transition: all 0.5s ease;cursor: pointer;font: 12px "微软雅黑";margin:0;width:64px;height:20px;line-height:20px;border:none;text-align: center;position: fixed;z-index:2147483647;background-color: #27A9D8;color: #FFF;}

Once you've found it, change “hidden” to “visible” for visibility.

Опублікувати відповідь

Sign in to post a reply.