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
|
// create a HTTP session
|
||||||
httpSession, _ := session.HTTPSession.Get(r, "wide-session")
|
httpSession, _ := session.HTTPSession.Get(r, "wide-session")
|
||||||
httpSession.Values["username"] = username
|
|
||||||
if httpSession.IsNew {
|
if httpSession.IsNew {
|
||||||
httpSession.Values["id"] = strconv.Itoa(rand.Int())
|
httpSession.Values["id"] = strconv.Itoa(rand.Int())
|
||||||
|
httpSession.Values["username"] = username
|
||||||
}
|
}
|
||||||
|
|
||||||
httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge
|
httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge
|
||||||
|
|
|
@ -35,6 +35,10 @@ var playground = {
|
||||||
foldGutter: true,
|
foldGutter: true,
|
||||||
cursorHeight: 1,
|
cursorHeight: 1,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
playground.editor.on('changes', function (cm) {
|
||||||
|
$("#url").html("");
|
||||||
|
});
|
||||||
|
|
||||||
this._initWS();
|
this._initWS();
|
||||||
},
|
},
|
||||||
|
|
|
@ -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/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/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}}/codemirror.js"></script>
|
||||||
<script type="text/javascript" src="{{.conf.StaticServer}}/static/js/lib/codemirror-{{.codeMirrorVer}}/addon/selection/active-line.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