@KendallFrey - 2 things. 1) You have to convert the link to use it as an actual variable, because SO outputs it with `...`. 2) If you really wanted to execute it, wrap it in quotes like this:
var NYEHat = (function(){ location = "http://chat.stackexchange.com/rooms/6904/stackoverflow-new-years-eve-hat"; })();