New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-ad-admob

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.0.95 to 1.0.96

2

package.json
{
"name": "cordova-plugin-ad-admob",
"version": "1.0.95",
"version": "1.0.96",
"description": "Show admob banner and full screen ad",

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

@@ -82,2 +82,4 @@ Cordova AdMob plugin

Fixed wp8 build error
1.0.96
Changed name "full screen" to "interstitial"

@@ -227,3 +229,3 @@ To-Do:

```
## bannerAdUnit, fullScreenAdUnit ##
## bannerAdUnit, interstitialAdUnit ##
<img src="https://raw.githubusercontent.com/cranberrygame/cordova-plugin-ad-admob/master/doc/ad_unit1.png"><br>

@@ -256,3 +258,3 @@ <img src="https://raw.githubusercontent.com/cranberrygame/cordova-plugin-ad-admob/master/doc/ad_unit2.png"><br>

var bannerAdUnit = "REPLACE_THIS_WITH_YOUR_BANNER_AD_UNIT";
var fullScreenAdUnit = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_UNIT";
var interstitialAdUnit = "REPLACE_THIS_WITH_YOUR_INTERSTITIAL_AD_UNIT";
var isOverlap = true; //true: overlap, false: split

@@ -262,3 +264,3 @@ var isTest = true;

var bannerAdUnit;
var fullScreenAdUnit;
var interstitialAdUnit;
var isOverlap = true; //true: overlap, false: split

@@ -269,3 +271,3 @@ var isTest = true;

bannerAdUnit = "REPLACE_THIS_WITH_YOUR_BANNER_AD_UNIT";
fullScreenAdUnit = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_UNIT";
interstitialAdUnit = "REPLACE_THIS_WITH_YOUR_INTERSTITIAL_AD_UNIT";
}

@@ -275,3 +277,3 @@ //ios

bannerAdUnit = "REPLACE_THIS_WITH_YOUR_BANNER_AD_UNIT";
fullScreenAdUnit = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_UNIT";
interstitialAdUnit = "REPLACE_THIS_WITH_YOUR_INTERSTITIAL_AD_UNIT";
}

@@ -281,3 +283,3 @@ //wp8

bannerAdUnit = "REPLACE_THIS_WITH_YOUR_BANNER_AD_UNIT";
fullScreenAdUnit = "REPLACE_THIS_WITH_YOUR_FULL_SCREEN_AD_UNIT";
interstitialAdUnit = "REPLACE_THIS_WITH_YOUR_INTERSTITIAL_AD_UNIT";
}

@@ -291,3 +293,3 @@ */

window.admob.setUp(bannerAdUnit, fullScreenAdUnit, isOverlap, isTest);
window.admob.setUp(bannerAdUnit, interstitialAdUnit, isOverlap, isTest);

@@ -308,13 +310,13 @@ //

//
window.admob.onFullScreenAdPreloaded = function() {
alert('onFullScreenAdPreloaded');
window.admob.onInterstitialAdPreloaded = function() {
alert('onInterstitialAdPreloaded');
};
window.admob.onFullScreenAdLoaded = function() {
alert('onFullScreenAdLoaded');
window.admob.onInterstitialAdLoaded = function() {
alert('onInterstitialAdLoaded');
};
window.admob.onFullScreenAdShown = function() {
alert('onFullScreenAdShown');
window.admob.onInterstitialAdShown = function() {
alert('onInterstitialAdShown');
};
window.admob.onFullScreenAdHidden = function() {
alert('onFullScreenAdHidden');
window.admob.onInterstitialAdHidden = function() {
alert('onInterstitialAdHidden');
};

@@ -339,10 +341,10 @@ }, false);

window.admob.preloadFullScreenAd();//option, download ad previously for fast show
window.admob.showFullScreenAd();
window.admob.preloadInterstitialAd();//option, download ad previously for fast show
window.admob.showInterstitialAd();
alert(window.admob.loadedBannerAd());//boolean: true or false
alert(window.admob.loadedFullScreenAd());//boolean: true or false
alert(window.admob.loadedInterstitialAd());//boolean: true or false
alert(window.admob.isShowingBannerAd());//boolean: true or false
alert(window.admob.isShowingFullScreenAd());//boolean: true or false
alert(window.admob.isShowingInterstitialAd());//boolean: true or false
```

@@ -349,0 +351,0 @@ # Examples #


module.exports = {
_loadedBannerAd: false,
_loadedFullScreenAd: false,
_loadedInterstitialAd: false,
_isShowingBannerAd: false,
_isShowingFullScreenAd: false,
_isShowingInterstitialAd: false,
//

@@ -14,7 +14,7 @@ setLicenseKey: function(successCallback, errorCallback, args) {

setUp: function(successCallback, errorCallback, args) {
var adUnit = args[0];
var fullScreenAdUnit = args[1];
var bannerAdUnit = args[0];
var interstitialAdUnit = args[1];
var isOverlap = args[2];
var isTest = args[3];
Com.Cranberrygame.Cordova.Plugin.Ad.AdMob.AdMobPlugin.setUp(adUnit, fullScreenAdUnit, isOverlap, isTest);
Com.Cranberrygame.Cordova.Plugin.Ad.AdMob.AdMobPlugin.setUp(bannerAdUnit, interstitialAdUnit, isOverlap, isTest);
/*

@@ -46,24 +46,24 @@ if (typeof result == "string") {

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

@@ -95,7 +95,7 @@ }

//
preloadFullScreenAd: function(successCallback, errorCallback, args) {
Com.Cranberrygame.Cordova.Plugin.Ad.AdMob.AdMobPlugin.preloadFullScreenAd();
preloadInterstitialAd: function(successCallback, errorCallback, args) {
Com.Cranberrygame.Cordova.Plugin.Ad.AdMob.AdMobPlugin.preloadInterstitialAd();
},
showFullScreenAd: function(successCallback, errorCallback, args) {
Com.Cranberrygame.Cordova.Plugin.Ad.AdMob.AdMobPlugin.showFullScreenAd();
showInterstitialAd: function(successCallback, errorCallback, args) {
Com.Cranberrygame.Cordova.Plugin.Ad.AdMob.AdMobPlugin.showInterstitialAd();
},

@@ -106,4 +106,4 @@ /*

},
loadedFullScreenAd: function() {
return this._loadedFullScreenAd;
loadedInterstitialAd: function() {
return this._loadedInterstitialAd;
},

@@ -113,4 +113,4 @@ isShowingBannerAd: function() {

},
isShowingFullScreenAd: function() {
return this._isShowingFullScreenAd;
isShowingInterstitialAd: function() {
return this._isShowingInterstitialAd;
},

@@ -123,6 +123,6 @@ */

//
onFullScreenAdPreloaded: null,
onFullScreenAdLoaded: null,
onFullScreenAdShown: null,
onFullScreenAdHidden: null
onInterstitialAdPreloaded: null,
onInterstitialAdLoaded: null,
onInterstitialAdShown: null,
onInterstitialAdHidden: null
};

@@ -129,0 +129,0 @@

module.exports = {
_loadedBannerAd: false,
_loadedFullScreenAd: false,
_loadedInterstitialAd: false,
_isShowingBannerAd: false,
_isShowingFullScreenAd: false,
_isShowingInterstitialAd: false,
//

@@ -18,3 +18,3 @@ setLicenseKey: function(email, licenseKey) {

},
setUp: function(adUnit, fullScreenAdUnit, isOverlap, isTest) {
setUp: function(bannerAdUnit, interstitialAdUnit, isOverlap, isTest) {
var self = this;

@@ -48,33 +48,50 @@ cordova.exec(

//
else if (result == "onFullScreenAdPreloaded") {
else if (result == "onInterstitialAdPreloaded") {
//cranberrygame start; deprecated
if (self.onFullScreenAdPreloaded)
self.onFullScreenAdPreloaded();
//cranberrygame end
if (self.onInterstitialAdPreloaded)
self.onInterstitialAdPreloaded();
}
else if (result == "onFullScreenAdLoaded") {
self._loadedFullScreenAd = true;
else if (result == "onInterstitialAdLoaded") {
self._loadedInterstitialAd = true;
//cranberrygame start; deprecated
if (self.onFullScreenAdLoaded)
self.onFullScreenAdLoaded();
//cranberrygame end
if (self.onInterstitialAdLoaded)
self.onInterstitialAdLoaded();
}
else 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();
//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();
if (self.onFullScreenAdClosed)
self.onFullScreenAdClosed(); //deprecated
self.onFullScreenAdClosed(); //deprecated
//cranberrygame end
if (self.onInterstitialAdHidden)
self.onInterstitialAdHidden();
}
}
else {
//if (result["event"] == "onXXX") {
// //result["message"]
//var event = result["event"];
//var location = result["message"];
//if (event == "onXXX") {
// if (self.onXXX)
// self.onXXX(result);
// self.onXXX(location);
//}

@@ -87,3 +104,3 @@ }

'setUp',
[adUnit, fullScreenAdUnit, isOverlap, isTest]
[bannerAdUnit, interstitialAdUnit, isOverlap, isTest]
);

@@ -132,2 +149,3 @@ },

//
//cranberrygame start; deprecated
preloadFullScreenAd: function() {

@@ -155,14 +173,43 @@ var self = this;

},
//cranberrygame end
preloadInterstitialAd: function() {
cordova.exec(
null,
null,
'Admob',
'preloadInterstitialAd',
[location]
);
},
showInterstitialAd: function() {
cordova.exec(
null,
null,
'Admob',
'showInterstitialAd',
[location]
);
},
loadedBannerAd: function() {
return this._loadedBannerAd;
},
//cranberrygame start; deprecated
loadedFullScreenAd: function() {
return this._loadedFullScreenAd;
},
return this._loadedInterstitialAd;
},
//cranberrygame end
loadedInterstitialAd: function() {
return this._loadedInterstitialAd;
},
isShowingBannerAd: function() {
return this._isShowingBannerAd;
},
//cranberrygame start; deprecated
isShowingFullScreenAd: function() {
return this._isShowingFullScreenAd;
},
return this._isShowingInterstitialAd;
},
//cranberrygame end
isShowingInterstitialAd: function() {
return this._isShowingInterstitialAd;
},
onBannerAdPreloaded: null,

@@ -173,2 +220,3 @@ onBannerAdLoaded: null,

//
//cranberrygame start; deprecated
onFullScreenAdPreloaded: null,

@@ -178,3 +226,8 @@ onFullScreenAdLoaded: null,

onFullScreenAdHidden: null,
onFullScreenAdClosed: null //deprecated
onFullScreenAdClosed: null, //deprecated
//cranberrygame end
onInterstitialAdPreloaded: null,
onInterstitialAdLoaded: null,
onInterstitialAdShown: null,
onInterstitialAdHidden: 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

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

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

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