Created
July 31, 2015 14:58
-
-
Save stuwilli/000f3e8cc1fecef67cdc to your computer and use it in GitHub Desktop.
MRAID Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="mraid.js"></script> | |
<script> | |
function redirect(){ | |
mraid.open(""); | |
} | |
function close() { | |
mraid.close(); | |
} | |
(function() { | |
mraid.useCustomClose(true); | |
var width = 320; | |
var element = document.querySelector("meta[name=viewport]"); | |
if (!element) { | |
element = document.createElement("meta"); | |
element.name = "viewport"; | |
element.content = "width=" + width + ", user-scalable=no"; | |
document.getElementsByTagName('head')[0].appendChild(element); | |
} else { | |
element.content = "width=" + width + ", user-scalable=no"; | |
} | |
})(); | |
</script> | |
<a id="closeEventRegion" style="height: 32px; width: 32px; display: block; text-decoration: none; position: absolute; z-index: 2; cursor: pointer; top: 15px; right: 5px; background: url(http://discoveryint1.edgeboss.net/download/discoveryint1/ads/close-button.png) 0px 0px no-repeat;"></a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment