Attempting to create a bookmarklet for the Wordpress image gallery manager that triggers the sidebar when an image is clicked. The sidebar contains fields for alt text (input), legend, and description (both textarea).
<a href="javascript:var t=document.querySelectorAll('div.media-sidebar label input');var a=t[2];var u=document.querySelectorAll('div.media-sidebar textarea');var b=u[0];var v=document.querySelectorAll('div.media-sidebar label input');var c=u[1];a.value='Hello';">Duplicate</a>
After clicking the link, I get redirected to a new page instead of setting the desired text. Not sure how to resolve this issue as it should not redirect. Appreciate any help on this matter. Thank you.