-
Notifications
You must be signed in to change notification settings - Fork 3
/
new.js
42 lines (40 loc) · 1.64 KB
/
new.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// var tag = document.createElement('script');
// tag.src = 'https://www.youtube.com/iframe_api';
// var firstTag = document.getElementsByTagName('script')[0];
// firstTag.parentNode.insertBefore(tag, firstTag);
// var video;
// function onYouTubeIframeAPIReady() {
// video = new YT.Player('video', {
// height: 360,
// width: 640,
// videoId: '7TXKBlBBbIA',
// host: 'https://www.youtube-nocookie.com',
// playerVars: {
// 'fs': 0,
// 'modestbranding': 1,
// 'playsinline': 1,
// 'rel': 0
// }
// });
// }
var scriptUrl = 'https:\/\/www.youtube.com\/s\/player\/9e328581\/www-widgetapi.vflset\/www-widgetapi.js';
try{var ttPolicy=window.trustedTypes.createPolicy("youtube-widget-api",{createScriptURL:function(x){return x}});
scriptUrl=ttPolicy.createScriptURL(scriptUrl)}catch(e){}var YT;
if(!window["YT"])YT={loading:0,loaded:0};
var YTConfig;if(!window["YTConfig"])YTConfig={"host":"https://www.youtube.com"};
if(!YT.loading){YT.loading=1;(function(){var l=[];YT.ready=function(f){if(YT.loaded)f();else l.push(f)};
window.onYTReady=function(){YT.loaded=1;
var i=0;
for(;i<l.length;i++)try{l[i]()}catch(e){}};
YT.setConfig=function(c){var k;for(k in c)if(c.hasOwnProperty(k))YTConfig[k]=c[k]};
var a=document.createElement("script");
a.type="text/javascript";
a.id="www-widgetapi-script";
a.src=scriptUrl;
a.async=true;
var c=document.currentScript;
if(c){var n=c.nonce||c.getAttribute("nonce");
if(n)a.setAttribute("nonce",n)}
var b=document.getElementsByTagName("script")[0];
b.parentNode.insertBefore(a,b)})
()};