MissAV Disable Auto Pause

Stop MissAV pause video when page blur

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         MissAV Disable Auto Pause
// @namespace    coolrice.scripts
// @description  Stop MissAV pause video when page blur
// @version      0.2
// @author       CoolRice
// @match        https://missav.ws/*
// @grant        none
// @run-at       document-start
// @license      MIT
// ==/UserScript==
(function() {
    'use strict';

    // 备份原始的事件监听器方法
    const originalAddEventListener = document.addEventListener;
    const originalRemoveEventListener = document.removeEventListener;
    const originalWindowRemoveEventListener = window.removeEventListener;

    // 创建新的 addEventListener,屏蔽 visibilitychange 和 blur 事件
    document.addEventListener = function(event, callback, options) {
        if (event === 'visibilitychange' || event === 'blur') {
            // 直接不添加监听器,避免触发
            return;
        }
        else {
            originalAddEventListener.call(document, event, callback, options);
        }
    };

    // 创建新的 addEventListener,屏蔽 visibilitychange 和 blur 事件
    window.addEventListener = function(event, callback, options) {
        if (event === 'visibilitychange' || event === 'blur') {

            // 直接不添加监听器,避免触发
            return;
        }
        else {
            originalAddEventListener.call(window, event, callback, options);
        }
    };
})();