Remove Bally Live signup overlay

Remove the login overlay on ballylive.com

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Remove Bally Live signup overlay
// @namespace    http://tampermonkey.net/
// @version      1.0.2
// @description  Remove the login overlay on ballylive.com
// @author       guywmustang
// @match        https://www.ballylive.com/
// @run-at       document-start
// @require      https://code.jquery.com/jquery-3.7.1.min.js
// @icon         https://www.google.com/s2/favicons?sz=64&domain=ballylive.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Your code here...
    jQuery.noConflict();
    var $ = jQuery;

    var timer;

    function checkAndRemoveOverlay() {
        var $pwBox = $('.pwcard');
        // Remove the password box
        if ($pwBox.length) {
            removeOverlay();
            console.log("removed overlay");

            // Reset the timer to a longer check now
            clearInterval(timer);
            timer = setInterval(checkAndRemoveOverlay, 3000);
            console.log("reset login overlay check timer to a 3 second interval");
        }
    }

    function removeOverlay() {
        console.log("remove the overlay...");
        var $pwBox = $('.pwcard');
        // Remove the password box
        if ($pwBox.length) {
            $pwBox.remove();
        }

        // Remove the blur
        var $cls = $('.theo-wrapper .blur-style');
        if ($cls.length) {
            $($cls[0]).removeClass("blur-style");
        }

         setTimeout(unmute, 1000);
    }

    function unmute() {
        // unmute the video
        var $video = $('#vjs_video_3_THEOplayerFi');
        if ($video && $video.find("video").length > 0) {
            // unmute
            var $videoInstance = $video.find("video")[0];
            $videoInstance.muted = false;
            console.log("unmuted video");
        }
    }

    function addButton() {
        console.log("add the button...");

        var $btn = $('<button/>', {
            "id": "remove-overlay",
            "style": "background-color: unset; border: 1px solid #444444; padding: 3px;",
            click: removeOverlay
        }).append('<span/>').text("Clear Overlay");

        // Add the button
        var $navbar = $("nav > div")[0];

        //navbar.append($("<button>button</button>"));
        $navbar.append($btn[0]);

        console.log("done adding button");
    }

    // finally once the page is loaded, apply the full dark style
    window.onload = function() {
        // addButton(); // If desired to have a manual button at the top
    }

    $(document).ready(() => {

        timer = setInterval(checkAndRemoveOverlay, 1000);

    });
})();