Unmute RedGifs

Unmute content from redgifs.com

  1. // ==UserScript==
  2. // @name Unmute RedGifs
  3. // @author VoltronicAcid
  4. // @namespace https://greasyfork.org/en/users/839394-voltronicacid
  5. // @description Unmute content from redgifs.com
  6. // @version 1.0.0
  7. // @license MIT
  8. // @run-at document-idle
  9. // @match https://www.redgifs.com/ifr/*
  10. // @match https://www.redgifs.com/watch/*
  11. // ==/UserScript==
  12.  
  13. (() => {
  14. const unMuteGifs = localStorage.getItem('user_sound') === 'unmuted'
  15. const intrvlId = setInterval(() => {
  16. const buttonsContainer = document.querySelector('div.options-buttons')
  17.  
  18. if (buttonsContainer) {
  19. if (unMuteGifs) {
  20. const unmuteBttn = buttonsContainer.querySelector('span.icon.icon-mute')
  21. unmuteBttn && unmuteBttn.click()
  22. }
  23.  
  24. clearInterval(intrvlId)
  25. }
  26. }, 100)
  27. })();