Always keep history.
MODIFY
tutorials/common/tutorials.js
tutorials/common/tutorials.js
@@ -272,7 +272,7 @@ function start_keeper(alwaysKeep) {
if (keep) {
$(document).on('geojs-tutorial-run', '.codeblock', function () {
var newQuery = {};
- if (query.keep && (alwaysKeep !== true || query.keep === 'history')) {
+ if (query.keep && alwaysKeep !== true) {
newQuery.keep = query.keep;
}
$('.codeblock').each(function () {
@@ -291,11 +291,10 @@ function start_keeper(alwaysKeep) {
}
});
if (!inPop) {
- utils.setQuery(newQuery, keep === 'history');
+ utils.setQuery(newQuery, true);
}
});
}
- if (keep === 'history') {
window.addEventListener('popstate', function (evt) {
inPop = true;
fill_codeblocks(utils.getQuery());
@@ -303,7 +302,6 @@ function start_keeper(alwaysKeep) {
inPop = false;
}, false);
}
-}
/**
* Process code blocks to remove unwanted white space and store default values,

Always keep history.