This commit is contained in:
parent
6e1ae805e9
commit
ed1fd23759
|
@ -43,9 +43,9 @@ func IndexHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
// create a HTTP session
|
||||
httpSession, _ := session.HTTPSession.Get(r, "wide-session")
|
||||
httpSession.Values["username"] = username
|
||||
if httpSession.IsNew {
|
||||
httpSession.Values["id"] = strconv.Itoa(rand.Int())
|
||||
httpSession.Values["username"] = username
|
||||
}
|
||||
|
||||
httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge
|
||||
|
|
|
@ -36,6 +36,10 @@ var playground = {
|
|||
cursorHeight: 1,
|
||||
});
|
||||
|
||||
playground.editor.on('changes', function (cm) {
|
||||
$("#url").html("");
|
||||
});
|
||||
|
||||
this._initWS();
|
||||
},
|
||||
_initWS: function () {
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
|
||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/jquery-2.1.1.min.js"></script>
|
||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/reconnecting-websocket.js"></script>
|
||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/ztree/jquery.ztree.all-3.5.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/codemirror.js"></script>
|
||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/selection/active-line.js"></script>
|
||||
|
|
Loading…
Reference in New Issue