aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/webapp/scripts.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/webapp/scripts.js b/src/main/webapp/scripts.js
index bb3ddc5d..32427e1e 100644
--- a/src/main/webapp/scripts.js
+++ b/src/main/webapp/scripts.js
@@ -323,14 +323,16 @@ function openDialogLogin() {
/******************************************************************************/
function likeMessage(e,mid) {
- $.ajax({
- url: '//juick.com/like?mid='+mid,
- type: 'POST'
- }).done(function() {
- $(e).closest("article").append("<p>OK!</p>");
- }).fail(function() {
- $(e).closest("article").append("<p>Ошибка</p>");
- });
+ if (confirm("Are you sure?")) {
+ $.ajax({
+ url: '//juick.com/like?mid='+mid,
+ type: 'POST'
+ }).done(function() {
+ $(e).closest("article").append("<p>OK!</p>");
+ }).fail(function() {
+ $(e).closest("article").append("<p>Ошибка</p>");
+ });
+ }
return false;
}