How to call user-extensions in webdriver

Found an article that indicates to:

 

loadjsFile(driver);

function is:

publicstaticvoid loadjsFile(WebDriver driver){String scriptSrc ="http://localhost:8080/test/user-extensions.js";String injectScript ="var script = document.createElement(\"script\");"; injectScript +="script.src = \""+scriptSrc+"\";"; injectScript +="script.setAttribute(\"type\",\"text/javascript\");"; injectScript +="document.body.appendChild(script);";((JavascriptExecutor) driver).executeScript(injectScript);}

Other leads:
https://code.google.com/p/selenium/wiki/FrequentlyAskedQuestions#Q:_How_do_I_execute_Javascript_directly?