hxty.live - remove player footer and chat panel

Remove player footer and chat panel

目前為 2025-07-09 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        hxty.live - remove player footer and chat panel
// @namespace   Violentmonkey Scripts
// @match       *://*.hxty.live/live/*
// @match       *://*.360pai.xyz/live/*
// @match       *://*.idevkit.com/live/*
// @grant       none
// @version     0.0.1
// @author      Bin
// @description Remove player footer and chat panel
// @license     GNU AGPLv3
// ==/UserScript==

/* jshint esversion: 6 */

window.addEventListener("load", () => {
  document.querySelector('[class^="player-footer_live-player-footer"]').remove();
  document.querySelector('[class^="anchor-detail-page_chat-panel"]').remove();

  const playerContainer = document.querySelector('[class^="anchor-detail-page_anchor-live-container"]');

  var observer = new MutationObserver((mutations) => {
    mutations.forEach((mutation) => {
      const target = mutation.target;
      if (mutation.type === "attributes" && /anchor-detail-page_theater-mode/.test(target.className)) {
        target.style.bottom = 0
      }
    });
  });

  observer.observe(playerContainer, {
    attributes: true //configure it to listen to attribute changes
  });
});