-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcloseInterstitial.html
66 lines (58 loc) · 2.57 KB
/
closeInterstitial.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<body>
<script>
function onAdsLoaded(response) {
if (response.status == "ok") {
var ad;
var html;
for (var i = 0; i < response.ads.length; i++) {
ad = response.ads[i];
if (ad.status == "ok" ) {
if (ad.type == "script") {
theKid = '<div id="mOverLay-container" style="position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 2147483647;"></div>';
document.getElementsByTagName("BODY")[0].innerHTML += theKid;
var html = '';
html += '<div style="height: 100%;">';
html += '<div id="apps-ad">';
html += '<div id="banner-ad">';
html += '<div id="banner-close"></div>';
html += '<div id="banner-wrapper" style="width: 100%; height: 100%; position: absolute; background-color: rgba(0, 0, 0, 0.7)">';
html += '<table width="100%" height="100%"><tr valign="center"><td align="center">';
html += '<div id="banner-close-monkey" style="width: 40px; position: absolute; right: 5px; top:5px; cursor:pointer" align="right" style="z-index: 2147483647"><img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRFz_6cmSl7TexEwfLnB7kThYYetMJmT1VnaGm3QUoFmE69CiOH" width="40"></div></br>';
html += '<iframe id="myIframeId" frameborder="0" scrolling="no">';
html += '</iframe>';
html += '</td></tr></table>';
html += '</div>';
html += '</div>';
html += '</div>';
html += '</div>';
document.getElementById("mOverLay-container").innerHTML += html;
var s = document.createElement("script");
var inlineScript = document.createTextNode(ad.script);
s.appendChild(inlineScript);
var myIframe = document.getElementById("myIframeId");
myIframe.contentWindow.document.body.appendChild(s);
document.getElementById("banner-close-monkey").onclick = function() {
document.getElementById("mOverLay-container").remove();
};
}
} else {
console.log(ad.cpm);
//document.write("<div>status="+ad.status+"</div>");
}
}
}
}
</script>
<!-- Begin Rubicon Project Tag -->
<!-- Site: Antoine-test Zone: testZoneAntoine Size: Medium Rectangle -->
<script language="JavaScript" type="text/javascript">
rp_account = '8263';
rp_site = '148426';
rp_zonesize = '703002-2';
rp_adtype = 'jsonp';
rp_callback = onAdsLoaded;
rp_smartfile = '[SMART FILE URL]';
</script>
<script type="text/javascript" src="https://ads.rubiconproject.com/ad/8263.js"></script>
<!-- End Rubicon Project Tag -->
</body>