New supporter appears!

A prominent member of our forum has reached out to support the forum with their business and you’ll see the ad in the forum header.

As usual If you aren’t interested you can hide it by adding this to your adblock:
https://discuss.eroscripts.com/t/block-eroscripts-ads-whenever-they-may-be-used

The ad is also dismissable now! You can close it for the length of your browsing session
It will re-appear on new tabs and when you first open the site but will always be dismissable.

Thanks again to @M0SAIC for supporting the forum.

2 Likes

Any chance to have a patreon tier where the ads are disabled by default?

For some reason, the button is inert upon first site visit:
image
But on refresh/new tab it works:
image
Maybe DOMContentLoaded is an inappropriate event for the addEventListener (DOMContentLoaded does not wait for stylesheets to load”)?

The DOMContentLoaded EventListener might be unnecessary since the ad is in the HTML at page load, so you can drop it altogether (but added a safety check in case either element is missing):

var _default = _exports.default = (0, _api.apiInitializer)(api => {
  const ad = document.getElementById("custom-ad");
  const dismissBtn = document.getElementById("dismiss-btn");

  if (ad && dismissBtn) {
    // if (sessionStorage.getItem("adDismissed")) {
    //   ad.style.display = "none";
    // }
    dismissBtn.addEventListener("click", function () {
      ad.style.display = "none";
      // sessionStorage.setItem("adDismissed", "true");
    });
  }
});
1 Like

Hot damn, I wanna develop using the SR Series! :drooling_face:

This doesn’t happen to me.
Can you show me a gif of this happening?


(My cursor is hidden in the recording, but I clicked the dismiss button before inspecting it)