Skip to content

Instantly share code, notes, and snippets.

@bvolpato
Created April 1, 2016 20:35
Show Gist options
  • Save bvolpato/32882a602cc0a3da392123610aa4b72a to your computer and use it in GitHub Desktop.
Save bvolpato/32882a602cc0a3da392123610aa4b72a to your computer and use it in GitHub Desktop.
Open and Join Hangouts
# Open and Join Hangout automatically on Mac OS X + Google Chrome :)
# It's good to join standup every day automatically with Automator.
open "https://plus.google.com/hangouts/_/domain.com/user?authuser=<email_to_join_with>"
osascript -e "
tell application \"Google Chrome\"
execute front window's active tab javascript \"!function(){function e(e){var t=document.createElement('script');t.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js'),t.addEventListener('load',function(){var t=document.createElement('script');t.textContent='('+e.toString()+')();',document.body.appendChild(t)},!1),document.body.appendChild(t)}function t(){function e(e,t){evt=document.createEvent('MouseEvents'),evt.initMouseEvent(t,!0,!0,document.defaultView,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(evt)}function n(t){e(t,'mouseover'),e(t,'mousedown'),e(t,'mouseup'),e(t,'mouseout')}var o=30;\$('div[role=button]').each(function(e,t){0>=o||\$(t).html().indexOf('Join')>=0&&(n(t),o=0)}),o-- >0&&setTimeout(t,1e3)}function n(){e(t)}setTimeout(n,1e3)}();\"
end tell
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment