How to rename button labels on Confirm box or Alert

In our project, the requirement is to show custom labels for the buttons on Confirm box or Alert. There is no OOB way to do this, but we can do this by using one third party java script library Alert.js.