aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-06 20:30:49 -0700
committerzotlabs <mike@macgirvin.com>2018-05-06 20:30:49 -0700
commit464025361403747c2d9519382d2ab0df2147a6a6 (patch)
treef52126ac40e8b050cbe7e33977aaa963e7da408d /view
parente646684493f5c3d49e972308aa8a5722877f26ce (diff)
downloadvolse-hubzilla-464025361403747c2d9519382d2ab0df2147a6a6.tar.gz
volse-hubzilla-464025361403747c2d9519382d2ab0df2147a6a6.tar.bz2
volse-hubzilla-464025361403747c2d9519382d2ab0df2147a6a6.zip
autocomplete after 2 chars instead of 3; this was changed some months back to work around implementation quirks in the custom cache driver that is now disabled.
Diffstat (limited to 'view')
-rw-r--r--view/js/autocomplete.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js
index 97bb62fef..2a2d1454a 100644
--- a/view/js/autocomplete.js
+++ b/view/js/autocomplete.js
@@ -188,7 +188,7 @@ function string2bb(element) {
// Autocomplete contacts
contacts = {
- match: /(^|\s)(@\!*)([^ \n]{3,})$/,
+ match: /(^|\s)(@\!*)([^ \n]{2,})$/,
index: 3,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'c', extra_channels, spinelement=false); },
@@ -198,7 +198,7 @@ function string2bb(element) {
// Autocomplete forums
forums = {
- match: /(^|\s)(\!\!*)([^ \n]{3,})$/,
+ match: /(^|\s)(\!\!*)([^ \n]{2,})$/,
index: 3,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'f', extra_channels, spinelement=false); },
@@ -209,7 +209,7 @@ function string2bb(element) {
// Autocomplete hashtags
tags = {
- match: /(^|\s)(\#)([^ \n]{3,})$/,
+ match: /(^|\s)(\#)([^ \n]{2,})$/,
index: 3,
cache: true,
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
@@ -253,7 +253,7 @@ function string2bb(element) {
// Autocomplete contacts
contacts = {
- match: /(^@)([^\n]{3,})$/,
+ match: /(^@)([^\n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'x', [], spinelement='#nav-search-spinner'); },
@@ -263,7 +263,7 @@ function string2bb(element) {
// Autocomplete forums
forums = {
- match: /(^\!)([^\n]{3,})$/,
+ match: /(^\!)([^\n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, 'f', [], spinelement='#nav-search-spinner'); },
@@ -273,7 +273,7 @@ function string2bb(element) {
// Autocomplete hashtags
tags = {
- match: /(^\#)([^ \n]{3,})$/,
+ match: /(^\#)([^ \n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { $.getJSON('/hashtags/' + '$f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.toLowerCase().indexOf(term.toLowerCase()) === 0 ? entry : null; })); }); },
@@ -306,7 +306,7 @@ function string2bb(element) {
// Autocomplete contacts
contacts = {
- match: /(^)([^\n]{3,})$/,
+ match: /(^)([^\n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },
@@ -344,7 +344,7 @@ function string2bb(element) {
// Autocomplete contacts
names = {
- match: /(^)([^\n]{3,})$/,
+ match: /(^)([^\n]{2,})$/,
index: 2,
cache: true,
search: function(term, callback) { contact_search(term, callback, backend_url, typ,[], spinelement=false); },