owo-uncap

Removes the (ad) video overlay on owo.si

  1. // ==UserScript==
  2. // @name owo-uncap
  3. // @description Removes the (ad) video overlay on owo.si
  4. // @match *://owo.si/watch/*
  5. // @namespace kawa.tf
  6. // @version 0.0.2
  7. // @license Artistic-2.0
  8. // ==/UserScript==
  9.  
  10. (function(){
  11.  
  12. let name = "owo-uncap";
  13.  
  14. function log (s) {
  15. console.log(name+ ': ' + s)
  16. }
  17.  
  18. function remove_attempt() {
  19. elts = document.getElementsByClassName('video-player--overlay');
  20. if (elts.length != 1) return false;
  21. elts[0].remove();
  22. return true;
  23. }
  24.  
  25. let max_tries = 10
  26. let tries = 0
  27.  
  28. let iid = setInterval(function() {
  29. if (tries == max_tries) {
  30. log("Max tries reached, aborting");
  31. return null;
  32. }
  33. tries++;
  34.  
  35. let removed = remove_attempt();
  36. if (removed) {
  37. clearInterval(iid);
  38. log("Removed overlay");
  39. }
  40. }, 1000);
  41.  
  42. }())