Tabcomplete names
This commit is contained in:
parent
9e528e5f00
commit
33d3f8f386
|
@ -434,6 +434,7 @@ button {
|
||||||
#chat .names {
|
#chat .names {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
padding: 15px 20px;
|
padding: 15px 20px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -307,8 +307,15 @@ $(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
function complete(word) {
|
function complete(word) {
|
||||||
|
var words = commands.slice();
|
||||||
|
var users = chat.find(".active")
|
||||||
|
.find(".names")
|
||||||
|
.children()
|
||||||
|
.each(function() {
|
||||||
|
words.push($(this).text().replace(/[+%@~]/, ""));
|
||||||
|
});
|
||||||
return $.grep(
|
return $.grep(
|
||||||
commands,
|
words,
|
||||||
function(w) {
|
function(w) {
|
||||||
return !w.toLowerCase().indexOf(word.toLowerCase());
|
return !w.toLowerCase().indexOf(word.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue