-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into nurl_support
- Loading branch information
Showing
302 changed files
with
32,097 additions
and
3,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,53 @@ | ||
|
||
const allowedModules = require("./allowedModules"); | ||
const allowedModules = require('./allowedModules.js'); | ||
|
||
module.exports = { | ||
"env": { | ||
"browser": true, | ||
"commonjs": true | ||
env: { | ||
browser: true, | ||
commonjs: true | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"moduleDirectory": ["node_modules", "./"] | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
moduleDirectory: ['node_modules', './'] | ||
} | ||
} | ||
}, | ||
"extends": "standard", | ||
"plugins": [ | ||
"prebid", | ||
"import" | ||
extends: 'standard', | ||
plugins: [ | ||
'prebid', | ||
'import' | ||
], | ||
"globals": { | ||
"$$PREBID_GLOBAL$$": false | ||
globals: { | ||
'$$PREBID_GLOBAL$$': false, | ||
'BROWSERSTACK_USERNAME': false, | ||
'BROWSERSTACK_KEY': false | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module" | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 2018, | ||
}, | ||
"rules": { | ||
"comma-dangle": "off", | ||
"semi": "off", | ||
"space-before-function-paren": "off", | ||
"import/extensions": ["error", "ignorePackages"], | ||
rules: { | ||
'comma-dangle': 'off', | ||
semi: 'off', | ||
'space-before-function-paren': 'off', | ||
'import/extensions': ['error', 'ignorePackages'], | ||
|
||
// Exceptions below this line are temporary, so that eslint can be added into the CI process. | ||
// Violations of these styles should be fixed, and the exceptions removed over time. | ||
// | ||
// See Issue #1111. | ||
"eqeqeq": "off", | ||
"no-return-assign": "off", | ||
"no-throw-literal": "off", | ||
"no-undef": 2, | ||
"no-useless-escape": "off", | ||
"no-console": "error" | ||
eqeqeq: 'off', | ||
'no-return-assign': 'off', | ||
'no-throw-literal': 'off', | ||
'no-undef': 2, | ||
'no-useless-escape': 'off', | ||
'no-console': 'error' | ||
}, | ||
"overrides": Object.keys(allowedModules).map((key) => ({ | ||
"files": key + "/**/*.js", | ||
"rules": { | ||
"prebid/validate-imports": ["error", allowedModules[key]] | ||
overrides: Object.keys(allowedModules).map((key) => ({ | ||
files: key + '/**/*.js', | ||
rules: { | ||
'prebid/validate-imports': ['error', allowedModules[key]] | ||
} | ||
})) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
integrationExamples/gpt/airgridRtdProvider_example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
<html> | ||
<head> | ||
<script> | ||
var matchedAudiences = ["sport", "travel"]; | ||
window.localStorage.setItem( | ||
"edkt_matched_audience_ids", | ||
JSON.stringify(matchedAudiences) | ||
); | ||
</script> | ||
<script> | ||
var FAILSAFE_TIMEOUT = 2000; | ||
|
||
var adUnits = [ | ||
{ | ||
code: "test-div", | ||
mediaTypes: { | ||
banner: { | ||
sizes: [ | ||
[300, 250], | ||
[300, 600], | ||
[728, 90], | ||
], | ||
}, | ||
}, | ||
bids: [ | ||
{ | ||
bidder: "appnexus", | ||
params: { | ||
placementId: 13144370, | ||
}, | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
var pbjs = pbjs || {}; | ||
pbjs.que = pbjs.que || []; | ||
</script> | ||
<script src="../../build/dev/prebid.js" async></script> | ||
|
||
<script> | ||
var googletag = googletag || {}; | ||
var AUCTION_DELAY = 2000; | ||
googletag.cmd = googletag.cmd || []; | ||
googletag.cmd.push(function () { | ||
googletag.pubads().disableInitialLoad(); | ||
}); | ||
|
||
pbjs.que.push(function () { | ||
pbjs.setConfig({ | ||
debug: true, | ||
realTimeData: { | ||
auctionDelay: AUCTION_DELAY, | ||
dataProviders: [ | ||
{ | ||
name: "airgrid", | ||
waitForIt: true, | ||
params: { | ||
apiKey: "key123", | ||
accountId: "sdk", | ||
publisherId: "pub123", | ||
}, | ||
}, | ||
], | ||
}, | ||
}); | ||
pbjs.setBidderConfig({ | ||
bidders: ["appnexus", "pubmatic"], | ||
config: { | ||
ortb2: { | ||
user: { | ||
ext: { | ||
data: { | ||
registered: true, | ||
interests: ["cars"], | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
pbjs.addAdUnits(adUnits); | ||
pbjs.requestBids({ bidsBackHandler: sendAdserverRequest }); | ||
}); | ||
|
||
function sendAdserverRequest() { | ||
document.getElementById("airgrid_audiences").innerHTML = | ||
window.localStorage.getItem("edkt_matched_audience_ids"); | ||
|
||
if (pbjs.adserverRequestSent) return; | ||
pbjs.adserverRequestSent = true; | ||
googletag.cmd.push(function () { | ||
pbjs.que.push(function () { | ||
pbjs.setTargetingForGPTAsync(); | ||
googletag.pubads().refresh(); | ||
}); | ||
}); | ||
} | ||
|
||
setTimeout(function () { | ||
sendAdserverRequest(); | ||
}, FAILSAFE_TIMEOUT); | ||
</script> | ||
|
||
<script> | ||
(function () { | ||
var gads = document.createElement("script"); | ||
gads.async = true; | ||
gads.type = "text/javascript"; | ||
var useSSL = "https:" == document.location.protocol; | ||
gads.src = | ||
(useSSL ? "https:" : "http:") + | ||
"//www.googletagservices.com/tag/js/gpt.js"; | ||
var node = document.getElementsByTagName("script")[0]; | ||
node.parentNode.insertBefore(gads, node); | ||
})(); | ||
</script> | ||
|
||
<script> | ||
googletag.cmd.push(function () { | ||
googletag | ||
.defineSlot( | ||
"/112115922/FL_PB_MedRect", | ||
[ | ||
[300, 250], | ||
[300, 600], | ||
], | ||
"test-div" | ||
) | ||
.addService(googletag.pubads()); | ||
googletag.pubads().enableSingleRequest(); | ||
googletag.enableServices(); | ||
}); | ||
</script> | ||
</head> | ||
|
||
<body> | ||
<h2>AirGrid RTD Prebid</h2> | ||
|
||
<div id="test-div"> | ||
<script> | ||
googletag.cmd.push(function () { | ||
googletag.display("test-div"); | ||
}); | ||
</script> | ||
</div> | ||
|
||
AirGrid Audiences: | ||
<div id="airgrid_audiences"></div> | ||
</body> | ||
</html> |
Oops, something went wrong.