mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-01-13 08:28:02 -05:00
43 lines
741 B
JavaScript
43 lines
741 B
JavaScript
/**
|
|
* Constructor
|
|
*/
|
|
function SAiOSAdPlugin()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* show - true to show the ad, false to hide the ad
|
|
*/
|
|
SAiOSAdPlugin.prototype.showAd = function(show)
|
|
{
|
|
PhoneGap.exec("SAiOSAdPlugin.showAd", show);
|
|
}
|
|
|
|
/**
|
|
* atBottom - true to put the ad at the bottom, false to put the ad at the top
|
|
*/
|
|
SAiOSAdPlugin.prototype.prepare = function(atBottom)
|
|
{
|
|
if (!atBottom) {
|
|
atBottom = false;
|
|
}
|
|
PhoneGap.exec("SAiOSAdPlugin.prepare", atBottom);
|
|
}
|
|
|
|
/**
|
|
* Install function
|
|
*/
|
|
SAiOSAdPlugin.install = function()
|
|
{
|
|
if ( !window.plugins )
|
|
window.plugins = {};
|
|
if ( !window.plugins.iAdPlugin )
|
|
window.plugins.iAdPlugin = new SAiOSAdPlugin();
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* Add to PhoneGap constructor
|
|
*/
|
|
PhoneGap.addConstructor(SAiOSAdPlugin.install); |