In what way does it not work?
In this code:
if(myurls.indexOf(window.location) > -1 && upload)
//This is where I need the code to do nothing at all.
Your comment *IS* "nothing at all", so indeed if it reached that point it will do nothing at all.
But you need to be more speciific about what and how it doesn't work.