-
-
Save nenoken/c308487f4cf764b2c58e1c239ae0c61d to your computer and use it in GitHub Desktop.
Revisions
-
rothgar renamed this gist
Aug 13, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
rothgar created this gist
Aug 10, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ // ==UserScript== // @name Streamyard Keyboard Shortcuts // @namespace http://streamyard.com // @version 0.1 // @description Simple keyboard shortcuts for streamyard // @author [email protected] // @match https://streamyard.com/* // @grant none // @run-at document-end // ==/UserScript== (function() { 'use strict'; document.addEventListener('keydown', function(e) { //console.log(e); if (e.key == "m" && !e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) { var unmuteButton = document.querySelector('[aria-label="Unmute microphone"]'); var muteButton = document.querySelector('[aria-label="Mute microphone"]'); if (unmuteButton !== null) { unmuteButton.click(); } else { muteButton.click(); } } else if (e.key == "v" && !e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey) { var faceUnmuteButton = document.querySelector('[aria-label="turn on camera"]'); var faceMuteButton = document.querySelector('[aria-label="turn off camera"]'); if (faceUnmuteButton !== null) { faceUnmuteButton.click(); } else { faceMuteButton.click(); } } }, false); })();