Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions src/components/AdSlot/WunderkindAd.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
import { onMount } from 'svelte';

onMount(() => {
// Check user login status
let isLoggedIn = localStorage.getItem('ArcId.USER_PROFILE') !== null;
if (!isLoggedIn) {
const script = document.createElement('script');
script.textContent = `p
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the p here intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, apologies, that was a mistype. I will rectify that.

freestar.config.enabled_slots.push({
placementName: 'reuters_1x1_bouncex',
slotId: 'reuters_1x1_bouncex',
});
`;
script.setAttribute('data-cfasync', 'false');
script.type = 'text/javascript';
document.head.appendChild(script);
}
});
</script>

<div id="reuters_1x1_bouncex"></div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain if this div displays an ad, how that behaves and how this ad unit interplays with our existing InlineAd component, if at all? E.g., should we prefer this ad unit and fallback to an InlineAd if the user is not logged in? Something else?

1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export { default as Theme, themes } from './components/Theme/Theme.svelte';
export { default as ToolsHeader } from './components/ToolsHeader/ToolsHeader.svelte';
export { default as Video } from './components/Video/Video.svelte';
export { default as Visible } from './components/Visible/Visible.svelte';
export { default as WunderkindAd } from './components/AdSlot/WunderkindAd.svelte';

// Utilities
export { getEndNotesPropsFromDoc } from './components/EndNotes/docProps.js';
Expand Down