Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
ifrapi+
Browse files Browse the repository at this point in the history
  • Loading branch information
Miala-python authored Dec 21, 2023
1 parent 0028b2d commit 1eef19c
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions iframe_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,44 @@ var scriptUrl = 'https:\/\/www.youtube.com\/s\/player\/d23221b6\/www-widgetapi.v
try {
var ttPolicy = window.trustedTypes.createPolicy("youtube-widget-api", { createScriptURL: function (x) { return x } });
scriptUrl = ttPolicy.createScriptURL(scriptUrl)
} catch (e) {
console.log('¤C1');
}
} 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) {
console.log('¤C2');
// console.log('¤C2');
YT.loading = 1;
(
function () {
var l = [];
YT.ready = function (f) {
if (YT.loaded) f();
else l.push(f)
console.log('¤C3');
};
window.onYTReady = function () {
YT.loaded = 1;
var i = 0;
for (; i < l.length; i++)try { l[i]() } catch (e) { console.log('¤C4') };
for (; i < l.length; i++)try { l[i]() } catch (e) { };

console.log('¤C5');
// console.log('¤C5');
};
YT.setConfig = function (c) {
var k;
for (k in c) if (c.hasOwnProperty(k)) YTConfig[k] = c[k]
};
console.log('¤C6');
// console.log('¤C6');
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);

console.log('¤C7');
// console.log('¤C7');
}
var b = document.getElementsByTagName("script")[0]; b.parentNode.insertBefore(a, b)
}
)()
console.log('¤C8');
// console.log('¤C8');
};
console.log('¤C9');
// console.log('¤C9');

0 comments on commit 1eef19c

Please sign in to comment.