Moved the function from head to js-inline block