Hi @john john Pter ,Unfortunately, according to my research, there is no OOTB solution for now. You can try to add the JS code to SPFX and then upload it as a whole. This should not affect other users who can use their custom scripts.
For your reference:
If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.