Greasy Fork is available in English.

Remove Gradient Dimming in Video Player on Prime Video

Removes the gradient dimming on the top of the video player on Prime Video

  1. // ==UserScript==
  2. // @name Remove Gradient Dimming in Video Player on Prime Video
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.3
  5. // @license GNU GPLv3
  6. // @description Removes the gradient dimming on the top of the video player on Prime Video
  7. // @author Slyceth
  8. // @match *://*.primevideo.com/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. function removeGradient() {
  16. const gradientOverlays = document.querySelectorAll('.atvwebplayersdk-overlays-container > div:first-child, .gradientOverlay');
  17.  
  18. gradientOverlays.forEach(function(overlay) {
  19. overlay.style.background = 'none';
  20. });
  21. }
  22.  
  23. removeGradient();
  24.  
  25. const observer = new MutationObserver(function(mutations) {
  26. mutations.forEach(function(mutation) {
  27. if (mutation.addedNodes.length || mutation.removedNodes.length) {
  28. removeGradient();
  29. }
  30. });
  31. });
  32.  
  33. observer.observe(document.body, {
  34. childList: true,
  35. subtree: true
  36. });
  37. setInterval(removeGradient, 1000);
  38. })();