Skip to content

Instantly share code, notes, and snippets.

@roablep
Created October 15, 2014 18:24
Show Gist options
  • Save roablep/f7d4de20bf76a8d09f3c to your computer and use it in GitHub Desktop.
Save roablep/f7d4de20bf76a8d09f3c to your computer and use it in GitHub Desktop.
Polar updates for discussion
// Check to see if secondarypage has been configured
if(typeof config.configureSecondaryPage === "undefined"){
//
if(typeof window["CN"].polar.configureSecondaryPage === "undefined"){
}
}
{
binding: {
sponsor: {
link: '#polar-sponsor-link',
logo: '#polar-sponsor-logo',
name: '#polar-sponsor-name'
},
title: '#polar-title',
summary: '#polar-summary',
content: '#polar-content',
author: '#polar-author',
pubDate: '#polar-pubDate',
image: {
href: '#polar-image-href',
caption: '#polar-image-caption',
credits: '#polar-image-credits'
}
},
onFill: '',
onRender: ''
onError: ''
}
// Allow brands to set secondarypage; default to fallbacks
if(typeof config.configureSecondaryPage !== "undefined"){
ads.configureSecondaryPage({
binding: {
sponsor: {
link: config.configureSecondaryPage.binding.sponsor.link || '#polar-sponsor-link',
logo: config.configureSecondaryPage.binding.sponsor.logo || '#polar-sponsor-logo',
name: config.configureSecondaryPage.binding.sponsor.name || '#polar-sponsor-name'
},
title: config.configureSecondaryPage.binding.title || '#polar-title',,
summary: config.configureSecondaryPage.binding.summary || '#polar-summary',
content: config.configureSecondaryPage.binding.content || '#polar-content',
author: config.configureSecondaryPage.binding.author || '#polar-author',
pubDate: config.configureSecondaryPage.binding.pubDate || '#polar-pubDate',,
image: {
href: config.configureSecondaryPage.binding.image.href || '#polar-image-href',
caption: config.configureSecondaryPage.binding.image.caption || '#polar-image-caption',
credits: config.configureSecondaryPage.binding.image.credits || '#polar-image-credits'
}
},
onFill: config.configureSecondaryPage.onFill || window["CN"].polar.configureSecondaryPage.onFill,
onRender: config.configureSecondaryPage.onRender || window["CN"].polar.configureSecondaryPage.onRender,
onError: config.configureSecondaryPage.onError || window["CN"].polar.configureSecondaryPage.onError,
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment