Youtube Embed Whatever Wherever

Forces Youtube embeds to play anywhere, even if UMG/SMG disagrees.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        Youtube Embed Whatever Wherever
// @namespace   https://greasyfork.org/en/users/945115-unmatchedbracket
// @match       *://www.youtube.com/embed/*
// @match       *://www.youtube-nocookie.com/embed/*
// @grant       none
// @run-at      document-body
// @version     1.0.3
// @author      Unmatched Bracket
// @license     The Unlicense
// @description Forces Youtube embeds to play anywhere, even if UMG/SMG disagrees.
// ==/UserScript==
 
function modulate () {
  let player_response = JSON.parse(ytcfg.data_.PLAYER_VARS.embedded_player_response)
 
  if (player_response.previewPlayabilityStatus.status == "OK") return
  player_response.previewPlayabilityStatus.status = "OK"
  player_response.previewPlayabilityStatus.playableInEmbed = true
  delete player_response.previewPlayabilityStatus.reason
  delete player_response.previewPlayabilityStatus.errorScreen
 
  ytcfg.data_.PLAYER_VARS.embedded_player_response = JSON.stringify(player_response)
 
  ytcfg.data_.WEB_PLAYER_CONTEXT_CONFIGS.WEB_PLAYER_CONTEXT_CONFIG_ID_EMBEDDED_PLAYER.isEmbed = false
  ytcfg.data_.INNERTUBE_CONTEXT.client.originalUrl = `https://www.youtube.com/watch?v\u003d${ytcfg.data_.VIDEO_ID}`
}
 
function tick () {
  if (window.ytcfg) modulate()
  else requestAnimationFrame(tick)
}
 
if (window.ytcfg) modulate()
else tick()