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