I have created a Javascript widget which does some function based on product add/remove cart action.
I would like to include the JS only on product pages viz: Category and Product detail page.I know a way, where I can create a phtml template and call the js via script by injecting the template on specific pages via XML.
However, I would like to know if there is a way to inject JS widget on particular page type without creating a phtml template for it?