emerginginstance

Amazon Anti-Video-Dimmer

Nov 12th, 2021 (edited)
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name         Amazon Anti-Vide-Dimmer
  3. // @namespace    http://tampermonkey.net/
  4. // @include      https://www.amazon.*
  5. // @icon         https://www.google.com/s2/favicons?domain=amazon.com
  6. // @grant        none
  7. // @run-at       document-idle
  8. // ==/UserScript==
  9.  
  10. (function() {
  11.  
  12.     const IF_PROBLEMS = false;
  13.    
  14.     function removeDimming() {
  15.         Array.from(document.querySelectorAll(IF_PROBLEMS ? '.dim-video-player' : 'video')).forEach(video => video.setAttribute("style","opacity: 1 !important;"));
  16.     }
  17.    
  18.     setInterval(removeDimming, 100);
  19.    
  20. })();
Add Comment
Please, Sign In to add comment