create common script loaded in default layout