Voe video redirector

Redirect to link for Voe.sx videos

  1. // ==UserScript==
  2. // @name Voe video redirector
  3. // @namespace https://tribbe.de
  4. // @version 1.2.0
  5. // @description Redirect to link for Voe.sx videos
  6. // @author Tribbe
  7. // @include *://*voe*
  8. // @require https://greasyfork.org/scripts/6250-waitforkeyelements/code/waitForKeyElements.js?version=23756
  9. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js
  10. // ==/UserScript==
  11.  
  12. function decrypt(p01){ p01 = p01.join(''); p01 = p01.split('').reverse().join(''); return atob(p01); }
  13.  
  14. window.addEventListener("load", function() {
  15. var mp4finder = null;
  16. var video = null;
  17.  
  18. var content = document.body.textContent;
  19.  
  20. mp4finder = content.match(/(https?.*?\.mp4)/);
  21. if (mp4finder != null) video = mp4finder[0];
  22.  
  23. if(video == null) {
  24. mp4finder = content.match(/sources\[\"mp4\"\] = .*?\(\[(.*?)]\);/);
  25. if (mp4finder != null && mp4finder.length == 2) {
  26. var mp4array = mp4finder[1].replaceAll("'", "").split(",");
  27. video = decrypt(mp4array);
  28. }
  29. }
  30.  
  31. if(video != null) window.location.href = video;
  32. });
  33.  
  34.  
  35. // Stop Autoplay
  36. waitForKeyElements ("video[name*='media']", function(jNode) { jNode[0].autoplay = false; });