Tinychat YouTube Playback Script

Opens a separate window for YouTube video playback on Tinychat.

Stan na 07-05-2023. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Autor
meth0dz
Oceny
0 0 0
Wersja
1.2
Utworzono
07-05-2023
Zaktualizowano
07-05-2023
Rozmiar
4,71 KB
Licencja
CC0-1.0
Dotyczy

This script allows users to play YouTube videos in a separate window while using Tinychat. Here's a simpler description of the code:

1. It defines a pattern for YouTube URLs and a function to get the YouTube API key.
2. The API key is fetched and stored.
3. A function to open a separate window for video playback is defined.
4. CSS styles are added for a video button.
5. A menu command is created to clear the stored video URL.
6. The script checks for a stored video URL and displays a video button if found.
7. A function is defined to create a YouTube search bar, which includes:
     • A search input field and a datalist element for search suggestions.
     • An event listener to get search results using the YouTube API when the input is updated.
     • A search button to play the selected video and store its URL.
8. The search bar is created by calling the function.

    **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