For reference, PR #866 (now waiting for review) moves this JS external, and also changes to using the string_data hook for heading and subhead l10n.