document).on("click","div.savechange",function(){
            var code = buildHookCode($(this).attr("code"));
            var replay = $(this).attr("hookreplay");
            var hookid = $(this).attr("hookid");
            // EditorRegister[$(this).attr("code")].session.doc.$lines.join("\n");
            // console.log(EditorRegister[$(this).attr("code")].session.doc
            $.ajax('../api/hook/'+hookid,{
                method: 'put',
                data: {
                    code: code
            