• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

prebid / Prebid.js / 18936889995

30 Oct 2025 10:03AM UTC coverage: 96.239% (+0.006%) from 96.233%
18936889995

push

github

web-flow
Core: fix bug with DNT lookup throwing exceptions when in an iframe (#14081)

* refactor doNotTrack

* Remove duplicate getDNT

52638 of 64479 branches covered (81.64%)

45 of 45 new or added lines in 31 files covered. (100.0%)

27 existing lines in 12 files now uncovered.

201571 of 209448 relevant lines covered (96.24%)

124.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

81.82
/modules/screencoreBidAdapter.js
1
import { registerBidder } from '../src/adapters/bidderFactory.js';
1✔
2
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
3
import { getStorageManager } from '../src/storageManager.js';
4
import {
5
  createBuildRequestsFn,
6
  createInterpretResponseFn,
7
  createUserSyncGetter,
8
  isBidRequestValid,
9
} from '../libraries/vidazooUtils/bidderUtils.js';
10

11
const BIDDER_CODE = 'screencore';
1✔
12
const GVLID = 1473;
1✔
13
const BIDDER_VERSION = '1.0.0';
1✔
14
const REGION_SUBDOMAIN_SUFFIX = {
1✔
15
  EU: 'taqeu',
16
  US: 'taqus',
17
  APAC: 'taqapac',
18
};
19

20
/**
21
 * Get subdomain URL suffix by region
22
 * @return {string}
23
 */
24
function getRegionSubdomainSuffix() {
25
  try {
16✔
26
    const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
16✔
27
    const region = timezone.split('/')[0];
16✔
28

29
    switch (region) {
16!
30
      case 'Asia':
31
      case 'Australia':
32
      case 'Antarctica':
33
      case 'Pacific':
34
      case 'Indian':
35
        return REGION_SUBDOMAIN_SUFFIX['APAC'];
×
36
      case 'Europe':
37
      case 'Africa':
38
      case 'Atlantic':
39
      case 'Arctic':
UNCOV
40
        return REGION_SUBDOMAIN_SUFFIX['EU'];
×
41
      case 'America':
42
        return REGION_SUBDOMAIN_SUFFIX['US'];
16✔
43
      default:
44
        return REGION_SUBDOMAIN_SUFFIX['EU'];
×
45
    }
46
  } catch (err) {
47
    return REGION_SUBDOMAIN_SUFFIX['EU'];
×
48
  }
49
}
50

51
export const storage = getStorageManager({ bidderCode: BIDDER_CODE });
1✔
52

53
export function createDomain() {
54
  const subDomain = getRegionSubdomainSuffix();
16✔
55

56
  return `https://${subDomain}.screencore.io`;
16✔
57
}
58

59
const buildRequests = createBuildRequestsFn(createDomain, null, storage, BIDDER_CODE, BIDDER_VERSION, false);
1✔
60

61
const interpretResponse = createInterpretResponseFn(BIDDER_CODE, false);
1✔
62

63
const getUserSyncs = createUserSyncGetter({
1✔
64
  iframeSyncUrl: 'https://cs.screencore.io/api/sync/iframe',
65
  imageSyncUrl: 'https://cs.screencore.io/api/sync/image',
66
});
67

68
export const spec = {
1✔
69
  code: BIDDER_CODE,
70
  version: BIDDER_VERSION,
71
  gvlid: GVLID,
72
  supportedMediaTypes: [BANNER, VIDEO, NATIVE],
73
  isBidRequestValid,
74
  buildRequests,
75
  interpretResponse,
76
  getUserSyncs,
77
};
78

79
registerBidder(spec);
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc