aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 bb3ddc5de..32427e1ef 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;
}