Larger Twitch squad player

Removes the title bar in Twitch squad streams to increase the player size

安裝腳本?
作者推薦腳本

您可能也會喜歡 BetterYTM

安裝腳本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Larger Twitch squad player
// @description Removes the title bar in Twitch squad streams to increase the player size
// @namespace   https://github.com/Sv443/larger-twitch-squad-player
// @match       *://www.twitch.tv/*/squad
// @grant       none
// @license     MIT
// @version     1.2
// @author      Sv443
// @run-at      document-start
// @icon        https://icons.duckduckgo.com/ip3/twitch.tv.ico
// @require     https://update.greasyfork.org/scripts/472956/1279362/UserUtils.js
// ==/UserScript==

"use strict";

document.addEventListener("DOMContentLoaded", removeBar);

function removeBar() {
  try {
    const obs = new UserUtils.SelectorObserver(document.body);
    obs.enable();

    obs.addListener(".squad-stream-top-bar__container", {
      listener: (bar) => {
        bar.remove();
        console.info("Removed title bar.\nUserscript by Sv443: https://github.com/Sv443/larger-twitch-squad-player");
      }
    });
  }
  catch(err) {
    console.error("Couldn't remove title bar:", err);
  }
}