Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
RishiRecon
GitHub Repository: RishiRecon/exploits
Path: blob/main/misc/smashkarts/scripts/ads-adsbygoogle-v2.js
36008 views
1
'use strict';
2
3
function requestMainMenuBanner()
4
{
5
if(!isMobile())
6
{
7
aiptag.cmd.display.push(function() { aipDisplayTag.display('smashkarts-io_300x250')});
8
}
9
}
10
11
function requestWinCeremonyBanner(interstialRequested)
12
{
13
if(!isMobile())
14
{
15
aiptag.cmd.display.push(function() { aipDisplayTag.display('smashkarts-io_300x250_2')});
16
}
17
}
18
19
20
function requestLongBanner()
21
{
22
if(!isMobile())
23
{
24
//aiptag.cmd.display.push(function() { aipDisplayTag.display('smashkarts-io_728x90')});
25
aiptag.cmd.display.push(function() { aipDisplayTag.display('smashkarts-io_970x250')});
26
}
27
else
28
{
29
//aiptag.cmd.display.push(function() { aipDisplayTag.display('smashkarts-io_320x100')});
30
}
31
}
32
33
function showInterstitial(unusedParam, interstitialType, interstitialName)
34
{
35
// var audioOnStr = audioOn ? 'on' : 'off';
36
// adConfig({
37
// sound: audioOnStr,
38
// });
39
40
if(adBreak != null)
41
{
42
adBreak({
43
44
type: interstitialType, // ad shows at start of next level
45
name: interstitialName,
46
beforeBreak: interstitialStart,
47
afterBreak: interstitialComplete
48
});
49
}
50
}
51
52
53
var onShowRewardedVideoClicked = null;
54
55
function tryInitRewardedInterstitial(unusedParam)
56
{
57
if(adBreak != null)
58
{
59
adBreak({
60
type: 'reward', // The type of this placement
61
name: 'rewardedxpboost', // A descriptive name for this placement
62
beforeAd: () => {interstitialStart();}, // Prepare for the ad. Mute and pause the game flow
63
afterAd: () => {console.log("tryInitRewardedInterstitials afterAd");}, // Resume the game and re-enable sound
64
beforeReward: (showAdFn) => { console.log("set onShowRewardedVideoClicked"); rewardedInterstitialAvailable(); onShowRewardedVideoClicked = showAdFn }, // Show reward prompt (call showAdFn() if clicked)
65
adDismissed: () => {interstitialSkipped();}, // Player dismissed the ad before it finished.
66
adViewed: () => {interstitialComplete();}, // Player watched the ad–give them the reward.
67
adBreakDone: (placementInfo) => {console.log("tryInitRewardedInterstitials adBreakDone");}, // Always called (if provided) even if an ad didn’t show
68
});
69
}
70
}
71
72
function tryShowRewardedInterstitial(unusedParam)
73
{
74
if(onShowRewardedVideoClicked != null)
75
{
76
onShowRewardedVideoClicked();
77
}
78
}
79
80
function rewardedInterstitialAvailable()
81
{
82
window.unityGame.SendMessage(unityFirebaseGameOjbectName, "RewardedInterstitialAvailable");
83
}
84
85