Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 2 additions & 5 deletions .github/workflows/code-path-changes.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Notify Code Path Changes

on:
pull_request_target:
types: [opened, synchronize]
paths:
- '**'
workflow_dispatch:

env:
OAUTH2_CLIENT_ID: ${{ secrets.OAUTH2_CLIENT_ID }}
Expand Down Expand Up @@ -34,4 +31,4 @@ jobs:

- name: Run Notification Script
run: |
node .github/workflows/scripts/send-notification-on-change.js
node .github/workflows/scripts/send-notification-on-change.js
16 changes: 9 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
name: "CodeQL"

on:
push:
branches: [ "master"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master"]
schedule:
- cron: '22 11 * * 0'
workflow_dispatch:
### RENABLE WHEN REPO IS PUBLIC ###
#push:
#branches: [ "master"]
#pull_request:
## The branches below must be a subset of the branches above
#branches: [ "master"]
#schedule:
#- cron: '22 11 * * 0'

jobs:
analyze:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/jscpd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Check for Duplicated Code

on:
workflow_dispatch:
pull_request_target:
branches:
- master
Expand Down Expand Up @@ -121,4 +122,4 @@ jobs:
if: env.filtered_report_exists == 'true'
run: |
echo "Duplications found, failing the check."
exit 1
exit 1
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ jobs:
coveralls:
name: Update coveralls
needs: [checkout, test]
if: false #REMOVE ONCE REPO IS PUBLIC
runs-on: ubuntu-latest
steps:
- name: Restore working directory
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ build
test/app
gpt.html
gpt-each-bidder3.html
browserstack.err
local.log
logs/

# Selenium files
bin
Expand Down
2 changes: 1 addition & 1 deletion modules/utiqIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ export const utiqIdSubmodule = {
}
};

findUtiqService(storage, window.pbjs.refreshUserIds, LOG_PREFIX, MODULE_NAME);
findUtiqService(storage, window.oajs.refreshUserIds, LOG_PREFIX, MODULE_NAME);
submodule('userId', utiqIdSubmodule);
2 changes: 1 addition & 1 deletion modules/utiqMtpIdSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,5 @@ export const utiqMtpIdSubmodule = {
}
};

findUtiqService(storage, window.pbjs.refreshUserIds, LOG_PREFIX, MODULE_NAME);
findUtiqService(storage, window.oajs.refreshUserIds, LOG_PREFIX, MODULE_NAME);
submodule('userId', utiqMtpIdSubmodule);
4 changes: 3 additions & 1 deletion test/helpers/testing-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const utils = {
it(`should render GAM creative`, async () => {
await utils.switchFrame(expectGAMCreative);
if (nestedIframe) {
await utils.switchFrame('iframe[srcdoc]');
// needed :not([style]) as the orgignal test uses the universal creative.js
// instead of [format].js, which inserted another iframe[srcdoc] causing the wrong iframe to be focused
await utils.switchFrame('iframe[srcdoc]:not([style])');
}
const creative = [
'a > img', // banner
Expand Down
18 changes: 9 additions & 9 deletions test/pages/banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>

<script>
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var oajs = oajs || {};
oajs.que = oajs.que || [];

// Prebid Banner Ad Unit
const adUnits = [{
Expand Down Expand Up @@ -56,16 +56,16 @@
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function () {
pbjs.setConfig({enableTIDs: true});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({ bidsBackHandler: sendAdServerRequest });
oajs.que.push(function () {
oajs.setConfig({enableTIDs: true});
oajs.addAdUnits(adUnits);
oajs.requestBids({ bidsBackHandler: sendAdServerRequest });
});

function sendAdServerRequest() {
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync('div-gpt-ad-1460505748561-0');
oajs.que.push(function () {
oajs.setTargetingForGPTAsync('div-gpt-ad-1460505748561-0');
googletag.pubads().refresh();
});
});
Expand All @@ -75,7 +75,7 @@
<script>
googletag.cmd.push(function () {
googletag
.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0')
.defineSlot('/92296675/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0')
.addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
Expand Down
18 changes: 9 additions & 9 deletions test/pages/banner_sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>

<script>
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var oajs = oajs || {};
oajs.que = oajs.que || [];

// Prebid Banner Ad Unit
const adUnits = [{
Expand Down Expand Up @@ -56,16 +56,16 @@
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function () {
pbjs.setConfig({enableTIDs: true});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({ bidsBackHandler: sendAdServerRequest });
oajs.que.push(function () {
oajs.setConfig({enableTIDs: true});
oajs.addAdUnits(adUnits);
oajs.requestBids({ bidsBackHandler: sendAdServerRequest });
});

function sendAdServerRequest() {
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync('div-gpt-ad-1460505748561-0');
oajs.que.push(function () {
oajs.setTargetingForGPTAsync('div-gpt-ad-1460505748561-0');
googletag.pubads().refresh();
});
});
Expand All @@ -75,7 +75,7 @@
<script>
googletag.cmd.push(function () {
googletag
.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0')
.defineSlot('/92296675/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0')
.addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
Expand Down
26 changes: 13 additions & 13 deletions test/pages/bidderSettings.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}]

}, {
code: '/19968336/prebid_native_example_2',
code: '/92296675/prebid_native_example_2',
sizes: [
[1, 1]
],
Expand Down Expand Up @@ -54,8 +54,8 @@
}]
}];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var oajs = oajs || {};
oajs.que = oajs.que || [];

</script>

Expand All @@ -66,10 +66,10 @@
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function () {
pbjs.setConfig({enableTIDs: true});
pbjs.addAdUnits(adUnits);
pbjs.bidderSettings = {
oajs.que.push(function () {
oajs.setConfig({enableTIDs: true});
oajs.addAdUnits(adUnits);
oajs.bidderSettings = {
appnexus: {
adserverTargeting: [
{
Expand All @@ -86,18 +86,18 @@
]
}
}
pbjs.requestBids({
oajs.requestBids({
bidsBackHandler: sendAdserverRequest,
timeout: PREBID_TIMEOUT
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
if (oajs.adserverRequestSent) return;
oajs.adserverRequestSent = true;
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync();
oajs.que.push(function () {
oajs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
Expand All @@ -107,7 +107,7 @@

<script>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());
googletag.defineSlot('/92296675/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
googletag.enableServices();
Expand Down
24 changes: 12 additions & 12 deletions test/pages/currency.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}]

},{
code: '/19968336/prebid_native_example_2',
code: '/92296675/prebid_native_example_2',
sizes: [
[1, 1]
],
Expand Down Expand Up @@ -63,8 +63,8 @@
}]
}];

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var oajs = oajs || {};
oajs.que = oajs.que || [];

</script>

Expand All @@ -75,28 +75,28 @@
googletag.pubads().disableInitialLoad();
});

pbjs.que.push(function() {
pbjs.setConfig({
oajs.que.push(function() {
oajs.setConfig({
enableTIDs: true,
"currency": {
"adServerCurrency": "GBP",
"granularityMultiplier": 1,
"rates": { "USD": { "GBP": 0.80 }}
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
oajs.addAdUnits(adUnits);
oajs.requestBids({
bidsBackHandler: sendAdserverRequest,
timeout: PREBID_TIMEOUT
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
if (oajs.adserverRequestSent) return;
oajs.adserverRequestSent = true;
googletag.cmd.push(function() {
pbjs.que.push(function() {
pbjs.setTargetingForGPTAsync('div-gpt-ad-1460505748561-0');
oajs.que.push(function() {
oajs.setTargetingForGPTAsync('div-gpt-ad-1460505748561-0');
googletag.pubads().refresh();
});
});
Expand All @@ -110,7 +110,7 @@

<script>
googletag.cmd.push(function () {
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());
googletag.defineSlot('/92296675/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());

googletag.pubads().enableSingleRequest();
googletag.enableServices();
Expand Down
22 changes: 11 additions & 11 deletions test/pages/instream.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

<script>

var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var oajs = oajs || {};
oajs.que = oajs.que || [];

/*
Prebid Video adUnit
Expand All @@ -48,39 +48,39 @@
]
};

pbjs.que.push(function(){
pbjs.onEvent('auctionEnd', function() {
console.log(pbjs.getAdserverTargeting('video1'));
oajs.que.push(function(){
oajs.onEvent('auctionEnd', function() {
console.log(oajs.getAdserverTargeting('video1'));
let pEl = document.createElement('p');
pEl.innerText = 'PREBID HAS FINISHED';
pEl.id = 'statusText';
let parDiv = document.getElementById('event-window');
parDiv.appendChild(pEl);
});

pbjs.addAdUnits(videoAdUnit);
pbjs.setConfig({
oajs.addAdUnits(videoAdUnit);
oajs.setConfig({
enableTIDs: true,
debug: true,
cache: {
useLocal: true,
}
});
pbjs.requestBids({
oajs.requestBids({
timeout: 10000,
bidsBackHandler : function(bids) {
var videoUrl = pbjs.adServers.gam.buildVideoUrl({
var videoUrl = oajs.adServers.gam.buildVideoUrl({
adUnit: videoAdUnit,
params: {
iu: '/19968336/prebid_cache_video_adunit'
iu: '/92296675/prebid_cache_video_adunit'
}
});

invokeVideoPlayer(videoUrl);
}
});
});
pbjs.bidderSettings = {
oajs.bidderSettings = {
appnexus: {
bidCpmAdjustment: function() {
return 10.00;
Expand Down
Loading
Loading