added required js library with specified weight, instead of using the js_alter() hook.