Tinychat YouTube Playback Script

Opens a separate window for YouTube video playback on Tinychat.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
meth0dz
Installazioni giornaliere
0
Installazioni totali
21
Valutazione
0 0 0
Versione
2.0
Creato il
07/05/2023
Aggiornato il
07/05/2023
Dimensione
5,15 KB
Licenza
CC0-1.0
Applica a

This userscript enables users to play YouTube videos in a separate window while on Tinychat. The code does the following:

1. Defines a YouTube URL pattern and fetches the YouTube API key.
2. Stores the API key.
3. Creates a function to open a video playback window.
4. Adds CSS styles for a video button.
5. Sets up a menu command to clear the stored video URL.
6. Displays a video button if a stored video URL is found.
7. Defines a function for a YouTube search bar, which includes:
   • A search input field and a datalist for search suggestions.
   • An event listener that fetches search results using the YouTube API upon input updates.
   • A search button to play the chosen video and save its URL.
8. Calls the function to create the search bar.

    **HOW-TO INSTALL INSTRUCTIONS**

Edit the 'ADD_YOUR_API_KEY' with your own key on line 26

Get your API Key by following the steps below:

  Step 1. Visit https://console.cloud.google.com and select "Create New Project"
  Step 2. Go To Credentials Screen
  Step 3. Click Create Credentials
  Step 4. Click Enabled APIs
  Step 5. Search & Choose YouTube V3 API
  Step 6. Go to Credentials, Edit API Key, API Restrictions, Choose YouTube V3 API

NOTE: You may have to repeat these steps if the script stops working (limited API requests per day)