A super practical example that may be of use to everyone here... When the PS5 was first released (this may even be relevant today because they're still like gold dust, right?) I wrote a script for a few different websites that refreshed the page every couple of seconds, checked if it was available to buy / in stock, and if it was, I added it to the basket and and alerted myself with a browser alert and changing the colour of the screen to bright green so it caught my eye, meaning I could check out immediately! Not only did I get myself a PS5 day 1, but I was also able to purchase 2 more from other retailers for my friends who were struggling!
thank you for sharing your knowledge. quick questions: at 4.42 how can you pass 'interval' to the 'clearInterval' function if 'interval' variable is not even defined at that point and shouldn't be accessible?
I have a few scripts that I use, but I save them as bookmarks and access them with a search shortcut. For example, if I type "pip", the current playing video will pop as "Picture in Picture" or back to its place, even when there's no way to access the video directly with the context menu. 🤓
Just a shame the extensions have been so gimped with the lack of filesystem support, and the majority of sites use some kind of hydration that breaks any changes and listeners
Sorry to burst your bubble, but you don't have to jump through the "let scott in" hoop! I use Riverside for my podcast too and we don't have this problem. Click the gear/cog icon in the top right of the "recording overview" pod, go to the "general" tab (left side), and then turn off "Require guests to wait in lobby". You're welcome. ;)
Hey, in general, no, since you're NOT changing the website, you're changing how it runs on your local machine. Maybe there's some special case where it'd be a problem, especially if your code has bad bot behavior, but if the website doesn't want anyone to do this, they should have some kind of encryption or privacy setting to prevent it.
I started to do something like this recently with some websites for the same reason. Only, I'm using ViolentMonkey for this (open source alternative for loading user scripts). By the way, what's the advantage of *.filter(...).at(0)* over *.find(...)* ?
A super practical example that may be of use to everyone here...
When the PS5 was first released (this may even be relevant today because they're still like gold dust, right?) I wrote a script for a few different websites that refreshed the page every couple of seconds, checked if it was available to buy / in stock, and if it was, I added it to the basket and and alerted myself with a browser alert and changing the colour of the screen to bright green so it caught my eye, meaning I could check out immediately! Not only did I get myself a PS5 day 1, but I was also able to purchase 2 more from other retailers for my friends who were struggling!
The real mvp
Why the hell didn't I think of this simple but useful use-case?!
Little tip from my side
At 2:33 instead of selecting all instances of the function to rename, you can select one, press F2, and just change the name 🙂
Hah I use that a lot but not sure why I didn’t do it here
thank you for sharing your knowledge. quick questions: at 4.42 how can you pass 'interval' to the 'clearInterval' function if 'interval' variable is not even defined at that point and shouldn't be accessible?
I have a few scripts that I use, but I save them as bookmarks and access them with a search shortcut.
For example, if I type "pip", the current playing video will pop as "Picture in Picture" or back to its place, even when there's no way to access the video directly with the context menu. 🤓
yeah but who has the time to type pip 8 times 🤣
won't trolls with usernames that include Scott Tolinski be able to get in?
Yes - I’ll deal with that if and when 😆
Great video, I might have to make a script to automatically like the video if the channel is Wes Bos
In this context is there any benefit/negative to using a spread instead of Array.from for turning the button nodelist into an array?
The only difference is that the spread looks cooler
How to become a Syntax guest. Step 1: Name yourself Scott Tolinski 2.
2. Profit????
OMG! Now I can effortlessly redirect from that awful desktop wikipedia to the beautiful mobile wikipedia. Thanks a lot!
Just a shame the extensions have been so gimped with the lack of filesystem support, and the majority of sites use some kind of hydration that breaks any changes and listeners
Yeah you really need to just run intervals because everything is SPA.
Awesome just built my first script because of this video! Thank you!
Nice work! What does it do?
Sorry to burst your bubble, but you don't have to jump through the "let scott in" hoop! I use Riverside for my podcast too and we don't have this problem. Click the gear/cog icon in the top right of the "recording overview" pod, go to the "general" tab (left side), and then turn off "Require guests to wait in lobby". You're welcome. ;)
I know about this, but I want guests to wait in the lobby. I don’t want Scott - my co-host - to wait in the lobby
Sorry to burst your bubble bursting, but... : )
For some reason, Greasemonkey does not work for me of Firefox 126.0.1 of Windows 11 but Tampermonkey does
you didn't define interval, mine says define interval
Is this something along the lines of tampermonkey?
Yep! I’m using that in the video 😃
@@WesBos oh shit sorry, I saw greasemonkey and went to the comments instantly 😅
beautiful
Can you get banned if you use this?
Hey, in general, no, since you're NOT changing the website, you're changing how it runs on your local machine. Maybe there's some special case where it'd be a problem, especially if your code has bad bot behavior, but if the website doesn't want anyone to do this, they should have some kind of encryption or privacy setting to prevent it.
I started to do something like this recently with some websites for the same reason. Only, I'm using ViolentMonkey for this (open source alternative for loading user scripts).
By the way, what's the advantage of *.filter(...).at(0)* over *.find(...)* ?
No advantage - I probably should have used find here!