Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-ad-adcolony

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-ad-adcolony - npm Package Compare versions

Comparing version 1.0.42 to 1.0.43

2

package.json
{
"name": "cordova-plugin-ad-adcolony",
"version": "1.0.42",
"version": "1.0.43",
"description": "Show adcolony interstitial ad and rewarded video ad",

@@ -5,0 +5,0 @@ "cordova": {

@@ -71,7 +71,7 @@ Cordova AdColony plugin

var appId = "REPLACE_THIS_WITH_YOUR_APP_ID";
var fullScreenAdZoneId = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_ZONE_ID";
var interstitialAdZoneId = "REPLACE_THIS_WITH_YOUR_INTERSTITIAL_AD_ZONE_ID";
var rewardedVideoAdZoneId = "REPLACE_THIS_WITH_YOUR_REWARDED_VIDEO_AD_ZONE_ID";
/*
var appId;
var fullScreenAdZoneId;
var interstitialAdZoneId;
var rewardedVideoAdZoneId;

@@ -81,3 +81,3 @@ //android

appId = "REPLACE_THIS_WITH_YOUR_APP_ID";
fullScreenAdZoneId = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_ZONE_ID";
interstitialAdZoneId = "REPLACE_THIS_WITH_YOUR_INTERSTITIAL_AD_ZONE_ID";
rewardedVideoAdZoneId = "REPLACE_THIS_WITH_YOUR_REWARDED_VIDEO_AD_ZONE_ID";

@@ -88,3 +88,3 @@ }

appId = "REPLACE_THIS_WITH_YOUR_APP_ID";
fullScreenAdZoneId = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_ZONE_ID";
interstitialAdZoneId = "REPLACE_THIS_WITH_YOUR_INTERSTITIAL_AD_ZONE_ID";
rewardedVideoAdZoneId = "REPLACE_THIS_WITH_YOUR_REWARDED_VIDEO_AD_ZONE_ID";

@@ -99,13 +99,13 @@ }

window.adcolony.setUp(appId, fullScreenAdZoneId, rewardedVideoAdZoneId);
window.adcolony.setUp(appId, interstitialAdZoneId, rewardedVideoAdZoneId);
//
window.adcolony.onFullScreenAdLoaded = function() {
alert('onFullScreenAdLoaded');
window.adcolony.onInterstitialAdLoaded = function() {
alert('onInterstitialAdLoaded');
};
window.adcolony.onFullScreenAdShown = function() {
alert('onFullScreenAdShown');
window.adcolony.onInterstitialAdShown = function() {
alert('onInterstitialAdShown');
};
window.adcolony.onFullScreenAdHidden = function() {
alert('onFullScreenAdHidden');
window.adcolony.onInterstitialAdHidden = function() {
alert('onInterstitialAdHidden');
};

@@ -127,10 +127,10 @@ //

window.adcolony.showFullScreenAd();
window.adcolony.showInterstitialAd();
window.adcolony.showRewardedVideoAd();
alert(window.adcolony.loadedFullScreenAd());//boolean: true or false
alert(window.adcolony.loadedInterstitialAd());//boolean: true or false
alert(window.adcolony.loadedRewardedVideoAd());//boolean: true or false
alert(window.adcolony.isShowingFullScreenAd());//boolean: true or false
alert(window.adcolony.isShowingInterstitialAd());//boolean: true or false
alert(window.adcolony.isShowingRewardedVideoAd());//boolean: true or false

@@ -137,0 +137,0 @@ ```

module.exports = {
_loadedFullScreenAd: false,
_loadedInterstitialAd: false,
_loadedRewardedVideoAd: false,
_isShowingFullScreenAd: false,
_isShowingInterstitialAd: false,
_isShowingRewardedVideoAd: false,

@@ -18,3 +18,3 @@ //

},
setUp: function(appId, fullScreenAdZoneId, rewardedVideoAdZoneId) {
setUp: function(appId, InterstitialAdZoneId, rewardedVideoAdZoneId) {
var self = this;

@@ -27,20 +27,31 @@ cordova.exec(

//
if (result == "onFullScreenAdLoaded") {
self._loadedFullScreenAd = true;
if (result == "onInterstitialAdLoaded") {
self._loadedInterstitialAd = true;
//cranberrygame start; deprecated
if (self.onFullScreenAdLoaded)
self.onFullScreenAdLoaded();
//cranberrygame end
if (self.onInterstitialAdLoaded)
self.onInterstitialAdLoaded();
}
if (result == "onFullScreenAdShown") {
self._loadedFullScreenAd = false;
self._isShowingFullScreenAd = true;
else if (result == "onInterstitialAdShown") {
self._loadedInterstitialAd = false;
self._isShowingInterstitialAd = true;
//cranberrygame start; deprecated
if (self.onFullScreenAdShown)
self.onFullScreenAdShown();
self.onFullScreenAdShown();
//cranberrygame end
if (self.onInterstitialAdShown)
self.onInterstitialAdShown();
}
else if (result == "onFullScreenAdHidden") {
self._isShowingFullScreenAd = false;
else if (result == "onInterstitialAdHidden") {
self._isShowingInterstitialAd = false;
//cranberrygame start; deprecated
if (self.onFullScreenAdHidden)
self.onFullScreenAdHidden();
//cranberrygame end
if (self.onInterstitialAdHidden)
self.onInterstitialAdHidden();
}

@@ -86,5 +97,6 @@ //

'setUp',
[appId, fullScreenAdZoneId, rewardedVideoAdZoneId]
[appId, InterstitialAdZoneId, rewardedVideoAdZoneId]
);
},
//cranberrygame start; deprecated
showFullScreenAd: function() {

@@ -99,2 +111,12 @@ cordova.exec(

},
//cranberrygame end
showInterstitialAd: function() {
cordova.exec(
null,
null,
'AdColonyPlugin',
'showInterstitialAd',
[]
);
},
showRewardedVideoAd: function() {

@@ -109,17 +131,32 @@ cordova.exec(

},
//cranberrygame start; deprecated
loadedFullScreenAd: function() {
return this._loadedFullScreenAd;
return this._loadedInterstitialAd;
},
//cranberrygame end
loadedInterstitialAd: function() {
return this._loadedInterstitialAd;
},
loadedRewardedVideoAd: function() {
return this._loadedRewardedVideoAd;
},
//cranberrygame start; deprecated
isShowingFullScreenAd: function() {
return this._isShowingFullScreenAd;
return this._isShowingInterstitialAd;
},
//cranberrygame end
isShowingInterstitialAd: function() {
return this._isShowingInterstitialAd;
},
isShowingRewardedVideoAd: function() {
return this._isShowingRewardedVideoAd;
},
//cranberrygame start; deprecated
onFullScreenAdLoaded: null,
onFullScreenAdShown: null,
onFullScreenAdHidden: null,
//cranberrygame end
onInterstitialAdLoaded: null,
onInterstitialAdShown: null,
onInterstitialAdHidden: null,
//

@@ -126,0 +163,0 @@ onRewardedVideoAdLoaded: null,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc