Delay removal Moonwalk

отключение задержки перед воспроизведением

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(У мене вже є менеджер скриптів, дайте мені встановити його!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name Delay removal Moonwalk
// @namespace play once
// @description отключение задержки перед воспроизведением
// @match *://*/*
// @version 1.3
// @run-at document-start
// @grant unsafeWindow
// ==/UserScript==

(function () {
    var w = unsafeWindow || window,
        inIFrame = function() {
            try {
                return w.self !== w.top;
            } catch (e) {
                return true;
            }
        };

    if (!inIFrame)
        return;

    function playonce() {
        if (typeof delay !== undefined)
            delay=0;
    }

    window.addEventListener('load',function() {
        if (w.condition_detected !== undefined) {
            w.request_host_id = "19804";
            var player = document.getElementById('player');
            if (player) player.onclick = function(){
                w.showVideo();
            };
        }
    },false);
})();