Greasy Fork

Prevent HBO Max Autoplay

Automatically clicks the cancel button to prevent HBO Max from automatically playing the next episode.

目前为 2022-06-16 提交的版本。查看 最新版本

// ==UserScript==
// @name         Prevent HBO Max Autoplay
// @namespace    prevent-hbo-max-autoplay
// @description  Automatically clicks the cancel button to prevent HBO Max from automatically playing the next episode.
// @version      0.1
// @license MIT
// @match        https://play.hbomax.com/*
// @icon         https://www.google.com/s2/favicons?domain=hbomax.com
// ==/UserScript==

setInterval(function(){
    var upNextButton = document.querySelector('div[aria-label^="Up Next:"]')
    if(upNextButton !== null){
        console.log('Cancelling autoplay!')
        setTimeout(function(){
            location.href = 'https://play.hbomax.com'
        }, 6000)
    }
}, 1000)