The liquid environment is pretty controlled, so you can't inject anything into liquid before the templates are rendered. If you wanted, you could add ids or classes to the various parts you want to modify then include a custom script that does the magic you want.
I understand it's not a perfect solution, but I don't think we'll be opening up what you can do with the liquid templates.