When the first condition is true, the code inside executes perfectly. Otherwise, nothing is getting run. Note that the same thing happens if I use an "else" instead of the second "if". Note too, if the first condition is true, then "got past" gets displayed, but if it's false, then even that line doesn't get executed.
Which indicates that you get an error, for example something is undefined. Use the console to verify what happens.
Right, I got that there was an error, but I'm literally running the code above. Besides the conditions and the "alert" calls, I'm actually doing nothing (everything else is commented out), and the behavior is the same. When the condition is met, everything runs, else nothing is run. So my question is more: is there any reason why that first condition being false should mean that the rest of the code doesn't run?
Here, for reference, I am running this *exact* code (this is the entire script):
I have never worked with GM before, so I don't know if it shows up in the console log. But even if not, just do what I did: Take your little code snippet and put it in a service like jsfiddle or writecodeonline.com.
I'd just assume that there's gonna be some sort of logging even with GM, though.