added logic that allows a block to load some js

it allows a block to load a js or a css at the top or a the bottom of a
page