Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chromakode/adsandbox
Batched sandboxed ad demonstration
https://github.com/chromakode/adsandbox
Last synced: 23 days ago
JSON representation
Batched sandboxed ad demonstration
- Host: GitHub
- URL: https://github.com/chromakode/adsandbox
- Owner: chromakode
- License: bsd-2-clause
- Created: 2012-12-07T00:22:45.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2012-12-07T00:24:01.000Z (almost 12 years ago)
- Last Synced: 2024-04-09T21:08:55.677Z (7 months ago)
- Language: Python
- Size: 105 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple sandboxed multiple-frame ads
This code demonstrates a method of populating an arbitrary number of sandboxed ads from a single iframe.
Tested to work on IE6+, Firefox 3+, Chrome, Opera 11+.
An initial iframe "ad_main" is loaded, which contains information about all ads to be displayed on the page. The "ad_main" frame signals the parent page that "child" ad frames must be created via `postMessage` or a cross-domain iframe as a fallback. Child ad frames load a document containing a script that fetches their contents from the JavaScript scope of "ad_main".
To run this demo, you should create localhost aliases for "home.local" and "ads.local" in your `/etc/hosts` file (or similar):
127.0.0.1 home.local ads.local