@vaibhavk
Check following code. You can easily include your own js. You can also override existing feature using javascript prototype.
@fahimalizain In this case, you need page_js hook instead on doctype_js