Delay removal Moonwalk

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

当前为 2016-04-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Delay removal Moonwalk
  3. // @namespace play once
  4. // @description отключение задержки перед воспроизведением
  5. // @match *://*/*
  6. // @version 1.2
  7. // @run-at document-start
  8. // @grant unsafeWindow
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. var w = unsafeWindow || window,
  13. inIFrame = function() {
  14. try {
  15. return w.self !== w.top;
  16. } catch (e) {
  17. return true;
  18. }
  19. };
  20.  
  21. if (!inIFrame())
  22. return;
  23.  
  24. window.addEventListener('load',function() {
  25. if (w.condition_detected !== undefined) {
  26. w.request_host_id = "19804";
  27. var player = document.getElementById('player');
  28. if (player) player.onclick = function(){
  29. w.showVideo();
  30. };
  31. }
  32. },false);
  33. })();