-
-
Save trojkat/1c0f84dc7df8cc038e15f9bb7fb829f3 to your computer and use it in GitHub Desktop.
Invidious YT iframe workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Invidious YT iframe | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-10-02 | |
// @description Temporary workaround | |
// @author You | |
// @match https://your-invidious-instance.com/watch* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let VideoID = document.querySelector('#contents .h-box ul li a').getAttribute('href').replace('/watch?v=', ''); | |
let box = document.querySelector('#contents .h-box'); | |
box.innerHTML = '<iframe width="100%" height="800" src="https://www.youtube.com/embed/' + VideoID + '" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>'; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment