Speed up video

Speed up video youtube, facebook

  1. // ==UserScript==
  2. // @name Speed up video
  3. // @namespace Phạm Doãn Hiếu ||| FB: https://www.facebook.com/100010921898385 || neucodethi@gmail.com
  4. // @author DHieu
  5. // @copyright DHieu
  6. // @homepage https://htstar.online
  7. // @supportURL
  8. // @icon https://i.imgur.com/6SaS8VR.png
  9. // @description Speed up video youtube, facebook
  10. // @contributionURL
  11. // @grant GM_getValue
  12. // @grant GM_setValue
  13. // @grant GM_openInTab
  14. // @grant GM_registerMenuCommand
  15. // @include http://*
  16. // @include https://*
  17. // @version     1.0.1
  18. // @change-log Update fb single video
  19. // @run-at document-end
  20. // ==/UserScript==
  21.  
  22. function speed_up(){
  23. let videoArr = document.querySelectorAll('video');
  24. for(let i=0; i<videoArr.length; i++)
  25. {
  26. videoArr[i].playbackRate=3;
  27. }
  28.  
  29. }
  30.  
  31. var i = 1;
  32. run();
  33. function run () {
  34. speed_up();
  35. setTimeout(function () {
  36. speed_up();
  37. console.log("chay speed up lan" +i)
  38. i++;
  39. if (i <2) {
  40. run();
  41. }
  42. }, 5000)
  43. }