Still not working for me. Looks like this check substr($hurl, 0, 11) === $alt_wp_content
never returns true.
Just to show you what my variables look like in that block:
$hurl: '/wp-includes/js/jquery/jquery.js'
$wp_home: 'https://test.dev/wp'
$alt_wp_content: 'wp'
So it looks like the alternate wordpress directory doesn’t show up in the source, only in $wp_home, so the substr check will never be true for me.