From 46fa26502b285213f3438abb1e3bd1482eb55bf5 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 9 Mar 2024 20:53:18 +0000 Subject: more work on emojis --- view/js/autocomplete.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'view/js') diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 8edd8dafa..7d6ddb1c4 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -45,7 +45,7 @@ function contact_format(item) { } function smiley_format(item) { - return ""; + return ""; } function bbco_format(item) { @@ -193,8 +193,8 @@ function string2bb(element) { match: /(^|\s)(:[a-z0-9_:]{2,})$/, index: 2, cache: true, - search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term.substr(1)) !== -1 ? entry : null; })); }); }, - replace: function(item) { return "$1" + item.text + ' '; }, + search: function(term, callback) { $.getJSON('/smilies/json').done(function(data) { callback($.map(data, function(entry) { return entry.shortname.indexOf(term.substr(1)) !== -1 ? entry : null; })); }); }, + replace: function(item) { return "$1" + item.shortname + ' '; }, context: function(text) { return text.toLowerCase(); }, template: smiley_format }; -- cgit v1.2.3