mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-08-03 19:41:28 +02:00
did some more work. Mainly worked on code cleanliness and hotkey support (https://defkey.com/tidal-desktop-shortcuts)
This commit is contained in:
11
src/scripts/hotkeys.js
Normal file
11
src/scripts/hotkeys.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const hotkeyjs = require("hotkeys-js");
|
||||
const hotkeys = {};
|
||||
|
||||
hotkeys.add = function(keys, func) {
|
||||
hotkeyjs(keys, function(event, args) {
|
||||
event.preventDefault();
|
||||
func(event, args);
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = hotkeys;
|
11
src/scripts/window-functions.js
Normal file
11
src/scripts/window-functions.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const windowFunctions = {};
|
||||
|
||||
windowFunctions.setTitle = function(title) {
|
||||
window.document.title = title;
|
||||
};
|
||||
|
||||
windowFunctions.getTitle = function() {
|
||||
return window.document.title;
|
||||
};
|
||||
|
||||
module.exports = windowFunctions;
|
Reference in New Issue
Block a user