How do you add a SSJS library to an xpage or an xpages custom control
Create a Server Side Javascript library first in Code-> Script Libraries.
In the bottom left outline area, click on XPage or Custom Control.
In the properties click on Resources.
Click "Add" Javascript Library, then click wahtever you want.