-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtest.html
72 lines (64 loc) · 2.09 KB
/
test.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
66
67
68
69
70
71
72
<div id="adContainer">
<div class="closeButton" onclick="closeAd()">×</div>
<div class="adContent">
<p class="adMessage">❤️ This site runs on ads ❤️</p>
<script>
var afg = {};
afg.u = 6289;
afg.s = 7;
document.write("<scr" + "ipt src='//js.adforgames.com/cd.js'></scr" + "ipt>");
</script>
</div>
</div>
<script>
function showAdContainer() {
document.getElementById('adContainer').style.display = 'block';
}
function closeAd() {
document.getElementById('adContainer').style.display = 'none';
}
// Show the ad container after a 5-second delay
setTimeout(() => {
showAdContainer();
// Set a 2-minute interval to display the ad again
setInterval(showAdContainer, 120000);
}, 5000);
</script>
<style>
/* Ad container style */
#adContainer {
width: 600px; /* Set a specific width for the popup */
height: auto; /* Allow height to adjust based on content */
position: fixed;
top: 20%; /* Position down from the top */
left: 50%;
transform: translateX(-50%);
background-color: #121212; /* Same background color as the ad */
display: none; /* Hide the ad container initially */
z-index: 1000; /* Ensure the ad is above other content */
border-radius: 10px; /* Rounded corners */
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5); /* Shadow for depth */
padding: 20px; /* Padding around the content */
text-align: center; /* Center text */
}
.closeButton {
position: absolute;
top: 5px;
right: 5px;
font-size: 24px;
color: #fff;
cursor: pointer;
width: 30px;
height: 30px;
background-color: #333;
border-radius: 5px;
display: flex;
justify-content: center;
align-items: center;
}
.adMessage {
color: #fff; /* White text color */
font-size: 18px; /* Font size */
margin: 10px 0; /* Margin around the message */
}
</style>