JanisPlayer

Video Skip

Jul 14th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Video Skip
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       janisplayer
  7. // @match        *://*.youtube.com/*
  8. // @grant        none
  9. // ==/UserScript==
  10.  
  11. /*(function() {
  12.      //pausecomp(100);
  13.     var els = document.getElementsByTagName("*");
  14.     for(var i = 0, l = els.length; i < l; i++) {
  15.     var el = els[i];
  16.     el.innerHTML = el.innerHTML.replace("0&controls=0&", '0&controls=1&'); // https://www.youtube.com/embed/FhYQU5eWdCo?enablejsapi=1&autoplay=1&disablekb=1&modestbranding=0&rel=0&controls=0&origin=https://watch.getalx.com&playsinline=1
  17.     }
  18. })();
  19. */
  20.  
  21. /*
  22. function main() {
  23.     var videoElement = document.getElementsByTagName("video")[0];
  24.    //videoElement.playbackRate = 18;
  25.  
  26.     if (videoElement.played = true) {
  27.    }
  28.  
  29.    if (videoElement.duration = !null) {
  30.  
  31.    }
  32.      videoElement.currentTime = videoElement.duration;
  33.  
  34.    alert(videoElement.duration);
  35.    //videoElement.ended
  36. }
  37.  
  38. function wait(ms){
  39.    var start = new Date().getTime();
  40.    var end = start;
  41.    while(end < start + ms) {
  42.      end = new Date().getTime();
  43.   }
  44. }
  45. main();
  46. */
  47.  
  48. (function() {
  49.    var videoElement = document.getElementsByTagName("video")[0];
  50.    videoElement.currentTime = 100000;
  51. })();
  52.  
  53.  
  54.  //Infos zu den Funktionen von videoElement https://developer.mozilla.org/de/docs/Web/API/HTMLMediaElement
Add Comment
Please, Sign In to add comment