Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #560 from brandonbk/injection-top
Browse files Browse the repository at this point in the history
Add desktopLeaderboard injection support
  • Loading branch information
brandonbk authored Feb 8, 2023
2 parents fd9f78e + dd07125 commit b3d2bfd
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ $ const aliases = getAsArray(input, 'aliases');
$ const selector = defaultValue(input.selector, `content-body-${content.id}`);

<!-- Desktop Inline Ad props -->
$ const desktopAdCounts = defaultValue(input.desktopAdCounts, [350, 1500, 2750, 4500, 6250, 8000, 9750, 11500, 13250, 15000, 16750, 18500]);
$ const desktopAdCounts = defaultValue(input.desktopAdCounts, [1500, 2750, 4500, 6250, 8000, 9750, 11500, 13250, 15000, 16750, 18500]);
$ const desktopAdName = defaultValue(input.desktopAdName, "inline-content-desktop");
$ const desktopAdModifiers = defaultValue(input.desktopAdModifiers, ["margin-auto-x", "inline-content", "inline-content-desktop"]);
$ const desktopAdDataPropToPreventDupes = defaultValue(input.desktopAdDataPropToPreventDupes, "gamTemplateName");

<!-- Desktop Leaderboard Ad props -->
$ const desktopLeaderboardAdCounts = defaultValue(input.desktopLeaderboardAdCounts, [350]);
$ const desktopLeaderboardAdName = defaultValue(input.desktopLeaderboardAdName, desktopAdName);
$ const desktopLeaderboardAdModifiers = defaultValue(input.desktopLeaderboardAdModifiers, desktopAdModifiers);
$ const desktopLeaderboardAdDataPropToPreventDupes = defaultValue(input.desktopLeaderboardAdDataPropToPreventDupes, desktopAdDataPropToPreventDupes);

<!-- Mobile Inline Ad props -->
$ const mobileAdCounts = defaultValue(input.mobileAdCounts, [900, 1650, 2950, 4250, 5550, 6850, 8150, 9450, 10750, 12050, 13350, 14650, 15950, 17250]);
$ const mobileAdName = defaultValue(input.mobileAdName, "inline-content-mobile");
Expand All @@ -31,6 +37,12 @@ $ const mobileLeaderboardAdDataPropToPreventDupes = defaultValue(input.mobileLea

<!-- Only set GAM defaults if GAM is present on out.global -->
$ const gamAdInjection = (GAM) ? [
{
counts: desktopLeaderboardAdCounts,
name: desktopLeaderboardAdName,
modifiers: desktopLeaderboardAdModifiers,
dataPropToPreventDupes: desktopLeaderboardAdDataPropToPreventDupes
},
{
counts: desktopAdCounts,
name: desktopAdName,
Expand Down

0 comments on commit b3d2bfd

Please sign in to comment.