use new url structure for plugin resources and simplify the head injection