Skip to content

Instantly share code, notes, and snippets.

View yuranikolaev's full-sized avatar

Yura yuranikolaev

View GitHub Profile
<div overflow id="disqus_thread"></div>
<script>
window.addEventListener('message', receiveMessage, false);
function receiveMessage(event)
{
if (event.data) {
var msg;
try {
msg = JSON.parse(event.data);
} catch (err) {
@yuranikolaev
yuranikolaev / mpytjsapi.js
Last active July 6, 2021 12:04
MagnificPopup + YouTube JavaScript API - Quality settings (setPlaybackQuality)
$(document).ready(function() {
// This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);