Ported from #2081: link annotations whose action is JavaScript keep the script (up to 256 KiB each, 4 MiB per document; larger ones are rejected and reported once). Co-authored-by: LMatt08 <245691047+LMatt08@users.noreply.github.com>