EVula

u/EVula


r/learnjavascript•

I'm working on an internal website at work that has dynamically-generated links to various audits (using PHP on the backend to automatically create links to today's and yesterday's reports), and now I'm adding a feature to allow user-selected dates.

I've got the code written out to update both the on-screen display and the actual HTML link itself as the user changes the dates (three drop-down menus, for year/month/day), but I'd *really* like to have the start-date selections simultaneously change the end-date selections, but not the reverse, to make it easier for people to only select a single day if they need to (or if they need to look at a smaller range, this will at least get them in

24

r/GreaseMonkey•

At work, we’ve got an internal website that has a bunch of scannable QR codes. Pretty simple: search for what you want, click the link, and a pop-up appears with the code so you can scan your monitor.

However, for whatever reason they didn’t bother to bind the “close window” link to hitting the Escape key. There’s a zero-percent chance of me getting the change made, so I figured a user script would be my best bet, but I don’t have a particularly good grasp of JavaScript (but I do have a background with HTML and CSS).

The link I need to trigger has a unique class, so it shouldn’t be difficult to isolate. After some searching, I found code for listening for an Escape key activation, but am

13