Sleazy Fork is available in English.

Avgle Helper

Help you watch videos smoothly

  1. // ==UserScript==
  2. // @name Avgle Helper
  3. // @namespace https://avgle.com
  4. // @version 1.6
  5. // @description Help you watch videos smoothly
  6. // @author Neal
  7. // @match https://avgle.com/*
  8. // @match https://blank.org/*
  9. // @grant none
  10. // @noframes
  11. // ==/UserScript==
  12.  
  13. (() => {
  14. 'use strict';
  15.  
  16. function style(css) {
  17. const style = document.createElement('style');
  18.  
  19. style.type = 'text/css';
  20. style.innerHTML = css;
  21.  
  22. return style;
  23. }
  24.  
  25. const href = document.location.href;
  26. const head = document.getElementsByTagName('head')[0];
  27. const body = document.getElementsByTagName('body')[0];
  28.  
  29. if (href.match('https://avgle.com/video/')) {
  30. const embed = head.innerHTML.match('https://avgle.com/embed/[^"]+');
  31. window.location.href = 'https://blank.org/?' + embed;
  32. } else if (href.match('https://blank.org/')) {
  33. const embed = href.match('https://avgle.com/embed/[^"]+');
  34.  
  35. body.style = 'background: black; padding: 0; text-align: center';
  36. body.innerHTML = '<iframe width="1280" height="640" src="' + embed + '" frameborder="0" allowfullscreen></iframe>';
  37. } else {
  38. head.appendChild(style('.top-nav {position: absolute}'));
  39. head.appendChild(style('.navbar-fixed-top {position: absolute}'));
  40. }
  41. })();