adblockbanner

1.1.0 • Public • Published

AdBlockBanner

Tiny script to detect ad blockers and display a custom message in ad regions

Installation

<script>
    window.ABB_config = {
        text: "Hi! Please disable your AdBlocker for this site to keep it running, thanks :)", // Text to be displayed
        selectors: [".adsbygoogle"], // Ad Region selectors - should be the element that usually contains the ad body
    }
</script> 
<script src="https://unpkg.com/adblockbanner@1.0.2/abb.min.js"></script>
npm install --save adblockbanner

Configuration

{
    text: "Hi! Please disable your AdBlocker for this site to keep it running, thanks :)", // Text to be displayed
    selectors: [".adsbygoogle"], // Ad Region selectors - should be the element that usually contains the ad body
    backgroundColor: '#e10000',
    textColor: '#000000',
    wrapperStyle: 'border-radius: 5px',
    textStyle: 'text-align: center; font-size: 2rem; font-family:',
    delay: 2000,
    insertPosition: 'before' // before, after, inside
}

Dependents (0)

Package Sidebar

Install

npm i adblockbanner

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

18.8 kB

Total Files

8

Last publish

Collaborators

  • inventivetalent