I know there are many good plugins for pretty alert boxes, but I have already made so many alerts, so I wanted to ask if it's possible to make those alerts prettier without rewriting all alert
function calls in the code and replacing this function with other?
A quick fix is to go to Prettier Extension Settings (ctrl + shift + X) and in Prettier Extension Settings search for "Print Width" set it to 250 or anything that works for you. 2: Change the value of Print Width to your liking. To disable format code on save.
You can hijack the default window.alert
function:
window.__oldAlert__ = window.alert;
window.alert = function () {
// your custom alert code here
};
Demo: http://jsfiddle.net/mattball/jMEha/
what do I need to write to change it to this plugin? http://thrivingkings.com/apprise
Your page will need jQuery, and the Apprise JS and CSS files.
window.__oldAlert__ = window.alert;
window.alert = function () {
apprise.apply(this, arguments);
};
Demo: http://jsfiddle.net/mattball/exgBs/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With