nicksergeant/humanitybox

Support options for multiple IAB standard ad sizes.

nicksergeant opened this issue · 4 comments

300x250, 728x90, 468x60, etc.

@jonnykry awesome, thanks.

So my plan for this is to change the way we're delivering the ad code. Instead of https://d21djfthp4qopy.cloudfront.net/humanitybox.js simply writing to the document, I'd like to have the embed code offer configuration options, so they can be customized in-line.

The embed code might look something like this:

<script type="text/javascript">
  var _humanitybox = { size: '300x250', channel: 'medical' };
</script>
<script type="text/javascript" src="https://d21djfthp4qopy.cloudfront.net/humanitybox.js"></script>

Then the JS that's loaded checks for the global humanitybox object, and if it does not exist, it does exactly what it does right now: writes directly to document.

If the humanitybox object does exist, it reads the configuration details and writes to document with the appropriate HTML.