Twitching Lurkist

Automatically lurk on Twitch channels you follow

< Feedback on Twitching Lurkist

Soru/yorum

§
Gönderildi: 07.06.2024

Hope this helps - script wasn't running on my machine before these changes (source editor was showing eslint errors) - script ran after changes YMMV

Code block below (with line numbers)

//Running Tampermonkey version 5.1.1
//on Chromium Version 125.0.6422.113 (Official Build) (64-bit)

//corrected eslint no multispaces eroor - deleted space closest to btn.innertext

//original
265  btn.innerText  = 'X';

//new
265  btn.innerText = 'X';

//corrected eslint no-return-assign errors - enclosed return assignments in parens

//original
381   const autoTgl = createToggle('autoClose', 'Auto-close raids and hosts', prefs.autoClose, x => prefs.autoClose = x);
382   const cinemaTgl = createToggle('autoCinema', 'Auto enable theatre mode', prefs.autoCinema, x => prefs.autoCinema = x);

//new
381   const autoTgl = createToggle('autoClose', 'Auto-close raids and hosts', prefs.autoClose, x => (prefs.autoClose = x));
382   const cinemaTgl = createToggle('autoCinema', 'Auto enable theatre mode', prefs.autoCinema, x => prefs.autoCinema = x);

//original
384   const bufferTgl = createToggle('lowLatDisable', 'Disable low latency mode', prefs.lowLatDisable, x => prefs.lowLatDisable = x);
385   const pauseTgl = createToggle('detectPause', 'Pause streams detection', prefs.detectPause, x => prefs.detectPause = x);

//new
384   const bufferTgl = createToggle('lowLatDisable', 'Disable low latency mode', prefs.lowLatDisable, x => (prefs.lowLatDisable = x));
385   const pauseTgl = createToggle('detectPause', 'Pause streams detection', prefs.detectPause, x => (prefs.detectPause = x));
XspeedSahip
§
Gönderildi: 09.06.2024
//new
381   const autoTgl = createToggle('autoClose', 'Auto-close raids and hosts', prefs.autoClose, x => (prefs.autoClose = x));
382   const cinemaTgl = createToggle('autoCinema', 'Auto enable theatre mode', prefs.autoCinema, x => prefs.autoCinema = x);

What about this line 382 then? Doesn't look changed

§
Gönderildi: 09.06.2024

my bad, forgot to do the parens thing on line 382

382 const cinemaTgl = createToggle('autoCinema', 'Auto enable theatre mode', prefs.autoCinema, x => (prefs.autoCinema = x));

XspeedSahip
§
Gönderildi: 09.06.2024

Yeah, but this tells me that was not the reason the script was not working for you.

Parentheses are not required as per newer ES202X standards. Even more so with extraneous whitespace, some people use that to make multiple lines of assignments more readable.

§
Gönderildi: 09.06.2024

Thanks for the feedback, it helped a lot.
Have a good weekend!

Cevap paylaş

Yanıt göndermek için oturum açın.