JS code works for archive page but breaks some text on the front-end

I’m looking for a way to open a blog post in a new tab. We tried the following mu-plugin, which is working on archive page but I’m afraid it is breaking some text on the front page:
add_action( ‘wp_footer’, ‘function_name’ );
function function_name() {
<script type=”text/javascript”>
jQuery(document).ready(function() {
$(‘.page-id-224760 a’:wink:.attr(‘target’,’_blank’:wink:;

Please advise