mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 04:22:15 +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, $));
|