Skip to content

Commit

Permalink
Add hotkey to love/unlove song
Browse files Browse the repository at this point in the history
Closes #1827.
  • Loading branch information
alexesprit committed Jun 12, 2019
1 parent 17f26b1 commit 659bd13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/_locales/en/messages.json
Expand Up @@ -591,5 +591,9 @@
"hotkeyToggleConnector": {
"message": "Toggle connector state",
"description": "Hotkey label"
},
"hotkeyToggleLove": {
"message": "Love/unlove current song",
"description": "Hotkey label"
}
}
5 changes: 5 additions & 0 deletions src/core/background/main.js
Expand Up @@ -111,6 +111,11 @@ require([
case 'disable-connector':
ctrl.setEnabled(false);
break;
case 'toggle-love': {
const song = ctrl.getCurrentSong();
ctrl.toggleLove(!song.metadata.userloved);
break;
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions src/manifest.json
Expand Up @@ -41,6 +41,12 @@
"default": "Alt+Shift+R"
},
"description": "__MSG_menuDisableUntilTabClosed__"
},
"toggle-love": {
"suggested_key": {
"default": "Alt+L"
},
"description": "__MSG_hotkeyToggleLove__"
}
},

Expand Down

0 comments on commit 659bd13

Please sign in to comment.