Max Max

Quality of life changes to Max.com

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey, Greasemonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

คุณจะต้องติดตั้งส่วนขยาย เช่น Tampermonkey หรือ Violentmonkey เพื่อติดตั้งสคริปต์นี้

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Max Max
// @namespace    ccn0
// @version      5
// @description  Quality of life changes to Max.com
// @author       CCN0
// @license      MIT
// @match        *://*.hbomax.com/*
// @icon         https://external-content.duckduckgo.com/ip3/www.max.com.ico
// @grant GM_addStyle
// ==/UserScript==

(function() {
    GM_addStyle(`
    [class^="Title-Beam-Web-Ent"],
    [class^="SeasonEpisode-Beam-Web-Ent"],
    [class^="Subtitle-Beam-Web-Ent"],
    [data-testid^="player-ux-scrubber-timestamp"],
    [data-testid^="player-ux-scrubber-position"] {
        opacity: 0.5;
        user-select: text;
    }

    [data-testid^="player-ux-scrubber-track"] {
        opacity: 0.2;
    }

    [class^="ControlsFooterBottom-Beam-Web-Ent"] {
        margin-bottom: -20px;
        margin-top: -10px;
    }

    [class^="TopGradient-Beam-Web-Ent"],
    [class^="BottomGradient-Beam-Web-Ent"],
    [class^="RatingsAdvisoriesContainer-Beam-Web-Ent"] {
        opacity: 0;
    }

    [class^="SeasonEpisodeSubtitleContainer-Beam-Web-Ent"] {
        height: 10px;
    }
    `);
    function maxMaxMax() {
        var skipbutton = document.querySelector('[data-testid="player-ux-skip-button"]');
        if (skipbutton) {skipbutton.click()};

        function removeElements(selector) {
            const elements = document.querySelectorAll(selector);
            elements.forEach(element => {
                element.remove();
            });
        };


        if (location.href.includes('/video/watch')) {
            const svgbuttons = document.querySelectorAll('svg');
            svgbuttons.forEach(element => {
                element.style.opacity = "0.5";
        });}

        removeElements('[class^="ControlsFooterBottomLeft-Beam-Web-Ent"]');
    };

    setInterval(maxMaxMax,500);
})();