'FAILED' error when trying to un-star the 'Bug Reporter' badge

I just encountered this error, but copying and pasting the code into the console returns a syntax error of:

SyntaxError: Unexpected identifier ‘require’. Expected ‘;’ after variable declaration.
SyntaxError: Unexpected identifier ‘identifier’

Perhaps this is a bit outdated? Anyone have an updated version?