mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
21 lines
572 B
JavaScript
21 lines
572 B
JavaScript
(function(window, $) {
|
|
$(function() {
|
|
$(window.document).on('paste', '.RL-PopupsContacts .contactValueInput', function() {
|
|
// trigger the process on click and paste
|
|
var $this = $(this);
|
|
|
|
setTimeout(function () {
|
|
$this.trigger('keyup');
|
|
});
|
|
}).on('keyup', '.RL-PopupsContacts .contactValueInput', function() {
|
|
var $this = $(this),
|
|
value = $this.val(),
|
|
match = value && value.match(/@/ig);
|
|
|
|
if (match && match.length > 1) {
|
|
$this.val($this.val().replace(/\n| /ig, ','));
|
|
}
|
|
});
|
|
});
|
|
}(window, $));
|