Reboot Tube But Nice

7/21/2022, 7:35:45 AM

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Reboot Tube But Nice
// @namespace   Violentmonkey Scripts
// @match       https://reboot.tube/x/*
// @grant       none
// @version     1.1
// @license     GPLv3
// @author      Gum Coblin
// @description 7/21/2022, 7:35:45 AM
// ==/UserScript==
// Player Size
document.getElementById("videowrap").style.width = "85%"

// Chat visibility
document.getElementById("chatwrap").style.display = "none"

// Empty footer visibilty
document.getElementById("footer").style.display = "none"

// Padding on the left of the player to center it
document.getElementById("videowrap").style.paddingLeft = "15%"

// Set control width to 100% so the rightmost controls are on the right of the screen
document.getElementById("rightcontrols").style.width = "100%" 

var currentURL = ""
setTimeout(CreateLink, 5000)


function CreateLink(){
  // Create a variable containing the link to the currently playing video
  currentURL = document.getElementById("ytapiplayer_html5_api").src
  console.log(currentURL)
  
  // Create a link to the URL from above
  const myLink = document.createElement("a");
  myLink.href = currentURL
  myLink.style.color = "white"
  myLink.innerHTML = currentURL
  document.getElementById("mainpage").appendChild(myLink)
}