How avoid opening new page with bookmark

We have a web based inventory system. When we amend bin numbers we needed to export a complete inventory list to print a new bin label. I have written a script that scrapes fields from the item page and prints a label. This works if i click the icon in Chrome and run the script but if i export the script to an html file and set as a bookmark it opens a new tab when it’s run and can’t find the fields in this tab.

Is there a way to run a script without opening a new tab? Or is there a way to switch back to the previous tab (like imacros tab=x)

I’m very new to so apologies if this qualifies for dumbass question of the year!

The above issue is present in Chrome 79.0.3945.88
“Add shortcut to bookmarks bar” is also not working in Chrome.

Tried in Firefox, added shortcut to bookmarks successfully and all working. Looks like the issue is with the Chrome extension (perhaps only on this machine) as working 100% on Firefox

That is a known bug is v5.3.8

It’s fixed in v5.3.10 which should be hitting the Chrome WebStore anytime now