Skip to content

Commit 2b7ce22

Browse files
fix cookie not being set from home console
1 parent 6b8dcb3 commit 2b7ce22

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

client/javascripts/application.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,16 @@ jQuery(function($) {
7777
// Inbox
7878
// -------------------------------------
7979

80-
jQuery(function($) {
80+
$('a:contains("Next Challenge")').on('click', function() {
81+
var name = $('.js-inlineConsole-input').val().replace(/['";]/g, '');
82+
83+
document.cookie = 'try_name=' + name;
84+
});
8185

86+
jQuery(function($) {
8287
// Hide sponsor links
8388
$('tr[style="background-color: #faf9dc;"]').hide();
8489

85-
86-
$('a:contains("Next Challenge")').on('click', function() {
87-
var name = $('.js-inlineConsole-input').val().replace(/['";]/g, '');
88-
89-
document.cookie = 'try_name=' + name;
90-
});
91-
9290
$('.js-courseLayout-toggle').on('click', function(event) {
9391
$('.js-courseLayout').toggleClass('is-active')
9492
});

0 commit comments

Comments
 (0)