Skip to content

Commit

Permalink
Fix logic on zipline/basejumps
Browse files Browse the repository at this point in the history
  • Loading branch information
Berkeley Martinez authored and Berkeley Martinez committed Oct 16, 2015
1 parent 1b75d04 commit 5b9c534
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions server/views/coursewares/showZiplineOrBasejump.jade
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,21 @@ block content
include ../partials/challenge-modals
script.
document.addEventListener('gitter-sidecar-ready', function(e) {
var challengeType = !{JSON.stringify(challengeType)};
var room = 'freecodecamp/help';
var title;

if (challengeType === '4') {
room = 'freecodecamp/helpBasejumps';
title = 'Basejump Help';
}

if (challengeType === '3') {
room = 'freecodecamp/helpZiplines';
title = 'Zipline Help';
}

if (window.main) {
window.main.chat.createHelpChat(
!{JSON.stringify(challengeType)} !== 3 ?
'freecodecamp/helpZiplines' :
'freecodecamp/helpBasejumps',
'#challenge-help-btn',
!{JSON.stringify(challengeType)} !== 3 ?
'Zipline Help' :
'Basejump Help'
);
window.main.chat.createHelpChat(room, '#challenge-help-btn', title);
}
});

0 comments on commit 5b9c534

Please sign in to comment.