Skip to content

Commit 4360214

Browse files
committed
Attempt at fixing ad block check with false negatives
1 parent 50e8ecf commit 4360214

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215

216216
window.addEventListener('load', (event) => {
217217
// add a quick message if the user has disabled adblocker
218-
if (!window.adsbygoogle.pageState) {
218+
if (!window.adsbygoogle.pageState || !window.adsbygoogle.pageStateTs) {
219219
const content = document.getElementsByClassName('content')[0];
220220
content.innerHTML = '<p class="adblockermessage">Hi there! It seems like you are using an Ad Blocker. I would be very happy if you could turn it off, as the ads are just a small bar at the top. Even small sites like these have costs, like for the domain name. Helping cover some of these costs helps small creators like me keep the motivation to keep going :)</p><br />' + content.innerHTML;
221221
}

0 commit comments

Comments
 (0)