UNPKG

safeframe

Version:

SafeFrame provides a consistent JS API to include 3rd party content

133 lines (108 loc) 3.65 kB
<!DOCTYPE html> <html> <head> <title>Pushdown: Rising Stars with SafeFrame</title> <link type="text/css" rel="stylesheet" href="samp.css" /> </head> <body> <div id="center"> <div id="topBar" > <div id="contentLogo" class="mockContent"></div> <div id="contentNav" class="mockContent"> <script type="text/javascript" src="risingstarnav.js" ></script> </div> </div> <div id="adUnitWrapper" class="asWrapper" > <div id="pushdownAdDiv"></div> </div> <div id="contentTop" class="mockContent"> <h1>Pushdown Rising Star Ad</h1> </div> <div id="contentRight" class="mockContent"> <div id="logger"></div> </div> <div id="contentLeft" class="mockContent"> <div> <em>The Pushdown is a large pushdown teaser running the full width of the page with expandability.</em> <p> A unit that displays a teaser image/swf initially. This type of expansion affects the entire unit. A teaser image/swf is shown until the user hovers over/clicks on the expansion button. </p> <p> The full unit then slides vertically or horizontally into view from the edge of the teaser, in the direction the arrow in the expansion button was pointing toward. </p> <ul> <li> <a href="http://www.iab.net/risingstars" target="_blank">... More on IAB Rising Star ad units</a> </li> </div> </div> <div id="contentBottom" class="mockContent"></div> </div> <script type='text/x-safeframe' class='sf_data'> { "id": "pushdownAd", // relative source is relative to the r.html bootstrap file "../../examples/IAB_RisingStars/AdFiles/pushdownAdBootstrap.js", // ALWAYS USE ABSOLUTE SOURCES "src": "http://safeframes.emination.com/risingStars/adfiles/pushdownAdBootstrap.js", "conf": { "w": 970, "h": 90, "dest": "pushdownAdDiv", "supports" : { "exp-push" : "1", "read-cookie" : "1", "write-cookie" : "1" } } } </script> <!-- INCLUDES OF THE SAFEFRAMES FRAMEWORK These script files should be hosted on your CDN from a different top level domain from the host site. --> <!-- local version <script type="text/javascript" src="../../src/js/lib/base.js"></script> <script type="text/javascript" src="../../src/js/host/host.js"></script> <script type="text/javascript" src="../../src/js/lib/boot.js"></script> --> <script type="text/javascript" src="https://s3-us-west-2.amazonaws.com/safeframe/refimpl/1-0-3/js/lib/base.js"></script> <script type="text/javascript" src="https://s3-us-west-2.amazonaws.com/safeframe/refimpl/1-0-3/js/host/host.js"></script> <script type="text/javascript" src="https://s3-us-west-2.amazonaws.com/safeframe/refimpl/1-0-3/js/lib/boot.js"></script> <script type="text/javascript"> function posMessageCallback(id, msgName, data){ if(msgName == "error"){ var log = document.getElementById("logger"); var msg = ["error in ad ", id]; if(data && data.errors){ msg.push(data.errors); } msg.push("<br/>"); log.innerHTML += msg.join(""); } } /** * Initialize a new SafeFrames publisher configuration */ (function() { var conf = new $sf.host.Config({ // Should be absolute path to render file hosted on CDN "../../src/html/r.html", //renderFile: "http://s3-us-west-2.amazonaws.com/safeframe/refimpl/1-0-3/html/r.html", renderFile: "http://s3-us-west-2.amazonaws.com/safeframe/refimpl/1-0-3/html/r.html", onPosMsg: posMessageCallback, positions: {} }); })(); </script> <script type='text/javascript' src='http://safeframes.net/google_analytics_sfnet.js' ></script> </body> </html>