diff --git a/styles/prosilver/template/mchat.js b/styles/prosilver/template/mchat.js index 5beda7d..c62f20a 100644 --- a/styles/prosilver/template/mchat.js +++ b/styles/prosilver/template/mchat.js @@ -74,9 +74,11 @@ jQuery(function($) { sound: function(file) { if (!mChat.pageIsUnloading && !Cookies.get('mchat_no_sound')) { var audio = mChat.$$('sound-' + file).get(0); - audio.pause(); - audio.currentTime = 0; - audio.play(); + if (audio.duration) { + audio.pause(); + audio.currentTime = 0; + audio.play(); + } } }, notice: function() { @@ -259,19 +261,6 @@ jQuery(function($) { } }); }, - clean: function() { - mChat.$$('confirm').find('textarea').hide(); - mChat.$$('confirm').find('p').text(mChat.cleanConfirm); - phpbb.confirm(mChat.$$('confirm'), function() { - mChat.pauseSession(); - ajaxRequest('clean', true, {}).done(function() { - phpbb.alert('mChat', mChat.cleanDone); - setTimeout(function() { - location.reload(); - }, 2000); - }); - }); - }, timeLeft: function(sessionTime) { return (new Date(sessionTime * 1000)).toUTCString().match(/(\d\d:\d\d:\d\d)/)[0]; }, @@ -457,12 +446,14 @@ jQuery(function($) { } }); - $('#mchat-form').on('keypress', function(e) { - if (e.which == 13) { - mChat.add(); - e.preventDefault(); - } - }); + if (mChat.$$('input').is('input')) { + $('#mchat-form').on('keypress', function(e) { + if (e.which == 13) { + mChat.add(); + e.preventDefault(); + } + }); + } mChat.$$('input').autoGrowInput(); } diff --git a/styles/prosilver/template/mchat_body.html b/styles/prosilver/template/mchat_body.html index c53c5d0..0a38e46 100644 --- a/styles/prosilver/template/mchat_body.html +++ b/styles/prosilver/template/mchat_body.html @@ -20,12 +20,14 @@ +
+
-
+
{MCHAT_REFRESH_YES}
• {L_MCHAT_SESSION_ENDS} {MCHAT_USER_TIMEOUT_TIME} •
{L_MCHAT_COPYRIGHT}
diff --git a/styles/prosilver/template/mchat_messages.html b/styles/prosilver/template/mchat_messages.html
index ab510cb..b8dcf62 100644
--- a/styles/prosilver/template/mchat_messages.html
+++ b/styles/prosilver/template/mchat_messages.html
@@ -3,7 +3,7 @@
@@ -13,12 +13,12 @@
+
-
+
{MCHAT_REFRESH_YES}
• {L_MCHAT_SESSION_ENDS} {MCHAT_USER_TIMEOUT_TIME} •
{L_MCHAT_COPYRIGHT}
@@ -139,31 +129,4 @@