Add a loading box between web pages

Let’s add a loading box that appears everytime a button with a certain¬†class is clicked and prevent the user to do any operation before it disappears:

css file:

js file:
html file: