         //alert("Hook updated");
                    },
                    404: function(){
                        //alert("Failed to update the hook")
                    }
                }
            })
        });

        function buildHookCode(id){
            let code = EditorRegister[id].session.doc;
            let src = [];
            //$lines.map(x=>src.push(encodeURIComponent(x)));
            // return src;
            return code.$lines;
        }

        // save change action
        $(