# Adblocker Not Installed warning

**URL:** <https://discuss.write.as/t/adblocker-not-installed-warning/12456>\
**Category:** Customization\
**Created:** [July 9, 2024, 8:43pm UTC](https://discuss.write.as/t/adblocker-not-installed-warning/12456 "2024-07-09T20:43:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davepolaschek](https://discuss.write.as/letter_avatar_proxy/v4/letter/d/51bf81/32.png) [@davepolaschek](https://discuss.write.as/u/davepolaschek)\
**Post date:** [July 9, 2024, 8:43pm UTC](https://discuss.write.as/t/adblocker-not-installed-warning/12456/1 "2024-07-09T20:43:34Z")

</div>

Based on this [Detect Missing Ad-Blocker](https://stefanbohacek.com/project/detect-missing-adblocker-wordpress-plugin/) plugin for Wordpress, I pounded on write.as a little.

[Test — adblocker-test](https://adblocker-test.writeas.com/test) is the result. It has the following custom CSS:

```auto

#ftf-dma-note
{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  background-color: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

div.ftf-dma-note-content-wrapper {
    background: #fff;
    color: #333;
    width: 50%;
    height: 50%;
    padding: 1em;
}
  
  /* this is the close label */
  .ftf-dma-close-btn {
    float: right;
    cursor: pointer;
  }

  .ftf-dma-note.d-none {
    display: none !important;
    pointer-events: none !important;
  }

```

Then within the page, I have the following html:

```auto

<div
  id="ftf-dma-note"
  class="ftf-dma-note ad native-ad native-ad-1 ytd-j yxd-j yxd-jd aff-content-col aff-inner-col aff-item-list ark-ad-message inplayer-ad inplayer_banners in_stream_banner trafficjunky-float-right dbanner preroll-blocker happy-inside-player blocker-notice blocker-overlay exo-horizontal ave-pl bottom-hor-block brs-block advboxemb wgAdBlockMessage glx-watermark-container overlay-advertising-new header-menu-bottom-ads rkads mdp-deblocker-wrapper amp-ad-inner imggif bloc-pub bloc-pub2 hor_banner aan_fake aan_fake __video-units rps_player_ads fints-block__ row full-ave-pl full-bns-block vertbars video-brs player-bns-block wps-player__happy-inside gallery-bns-bl stream-item-widget adsbyrunactive happy-under-player adde_modal_detector adde_modal-overlay ninja-recommend-block aoa_overlay message"
>
  <div class="ftf-dma-note-content-wrapper">
    <span onclick="" id="ftf-dma-close-btn" class="ftf-dma-close-btn"
      >Close</span
    >
    <div class="ftf-dma-note-header">
      <p>Adblocker not detected!</p>
    </div>
    <div class="ftf-dma-note-content">Consider installing a browser extension which blocks ads and other malicious content (<i><a href="https://shouldiblockads.com">why?</a></i>):<ul>
<li><a href="https://ublockorigin.com/">UBlock Origin</a></li>
<li><a href="https://underpassapp.com/StopTheMadness/">StopTheMadness</a></li>
<li><a href="https://www.ghostery.com/">Ghostery</a></li>
</div>
  </div>
</div>

```

There’s also custom JavaScript

```auto

const cookieNameValue = "ftf-dma-notice=shown";
const note = document.getElementById("ftf-dma-note");
const noteCloseButton = document.getElementById("ftf-dma-close-btn");

if (note !== null && noteCloseButton !== null) {
  noteCloseButton.onclick = (ev) => {
    note.classList.add('d-none');
    document.cookie = cookieNameValue;
  };  
}

```

but this is only needed if you want to set a cookie so that the user who has clicked “Close” won’t have to see the warning again.

Why might you want to do this? [Should I Block Ads?](https://shouldiblockads.com/) has an explanation.

Presented as an illustration that quite a bit of customization is available in write.as if you get clever.

---

<div class="post-metadata">

**Author:** ![nigel](https://discuss.write.as/user_avatar/discuss.write.as/nigel/32/3690_2.png) [@nigel](https://discuss.write.as/u/nigel)\
**Post date:** [July 10, 2024, 9:10am UTC](https://discuss.write.as/t/adblocker-not-installed-warning/12456/2 "2024-07-10T09:10:35Z")

</div>

You are a freakn legend! I approve 😁

I wont be adding this to mine (because I am lazy) but man I do love this.

---

<div class="post-metadata">

**Author:** ![matt](https://discuss.write.as/user_avatar/discuss.write.as/matt/32/2760_2.png) [@matt](https://discuss.write.as/u/matt)\
**Post date:** [July 11, 2024, 8:34pm UTC](https://discuss.write.as/t/adblocker-not-installed-warning/12456/3 "2024-07-11T20:34:54Z")

</div>

This is really cool!! Thanks for sharing, @davepolaschek!

---

<div class="post-metadata">

**Author:** ![davepolaschek](https://discuss.write.as/letter_avatar_proxy/v4/letter/d/51bf81/32.png) [@davepolaschek](https://discuss.write.as/u/davepolaschek)\
**Post date:** [July 11, 2024, 8:50pm UTC](https://discuss.write.as/t/adblocker-not-installed-warning/12456/4 "2024-07-11T20:50:06Z")

</div>

Matt, one of the things I’ve been wondering is if it’s possible to change the landing page for a blog (when no page is specified, for example).

I think there are a few cases where this might be a handy thing, and this warning is one of them.

Thanks!

---

<div class="post-metadata">

**Author:** ![matt](https://discuss.write.as/user_avatar/discuss.write.as/matt/32/2760_2.png) [@matt](https://discuss.write.as/u/matt)\
**Post date:** [July 11, 2024, 10:24pm UTC](https://discuss.write.as/t/adblocker-not-installed-warning/12456/5 "2024-07-11T22:24:15Z")

</div>

Oh yeah, that’d be great for this. There’s been some discussion around it that might help for now, here: [Home Page](https://discuss.write.as/t/home-page/5200), and an older feature request: [Option to Set Pinned Page as Homepage](https://discuss.write.as/t/option-to-set-pinned-page-as-homepage/380). But I think this would be a great feature, so I would like to add an easy way to do this in the future.

---

<div class="post-metadata">

**Author:** ![davepolaschek](https://discuss.write.as/letter_avatar_proxy/v4/letter/d/51bf81/32.png) [@davepolaschek](https://discuss.write.as/u/davepolaschek)\
**Post date:** [July 12, 2024, 12:35am UTC](https://discuss.write.as/t/adblocker-not-installed-warning/12456/6 "2024-07-12T00:35:33Z")

</div>

Yes. That would also be a nice option for “book” blogs, letting people land on the table of contents or cover page, rather than seeing multiple pages. I’ve figured out how to force display of just a single page, but the data still gets squirted across the wire.

Anyway, I’ve got three sites now that could use that feature.
