if you look at the second line, you see that the entirety of the code is applied to ‘.submit’ - i.e. elements with the class “submit”. If you want all input elements of type submit to have this applied to them, just replace the .submit with input[type=submit].
That was my first thought. However, all of the buttons on the site don’t have the .submit class applied to them, they have a .button class. Yet, when this script is in a global .js file, none of the buttons on the site work.