mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 20:13:07 +00:00
Tabcomplete names
This commit is contained in:
parent
9e528e5f00
commit
33d3f8f386
2 changed files with 9 additions and 1 deletions
|
@ -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 a new issue