This is bit messy… you should avoid adding custom properties to the window object.
Instead use local variables using “let” or “const”. Also what is a “link” in the code you are executing, shouldn’t that be “var link”? You can also use ` instead of ’ so that you don’t have to escape those apostrophes.
Anyway you should be able to debug this code from the background scrip inspector (when you click “Inspect” button in the “about:debugging#/runtime/this-firefox” page).
And one last thing - you are actually executing remote code???
No wonder reviewer rejected it , remote code execution is totally forbidden.
It’s allowed in Chrome for now, but it won’t be anymore in the new Manifest V3..
But it should be fine here as long as you use the user script API (otherwise all those user-script addons wouldn’t be able to sync your scripts).