X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Fautocomplete.js;h=8020478722413cf47937e6f88d6268cccabb62b3;hb=de431e185e81cf7fe3f73b2977f777c040964479;hp=322cc3df5419bc3a3b633eb3e4e9b0a435f62c46;hpb=47e395be88c043c4b42dff1dd7fde07b4ca9944d;p=friendica.git diff --git a/js/autocomplete.js b/js/autocomplete.js index 322cc3df54..8020478722 100644 --- a/js/autocomplete.js +++ b/js/autocomplete.js @@ -104,6 +104,13 @@ function basic_replace(item) { return '$1'+item.name+' '; } +function webbie_replace(item) { + if(typeof item.replace !== 'undefined') + return '$1'+item.replace; + + return '$1'+item.nick+' '; +} + function trim_replace(item) { if(typeof item.replace !== 'undefined') return '$1'+item.replace; @@ -216,7 +223,7 @@ function string2bb(element) { match: /(^@)([^\n]{2,})$/, index: 2, search: function(term, callback) { contact_search(term, callback, backend_url, 'x', 'contact'); }, - replace: basic_replace, + replace: webbie_replace, template: contact_format, }; @@ -225,7 +232,7 @@ function string2bb(element) { match: /(^!)([^\n]{2,})$/, index: 2, search: function(term, callback) { contact_search(term, callback, backend_url, 'x', 'community'); }, - replace: basic_replace, + replace: webbie_replace, template: contact_format, }; this.attr('autocomplete', 'off');