create infrastructure for advancing through wiki
This commit is contained in:
@@ -52,6 +52,23 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
function completedWiki(wikiId) {
|
||||
if ($('.signup-btn-nav').length < 1) {
|
||||
$.post(
|
||||
'/completed-wiki',
|
||||
{
|
||||
wikiInfo: {
|
||||
wikiId: wikiId
|
||||
}
|
||||
},
|
||||
function(res) {
|
||||
if (res) {
|
||||
window.location.href = '/wiki'
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$('.next-bonfire-button').on('click', function() {
|
||||
var bonfireSolution = myCodeMirror.getValue();
|
||||
var thisBonfireHash = passedBonfireHash || null;
|
||||
@@ -61,6 +78,11 @@ $(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
$('.next-wiki-button').on('click', function() {
|
||||
var wikiId = $('#wikiId').text();
|
||||
completedWiki(wikiId);
|
||||
});
|
||||
|
||||
$("img").error(function () {
|
||||
$(this).unbind("error").attr("src", "https://s3.amazonaws.com/freecodecamp/camper-image-placeholder.png");
|
||||
});
|
||||
|
Reference in New Issue
Block a user