檢測 Adblock 的輕量級 jQuery 插件-Adi.js
Adi.js
用于Adblock檢測的輕量級jQuery 插件。
bower install adi.js
To install follow the steps (order is important):
- IncludejQuery
- Includeadvertisement.jsand make surejQuery.adblock = false;is inside the file
- Includejquery.adi.js
- Call$.adi({ /* your options here */ }) </ul>
Options
All parameters are optional.
Option | Type | Description | </tr> </tbody>|||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
title | string/html | Modal's title | </tr>|||||||||||||||||||||||||||||
content | string/html | Modal's description | </tr>|||||||||||||||||||||||||||||
theme | string | Available:light,dark(default:light) | </tr> </tbody> </table>
Method | Description | </tr> </tbody>|||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
active() | Callback function triggered when$.adblockisundefined. Adblock is active |
</tr>
|||||||||||||||||||
inactive() | Callback function triggered when$.adblockisfalse. Adblock is inactive |
</tr>
|||||||||||||||||||
onOpen() | Callback function triggered when modal is appended todocument.bodyanddisplayis set toblock | </tr>|||||||||||||||||||
onClose() | Callback function triggered when modal'sdisplayis set tonone | </tr> </tbody> </table>