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와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 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()