Delay removal Moonwalk

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

As of 2016-04-17. See the latest version.

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

(function () {
    var w = unsafeWindow || window;
    //if (w.self === w.top)
    //    return;

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

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