adSense.hide()

类型 函数
返回值
修订版本 版本 2024.3703
关键词 AdSense, Google Ads, Google AdSense, 隐藏
另请参阅 adSense.show()
adSense.*

概述

隐藏 AdSense 横幅广告

语法

adSense.hide(  )

示例

local adSense = require( "plugin.adSense" )

-- AdSense Ads listener function
local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        adSense.show("banner",{adSlot="xxxxxxxxx", height=150, position="bottom"})

        --Later
        adSense.hide()
    end
end

-- Initialize Ad Sense
adSense.init(adListener, {clientId="ca-pub-xxxxxxxxxxxxxxxx"} )