fix keybinds
This commit is contained in:
parent
b5435acdd8
commit
96bca52d0d
2 changed files with 5 additions and 7 deletions
|
@ -139,10 +139,12 @@ setTimeout(() => {
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
userscript.muteToggled.connect(() => {
|
userscript.muteToggled.connect(() => {
|
||||||
|
console.log("Toggling mute");
|
||||||
muteBtn && muteBtn.click();
|
muteBtn && muteBtn.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
userscript.deafenToggled.connect(() => {
|
userscript.deafenToggled.connect(() => {
|
||||||
|
console.log("Toggling deafen");
|
||||||
deafenBtn && deafenBtn.click();
|
deafenBtn && deafenBtn.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -285,15 +287,11 @@ function main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
muteBtn = buttonContainer
|
muteBtn = buttonContainer
|
||||||
? buttonContainer.getElementsByClassName(
|
? buttonContainer.getElementsByTagName("button")[0]
|
||||||
"button-12Fmur enabled-9OeuTA button-f2h6uQ lookBlank-21BCro colorBrand-I6CyqQ grow-2sR_-F"
|
|
||||||
)[0]
|
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
deafenBtn = buttonContainer
|
deafenBtn = buttonContainer
|
||||||
? buttonContainer.getElementsByClassName(
|
? buttonContainer.getElementsByTagName("button")[1]
|
||||||
"button-12Fmur enabled-9OeuTA button-f2h6uQ lookBlank-21BCro colorBrand-I6CyqQ grow-2sR_-F"
|
|
||||||
)[1]
|
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
if (resolutionString) {
|
if (resolutionString) {
|
||||||
|
|
|
@ -62,7 +62,7 @@ void UserScript::setupShortcutsDialog() {
|
||||||
auto toggleDeafenAction = new QAction(this);
|
auto toggleDeafenAction = new QAction(this);
|
||||||
toggleDeafenAction->setText("Toggle Deafen");
|
toggleDeafenAction->setText("Toggle Deafen");
|
||||||
toggleDeafenAction->setIcon(QIcon::fromTheme("audio-volume-muted"));
|
toggleDeafenAction->setIcon(QIcon::fromTheme("audio-volume-muted"));
|
||||||
connect(toggleMuteAction, &QAction::triggered, this,
|
connect(toggleDeafenAction, &QAction::triggered, this,
|
||||||
&UserScript::deafenToggled);
|
&UserScript::deafenToggled);
|
||||||
|
|
||||||
m_actionCollection = new KActionCollection(this);
|
m_actionCollection = new KActionCollection(this);
|
||||||
|
|
Loading…
Reference in a new issue