coop182/jquery.dfp.js — pull request #21 by crccheck (2013-04-30 01:37:11+00:00)
Title: Add ability to monkey patch window.googletag

So far, I've only used it to override googletag.display.
Useful for ads that aren't in doubleclick yet, for debugging css, and
creating live mocks.

I'm sure there are other potential uses.

### Example
For example, this is the code I'm using:

dfpOptions.googletag = {
display: function (id) {
var $elem = $('#' + id),
dimBits = $elem.attr('data-dimensions').split('x'),
name = $elem.attr('data-adunit');
console.log('display', id, dimBits);
$('

')
.css({
background: 'deeppink',
border: 0,
color: 'black',
fontSize: '0.9em',
lineHeight: dimBits[1] + 'px',
margin: 0,
overflow: 'hidden',
padding: 0,
textAlign: 'center',
textOverflow: 'ellipses'
})
.text(name)
.width(dimBits[0]).height(dimBits[1])
.appendTo($elem);
$elem.addClass('display-block');
}
};

To render alternate ads that look like this:
![screen shot 2013-04-29 at 8 25 51 pm](https://f.cloud.github.com/assets/189908/442057/40b12532-b135-11e2-94fc-45d6754a667a.png)