your popups code seems to have been damaged by something apparently in one of the scripts you import as there was no change to your js file at the time the substitution stopped working compare the edit summary of this revert you did compared to the edit summary of the next one you did cheers