MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / toggleBannerAd

Function toggleBannerAd

src/handlers/keyboard.js:214–226  ·  view source on GitHub ↗

* Show ad if keyboard is hidden and ad is active, hide ad otherwise. * @param {boolean} keyboardHidden

(keyboardHidden)

Source from the content-addressed store, hash-verified

212 * @param {boolean} keyboardHidden
213 */
214function toggleBannerAd(keyboardHidden) {
215 const bannerIsActive = !!bannerAd?.active;
216
217 if (
218 !keyboardHidden &&
219 bannerIsActive &&
220 typeof bannerAd?.hide === "function"
221 ) {
222 bannerAd.hide();
223 } else if (bannerIsActive && typeof bannerAd?.show === "function") {
224 bannerAd.show();
225 }
226}

Callers 1

keyboard.jsFile · 0.85

Calls 2

hideMethod · 0.45
showMethod · 0.45

Tested by

no test coverage detected