Mute Default SFX in 1v1 Replays

mutes of your opponent if they have bad taste

当前为 2019-11-01 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Mute Default SFX in 1v1 Replays
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description mutes of your opponent if they have bad taste
  6. // @author Oki
  7. // @match https://*.jstris.jezevec10.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. /************************************
  12. Mute Default SFX in 1v1 Replays
  13. ************************************/
  14. (function() {
  15. window.addEventListener('load', function(){
  16.  
  17.  
  18. if(typeof trim != "function"){var trim=a=>{a=a.slice(0,-1);a=a.substr(a.indexOf("{")+1);return a}}
  19. redrawFunc = Replayer['prototype']['redraw'].toString()
  20.  
  21. function inject() {
  22. side = this.v.kppElement.id[3];
  23. if(side==2 && !this.v.SFXset.lock.set){
  24. this.v.SEenabled = false
  25. };
  26. }
  27.  
  28. Replayer['prototype']['redraw'] = new Function(trim(inject.toString()) + trim(redrawFunc))
  29.  
  30.  
  31. });
  32. })();