Push state on doc change
This commit is contained in:
parent
13e497993f
commit
44d54174ed
|
@ -1,2 +1,4 @@
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
node_modules
|
node_modules
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
|
@ -60,6 +60,7 @@ heist.prototype.newDocument = function(ext) {
|
||||||
this.doc = new heist_document();
|
this.doc = new heist_document();
|
||||||
this.$box.hide();
|
this.$box.hide();
|
||||||
this.setTitle();
|
this.setTitle();
|
||||||
|
window.history.pushState(null, this.appName, '/');
|
||||||
this.$textarea.val('').show().focus();
|
this.$textarea.val('').show().focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ heist.prototype.lockDocument = function() {
|
||||||
if (ret) {
|
if (ret) {
|
||||||
_this.$code.html(ret.value);
|
_this.$code.html(ret.value);
|
||||||
_this.setTitle(ret.language + '-' + ret.uuid);
|
_this.setTitle(ret.language + '-' + ret.uuid);
|
||||||
// TODO add to push state
|
window.history.pushState(null, _this.appName + '-' + ret.uuid, '/' + ret.uuid);
|
||||||
_this.$textarea.val('').hide();
|
_this.$textarea.val('').hide();
|
||||||
_this.$box.show();
|
_this.$box.show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue