xP: make the buffer list selectable by Vimium

This commit is contained in:
Přemysl Eric Janouch 2023-04-05 23:08:49 +02:00
parent 1079189381
commit 6bfe577f1b
Signed by: p
GPG Key ID: A0420B94F92B9493
2 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
Copyright (c) 2014 - 2022, Přemysl Eric Janouch <p@janouch.name>
Copyright (c) 2014 - 2023, Přemysl Eric Janouch <p@janouch.name>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

View File

@ -1,4 +1,4 @@
// Copyright (c) 2022, Přemysl Eric Janouch <p@janouch.name>
// Copyright (c) 2022 - 2023, Přemysl Eric Janouch <p@janouch.name>
// SPDX-License-Identifier: 0BSD
import * as Relay from './proto.js'
@ -462,14 +462,15 @@ let BufferList = {
classes.push('highlighted')
highlighted = true
}
return m('.item', {
// The role makes it selectable in VIM-like browser extensions.
return m('.item[role=tab]', {
onclick: event => bufferActivate(name),
class: classes.join(' '),
}, displayName)
})
updateIcon(rpc.ws === undefined ? null : highlighted)
return m('.list', {}, items)
return m('.list[role=tablist]', {}, items)
},
}