register script in enqueue hook