What is the best practice? Change the code or extend it?
Best Regards and Thanks
Can you elaborate on what you are trying to accomplish with these changes? It's difficult to make any suggestions when we don't know what you are trying to do. Additionally, you could look at the related subjects on the right side as there are numerous JS change discussions.