This repository was archived by the owner on Jun 12, 2021. It is now read-only.
File tree 2 files changed +3
-3
lines changed 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ It bases upon [haste](https://github.com/seejohnrun/haste-server) and got enhanc
30
30
| ` dataPath ` | The directory where all pastes are stored | ` ./data ` |
31
31
| ` keyLength ` | The length of the pastes' key | ` 10 ` |
32
32
| ` maxLength ` | Maximum chars in a paste | ` 500000 ` |
33
- | ` createKey ` | Needs to be in front of paste to allow creation | ` ` |
33
+ | ` createKey ` | Needs to be in front of paste to allow creation | ` ` |
34
34
| ` documents ` | Static documents to serve | See below |
35
35
36
36
### Default Config
Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ haste.prototype.loadDocument = function(key) {
60
60
if ( ret ) {
61
61
_this . $code . html ( ret . value ) ;
62
62
_this . setTitle ( ret . key ) ;
63
+ window . history . pushState ( null , _this . appName + '-' + ret . key , '/' + ret . key ) ;
63
64
_this . fullKey ( ) ;
64
65
_this . $textarea . val ( '' ) . hide ( ) ;
65
66
_this . $box . show ( ) ;
@@ -85,8 +86,7 @@ haste.prototype.lockDocument = function() {
85
86
if ( ! err && ret ) {
86
87
_this . $code . html ( ret . value . trim ( ) . replace ( / .+ / g, "<span class=\"line\">$&</span>" ) . replace ( / ^ \s * [ \r \n ] / gm, "<span class=\"line\"></span>\n" ) ) ;
87
88
_this . setTitle ( ret . key ) ;
88
- var file = '/' + ret . key ;
89
- window . history . pushState ( null , _this . appName + '-' + ret . key , file ) ;
89
+ window . history . pushState ( null , _this . appName + '-' + ret . key , '/' + ret . key ) ;
90
90
_this . fullKey ( ) ;
91
91
_this . $textarea . val ( '' ) . hide ( ) ;
92
92
_this . $box . show ( ) ;
You can’t perform that action at this time.
0 commit comments