启用Adblock API模块 Enable Wrapper Adblock API
将以下Adblock API模块代码添加到网页的<head>标签中。我们为其添加了id,方便您识别其用途
Add the Adblock API Module code to the <head> section of your webpage. We put an id so you can remember what
it’s for :)
使用Adblock API Using the Adblock API
注意:这些函数不应通过命令队列(
reviq.push(cmd))调用。Adblock API
模块加载完成后,这些函数即可立即使用。 Note: You should NOT use the
command queue (reviq.push(cmd)) for these functions. These functions are
always available immediately after the Adblock API Module is loaded.showAdblockModal的函数,用于向用户显示弹窗,提示其关闭广告拦截。
Suppose you have some function showAdblockModal that shows a modal asking
users to disable adblock.
reviq.onAdblock(cb): 检测到广告拦截时,执行回调函数cb runs a callback cb if adblock is detected
checkAdblock():需配合await使用,检测到广告拦截时返回true,否则返回false must be awaited and returns true if adblock is detected, false otherwise