-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscreen.html
162 lines (124 loc) · 4.66 KB
/
screen.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!doctype html>
<html>
<head>
<title>Kasi Nametest</title>
<script src="https://connect.facebook.net/en_US/fbinstant.6.3.js"></script>
</head>
<body id=bb style="background-image:url(resource/kasi_bg.jpg);background-size:100% auto;background-position:0 0;text-align:center;padding-top:140px;" >
<iframe id=four_target src="//rcm-na.amazon-adsystem.com/e/cm?o=1&p=48&l=ur1&category=instruments&banner=0JB0A4VDS5FZSF8J66G2&f=ifr&linkID=957b6056e810aaba8d6734b832d49fbf&t=productlists4-20&tracking_id=productlists4-20" width="468" height="60" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>
<div class=forward >
<script>
var affiliates = ["//rcm-na.amazon-adsystem.com/e/cm?o=1&p=48&l=ur1&category=instruments&banner=0JB0A4VDS5FZSF8J66G2&f=ifr&linkID=957b6056e810aaba8d6734b832d49fbf&t=productlists4-20&tracking_id=productlists4-20",
"//rcm-na.amazon-adsystem.com/e/cm?o=1&p=26&l=ur1&category=amazonhomepage&f=ifr&linkID=395a3797c0390ce90b0909dac625fbf4&t=productlists4-20&tracking_id=productlists4-20",
"//rcm-na.amazon-adsystem.com/e/cm?o=1&p=26&l=ur1&category=bestsellingproducts&banner=1F8VTV49P7N5K5XY5N82&f=ifr&linkID=62fbaa2c4f1eadfd296f4e00a685b4c2&t=productlists4-20&tracking_id=productlists4-20",
"//rcm-na.amazon-adsystem.com/e/cm?o=1&p=48&l=ur1&category=instruments&banner=1F5XAJEA6KXT7JPXEC02&f=ifr&linkID=e4ae1c402faaed3fc1483d4072b07ade&t=productlists4-20&tracking_id=productlists4-20",
"https://www.productlists.co.za/services/air_bnb/index.html"];
var index = 0;
function four_next(){
if(index<affiliates.length){
e('four_target').src = affiliates[index];
index++;
}else{
index = 0;
}
}
setInterval(function(){
four_next();
},14000);
</script>
</div>
<script>
var location_s = "resource/rr/";
var kasi_s =
[
"gugulethu.png",
"khayelitsha.png",
"sosha.png",
"soweto.png",
"thembisa.png",
"umlazi.png",
"kwamashu.png"
];
FBInstant.initializeAsync()
.then(function(){
FBInstant.startGameAsync()
.then(function() {
alert('Hello '+FBInstant.player.getName());
for (var i=0; i < kasi_s.length; i++) {
var assetName = kasi_s[i];
var progress = ((i+1)/kasi_s.length) * 100;
game.load.image(location_s+assetName);
// Informs the SDK of loading progress
FBInstant.setLoadingProgress(progress);
}
// Retrieving context and player information can only be done
// once startGameAsync() resolves
var contextId = FBInstant.context.getID();
var contextType = FBInstant.context.getType();
});
}
);
</script>
<h1 id=title >Which Mzansi Kasi Are You From?</h1>
<p id=subject >
<strong>Type in your name to find out:</strong><br>
<input type=text id=u_name /><button onclick="start();" >START</button>
<script>
// document.getElementById("u_name").value = FBInstant.player.getName();
</script>
</p>
<p id=final style="display:none;font-size:1.5em;background-color:rgba(0,0,100,0.5);width:200px;" >
<a href="https://facebook.com/sharer.php?u=https://www.productlists.co.za/services/kasi_nametest/screen.html" target="_blank" style="color:red;text-decoration:none;" >Share</a> -
<a href=# onclick=re_start(); style="color:red;text-decoration:none;" >Restart</a>
</p>
<script>
var title_s =
[
"Gugulethu",
"Khayelitsha",
"Sosha",
"Soweto",
"Thembisa",
"Umlazi",
"Kwamashu"
];
var nn;
var ii;
function start(){
nn = document.getElementById("u_name").value;
ii = 0;
if(nn.length>=3){
if(/[q-z].*/.test(nn)){
while(ii<=1){
ii = Math.round(Math.random()*4);
}
}else if(/[a-j].*/.test(nn)){
ii = Math.round(Math.random()*1);
}else if(/[k-p].*/.test(nn)){
while(ii<=4){
ii = Math.round(Math.random()*6);
}
}
document.getElementById("bb").style.backgroundImage = "url("+location_s+kasi_s[ii]+")";
document.getElementById("title").innerHTML = nn+" you are from "+title_s[ii];
document.getElementById("title").style.color = "red";
document.getElementById("subject").style.display = "none";
document.getElementById("final").style.display = "inline-block";
}else{
alert("Name must be atleast three letters.");
}
}
function re_start(){
document.getElementById("bb").style.backgroundImage = "url(resource/kasi_bg.jpg)";
document.getElementById("title").innerHTML = "Which Mzansi Kasi Are You From?";
document.getElementById("title").style.color = "black";
document.getElementById("subject").style.display = "";
document.getElementById("final").style.display = "none";
preloadedInterstitial.showAsync()
.then(function() {
console.log('Interstitial ad finished successfully');
});
}
</script>
</body>
</html>