I'm making a change to the CP so that clicking an asset thumbnail from the asset preview HUD will open the asset in a new tab. Specifically, I'm changing line 1685 of
craftcms/cms/src/elements/Asset.php to this:
</div><a href="' . $this->url . '" target="_blank" style="width:100%;height:100%;position:absolute;"></a>';
This achieves what I want, but it's obviously not the right way to do it. My question is, what is the right way? Can I do this with a module as opposed to a full plugin?