Skip to content

Instantly share code, notes, and snippets.

@pamelafox-coursera
Last active January 20, 2023 07:26
Show Gist options
  • Save pamelafox-coursera/5921550 to your computer and use it in GitHub Desktop.
Save pamelafox-coursera/5921550 to your computer and use it in GitHub Desktop.
Google Hangout code
Google+ Hangouts are online rooms where you can have a real-time audio/video conversation with up to 10 classmates at once. You can schedule hangouts in advance for study groups, review sessions and social meetups with classmates. Use this forum to plan
your hangouts with classmates and talk about it afterward: <a href="https://class.coursera.org/behavioralecon-001/forum/list?forum_id=105">Google+ Hangouts Forum</a>. We've scheduled a bunch of these for you (see all the events <a href="https://plus.google.com/u/0/communities/106659009032200000126/events"
target="_blank">here</a>), so feel free to join one of those or go ahead and make your own!
<br>
<br>Scheduled Hangouts will appear on this page. If you use Google Calendar, you can click the Attend button to get a reminder when the hangout is about to begin, but entering a hangout is on a first come first serve basis. You do have to have a Google+ account
to do this (but you can easily create one).
<br>
<br>
<h3>New to Hangouts?</h3>
Check <a href="https://spark-public.s3.amazonaws.com/communityta/CourseraHangouts101.pdf" target="_blank">this out</a> and <a href="http://services.google.com/fh/files/blogs/Hangouts_On_Air_Technical_Guide.pdf" target="_blank">also this</a> to learn what
you need to do to get started. Read these important guides -- really!! Knowing how to hangout properly will make it a much smoother process for everyone.
<h3>On Air with the Special Guest Lecturers</h3>
We will be having a new "on air" series where the guest lecturers for this course host a 30-minute hangout, which will be streamed live, recorded, and then posted to youtube.
<h3>Schedule Your Own</h3>
If you want to schedule your own hangouts, you can do this by going to the <a href="https://plus.google.com/communities/106659009032200000126" target="_blank">Google+ Community page</a> for this course and following these instructions: <a href="https://spark-public.s3.amazonaws.com/communityta/How%20to%20Schedule%20a%20Google%2B%20Hangout%20in%20Coursera%20%282%29.pdf"
target="_blank">Read Written Instructions</a> or <a href="http://www.youtube.com/embed/-XbHDbcl0Qo" target="_blank">Watch Video Instructions</a>.
<br>
<br>
<iframe width="560" height="315" src="http://www.youtube.com/embed/-XbHDbcl0Qo?rel=0" frameborder="0" allowfullscreen=""></iframe>
<br>
<br>
<b>Once you've tried attending or scheduling a hangout, please tell us about your experience: <a href="https://docs.google.com/forms/d/1mhNJc4IjDW7YqfA-T8_y-l6QwXJUKKWZAjoizP7yPt8/viewform" target="_blank">Hangouts Experience Survey</a>.</b>
<script>
window["___gcfg"] = {
iframes: {
hangout: {
url: 'https://talkgadget.google.com/talkgadget/_/widget'
}
}
}
</script>
<script src="https://apis.google.com/js/plusone.js"></script>
<div id="coursera-hangout-widgets" style="width:900px"></div>
<script>
var hangoutDiv = document.createElement('div');
document.getElementById('coursera-hangout-widgets').appendChild(hangoutDiv);
window.gapi.hangout.render(hangoutDiv, {
Render: 'community',
Community_id: '106659009032200000126',
width: '900'
});
</script>
<!-- From ThreadView template -->
<div style="position: fixed; bottom: 10px; right: 40px; width: 240px;" class="alert alert-info course-forum-hangouts-popup">
<button type="button" data-action="hide" class="close">×</button>This looks like a great topic! Maybe you'd like to...<a style="margin-bottom:6px;" data-action="start" class="btn btn-info">Start a Google+ Hangout on this topic</a>
<p style="margin-bottom:10px; display:none;">Go to <a href="https://class.coursera.org/behavioralecon-001/wiki/view?page=ScheduleGoogleHangouts&amp;from_popout" target="_blank">the scheduler page</a> to learn how, and post the URL to this thread after to let people know.</p><a data-action="join" class="btn btn-info">Join a Google+ Hangout on this topic</a>
<p style="margin-bottom:15px; display:none;">Hm, it looks like there's none yet on this topic, but you can <a href="https://class.coursera.org/behavioralecon-001/wiki/view?page=ScheduleGoogleHangouts&amp;from_popout" target="_blank">go here</a> to check out all the upcoming hangouts or schedule your own.</p><a href="javascript:void(0)" data-action="nothanks">No, thanks, I'm not interested in hangouts.</a>
</div>
// From our ThreadView.js
maybeShowHangoutPopup: function() {
var COOKIE_DISABLED = 'course.forum.hangouts.disabled';
var $hangoutPopup = this.$('.course-forum-hangouts-popup');
// First we check a bunch of criteria before deciding to show it
if (this.hangoutsEnabled && // We're meant to show it
!$hangoutPopup.is(':visible') && // Its not visible yet
window.outerWidth > 1200 && // The window is wide enough for it to not be annoying
this.thread.userContributed(Coursera.user.get('id')) && // The viewer contributed
this.thread.getTotalVotes() >= 2 && // Its popular enough
(this.thread.get('posts').size() + this.thread.get('comments').size()) >= 3 && // Its sizable enough
!cookie.get(COOKIE_DISABLED) // The user has not disabled it yet
) {
this.$('[data-action=start]').on('click', function() {
$(this).next('p').show();
Coursera.multitracker.push([TRACKER_LABEL, 'Hangout Popup Start Click']);
$(this).off('click');
});
this.$('[data-action=join]').on('click', function() {
$(this).next('p').show();
Coursera.multitracker.push([TRACKER_LABEL, 'Hangout Popup Join Click']);
$(this).off('click');
});
this.$('[data-action=hide]').on('click', function() {
$hangoutPopup.hide();
Coursera.multitracker.push([TRACKER_LABEL, 'Hangout Popup Close Click']);
$(this).off('click');
});
this.$('[data-action=nothanks]').on('click', function() {
$hangoutPopup.hide();
Coursera.multitracker.push([TRACKER_LABEL, 'Hangout Popup NoThanks Click']);
cookie.set(COOKIE_DISABLED, 'true');
$(this).off('click');
});
$hangoutPopup.show();
Coursera.multitracker.push([TRACKER_LABEL, 'Hangout Popup Show']);
}
}
@githubnasty
Copy link

@githubnasty
Copy link

Maria johnston Jacob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment