aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental
diff options
context:
space:
mode:
Diffstat (limited to 'experimental')
-rw-r--r--experimental/webtry/res/js/webtry.js10
-rw-r--r--experimental/webtry/templates/workspace.html3
2 files changed, 7 insertions, 6 deletions
diff --git a/experimental/webtry/res/js/webtry.js b/experimental/webtry/res/js/webtry.js
index b24501e143..b673e09239 100644
--- a/experimental/webtry/res/js/webtry.js
+++ b/experimental/webtry/res/js/webtry.js
@@ -11,7 +11,7 @@
* namespace. If workspaceName is the empty string then we know we aren't
* running on a workspace page.
*
- * If we are on a workspace page we also look for a 'history'
+ * If we are on a workspace page we also look for a 'history_'
* variable in the global namespace which contains the list of tries
* that are included in this workspace. That variable is used to
* populate the history list.
@@ -286,9 +286,9 @@
}
// Add the images to the history if we are on a workspace page.
- if (tryHistory && history) {
- for (var i=0; i<history.length; i++) {
- addToHistory(history[i].hash, '/i/'+history[i].hash+'.png');
+ if (tryHistory && history_) {
+ for (var i=0; i<history_.length; i++) {
+ addToHistory(history_[i].hash, '/i/'+history_[i].hash+'.png');
}
}
}
@@ -297,7 +297,7 @@
if (document.readyState != "loading") {
onLoad();
} else {
- this.addEventListener('DOMContentLoaded', onLoad);
+ this.addEventListener('load', onLoad);
}
})();
diff --git a/experimental/webtry/templates/workspace.html b/experimental/webtry/templates/workspace.html
index 9694a357b1..cb7a82740b 100644
--- a/experimental/webtry/templates/workspace.html
+++ b/experimental/webtry/templates/workspace.html
@@ -19,7 +19,8 @@
</section>
<script type='text/javascript'>
- var history = {{.Tries}};
+ var history_ = {{.Tries}};
+ console.log(history_);
</script>
<script type='text/javascript'>
// Set the workspace name so run.js also updates the history.