diff options
author | Freya Murphy <freya@freyacat.org> | 2024-05-20 17:11:38 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-05-20 17:11:38 -0400 |
commit | 708594d32ffe779cf547c816fa7cdd19d095be2e (patch) | |
tree | 30d28553316db02bc027664e17b76d58f2e352ff /src/public/js | |
parent | add en_CAT makefile and use ucfirst/ucwords (diff) | |
download | xssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.tar.gz xssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.tar.bz2 xssbook2-708594d32ffe779cf547c816fa7cdd19d095be2e.zip |
v2 done
Diffstat (limited to 'src/public/js')
-rw-r--r-- | src/public/js/lib.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/public/js/lib.js b/src/public/js/lib.js index 95f83b7..4d08bab 100644 --- a/src/public/js/lib.js +++ b/src/public/js/lib.js @@ -94,6 +94,13 @@ var errorToast = (msg) => { }) } +var successToast = (msg) => { + let url = '/template/toast?type=success&msg=' + msg; + $.get(url, function (data) { + $('#toast-container').prepend(data); + }) +} + $$('.action-close-toast').on('click', function() { $(this).parent().remove(); }); |