Add js for convert direct download

hi, how if i want to add a script like this in direct download page.

i want to convert original direct download to my shortener link

in wordpress i just need to add that code to widget

page i try to edit is public.php from ../apps/files_sharing/templates

i add that code above

im using v7.0

here my complete code from github mycode
from line 81-85 is my code

I don't think that you should base your code on such an outdated and even unsupported version like 7.0