Hi!
Take a look at these threads:
How to pass input parameter in Inject java script - Help - UiPath Community Forum
JavaScript and UIPath inject, How to use JQuery or Node.js - Help - UiPath Community Forum
How to work with Inject JS - Help - UiPath Community Forum
And this article:
Activities - Inject JS Script (uipath.com)
It seems like you need use this format for your Script Code:
function (element, input) {
return “result”;
}