Improved template code for mChat messages
This commit is contained in:
@@ -76,42 +76,6 @@
|
||||
focusFix : <!-- IF MCHAT_ARCHIVE_MODE -->false<!-- ELSE -->true<!-- ENDIF -->,
|
||||
archiveMode : <!-- IF MCHAT_ARCHIVE_MODE -->true<!-- ELSE -->false<!-- ENDIF -->
|
||||
};
|
||||
function insert_quote(user, text) {
|
||||
var quote = decodeURIComponent(text.replace(/\+/g, " "));
|
||||
quote = quote.replace(/</g, "<");
|
||||
quote = quote.replace(/>/g, ">");
|
||||
quote = quote.replace(/:/g, ':');
|
||||
quote = quote.replace(/./g, '.');
|
||||
quote = quote.replace(/&/g, '&');
|
||||
quote = quote.replace(/"/g, '"');
|
||||
var username = decodeURIComponent(user.replace(/\+/g, " "));
|
||||
username = username.replace(/</g, "<");
|
||||
username = username.replace(/>/g, ">");
|
||||
username = username.replace(/:/g, ':');
|
||||
username = username.replace(/./g, '.');
|
||||
username = username.replace(/&/g, '&');
|
||||
username = username.replace(/"/g, '"');
|
||||
document.getElementById('mChatMessage').value += '[quote="' + username + '"]' + quote + '[/quote]';
|
||||
document.getElementById('mChatMessage').focus();
|
||||
}
|
||||
function insert_like(user, text) {
|
||||
var quote = decodeURIComponent(text.replace(/\+/g, " "));
|
||||
quote = quote.replace(/</g, "<");
|
||||
quote = quote.replace(/>/g, ">");
|
||||
quote = quote.replace(/:/g, ':');
|
||||
quote = quote.replace(/./g, '.');
|
||||
quote = quote.replace(/&/g, '&');
|
||||
quote = quote.replace(/"/g, '"');
|
||||
var username = decodeURIComponent(user.replace(/\+/g, " "));
|
||||
username = username.replace(/</g, "<");
|
||||
username = username.replace(/>/g, ">");
|
||||
username = username.replace(/:/g, ':');
|
||||
username = username.replace(/./g, '.');
|
||||
username = username.replace(/&/g, '&');
|
||||
username = username.replace(/"/g, '"');
|
||||
document.getElementById('mChatMessage').value += '' + mChat.likes + '[quote="' + username + '"]' + quote + '[/quote]';
|
||||
document.getElementById('mChatMessage').focus();
|
||||
}
|
||||
// ]]>
|
||||
</script>
|
||||
<!-- IF not MCHAT_ARCHIVE_MODE -->
|
||||
@@ -120,11 +84,7 @@
|
||||
<!-- ENDIF -->
|
||||
<div id="mChatData">
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_MCHAT_AVATARS -->
|
||||
<!-- INCLUDE mchat_avatars.html -->
|
||||
<!-- ELSE -->
|
||||
<!-- INCLUDE mchat_no_avatars.html -->
|
||||
<!-- ENDIF -->
|
||||
<!-- INCLUDE mchat_messages.html -->
|
||||
<!-- IF not MCHAT_READ_MODE -->
|
||||
<!-- IF MCHAT_NOMESSAGE_MODE --><div id="mChatNoMessage">{L_MCHAT_NOMESSAGE}</div><!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user