Created
October 13, 2017 02:19
-
-
Save kikobr/86374845722362d31d1eb49788ebf701 to your computer and use it in GitHub Desktop.
Auto-accept video calls in Skype Web
This file contains 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 characters
function isHidden(el) { | |
return (el.offsetParent === null) | |
} | |
interval = (function(){ | |
return setInterval(function(){ | |
try { | |
var acceptVideoButton = document.querySelector('.toast.extended [data-click="acceptWithVideo"]'); | |
if(acceptVideoButton && !isHidden(acceptVideoButton)){ | |
console.log('call incoming! triggering click!'); | |
acceptVideoButton.click(); | |
} else { | |
console.log('no call incoming.'); | |
} | |
} catch(err) { console.log(err); } | |
}, 3000) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment