How to edit different shopify storefront with one script from Shopify app

My Shopify app needs to edit storefront to change existing element. There are two ways to change storefront code in Shopify

  1. Edit liquid theme file
  2. Add client side JS with Asset API

but different merchants uses different themes in their stores. Is there any way my app works with every theme or how can i write a script which supports maximum themes ? It would be very helpful if you can give some hints or share your thoughts about this issue.

Thanks

@Paulo