Initialize OpenXJS object by passing object containing deliveryUrl and default parameters which will be attached to all openx queries.
var openXJS = new OpenXJS({deliveryUrl: "http://your.openx.server/openx/www/delivery/",parameters: {}});Fill elments with ids banner1 and banner2 with content from OpenX zone 1 and 2.
targetingParameters will overwrite default parameters passed on initialization in case of conflict.
openXJS.displayAds({banner1: 1, banner2: 2}, targetingParameters, callback);Receive ad codes from OpenX zone 1 and 2. targetingParameters will overwrite default parameters passed on initialization in case of conflict.
openXJS.receiveAdCodes({banner1: 1, banner2: 2}, targetingParameters, callback);// Response
{
banner1: "code to display ad from zone 1",
banner2: "code to display ad from zone 2"
}make test
- Setup Sauce Connect
- Enter your sauce credentials into
test/auth/sauce.jsonusing the following json:
{"username": "my-user", "key": "my-key"}
- Run
node support/mocha-cloud.js
openxjs is maintained by Softgames
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request

