-
Notifications
You must be signed in to change notification settings - Fork 1
/
Google AdsMobs
41 lines (36 loc) · 1.07 KB
/
Google AdsMobs
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
// copy this to a custom
//https://weelookang.blogspot.com/2020/05/how-to-add-adsmob-into-ionic-4-ejss.html
function showRewardVideo() {
const e = new Event("click");
try { // allow code to run in normal browser
const element = parent.document.getElementById("banner");
element.dispatchEvent(e);
} catch(e) {
const element = false;
}
}
function showBannerAd() {
const e = new Event("click");
try { // allow code to run in Snormal browser
const element = parent.document.getElementById("reward");
element.dispatchEvent(e);
} catch(e) {
const element = false;
}
}
function showInterstitialAds() {
const e = new Event("click");
try { // allow code to run in normal browser
const element = parent.document.getElementById("interstitial");
element.dispatchEvent(e);
} catch(e) {
const element = false;
}
}
// copy this into a button to activate the ads
Text = "🎥⏮👍Support Ads"
// any of the 3 ads methods
OnClick =
showInterstitialAds(); // to activate this type of ads
showRewardVideo(); // etc
showBannerAd(); //etc