Skip to content

Commit fc7b780

Browse files
committed
Remove google ads, and add a "support small creators" message on top
1 parent 4778dea commit fc7b780

2 files changed

Lines changed: 3 additions & 25 deletions

File tree

_layouts/default.html

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,10 @@
113113
<a class="rss" href="/feed.xml">RSS</a>
114114
</nav>
115115
</div>
116-
117-
<div class="adbanners">
118-
<div class="aligncenter" align="center">
119-
<script src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1505828284633053"
120-
crossorigin="anonymous"></script>
121-
<!-- themkat_toptest -->
122-
<ins class="adsbygoogle"
123-
style="display:block;height: max(75px,15vh);"
124-
data-ad-client="ca-pub-1505828284633053"
125-
data-ad-slot="4185369975"
126-
data-ad-format="fluid"></ins>
127-
<script>
128-
(adsbygoogle = window.adsbygoogle || []).push({});
129-
</script>
130-
</div>
131-
</div>
132116

133117
<div class="content">
118+
<p class="support-message">Hi there! Even small sites like these have costs, like for the domain name. Helping cover some of these costs by donating will help in keeping small sites alive! :) (see footer or About Me for links). It also helps us in avoiding having ads on our sites. If not me, there are other creators out there who probably could use the support! :) </p>
119+
134120
{% if page.tab != "newsletter" %}
135121
{% include searchbox.html %}
136122
{% endif %}
@@ -202,14 +188,6 @@
202188
document.body.setAttribute('data-mode', 'dark');
203189
mode.classList.add('color-mode-toggle-dark');
204190
}
205-
206-
window.addEventListener('load', (event) => {
207-
// add a quick message if the user has disabled adblocker
208-
if (!(window.adsbygoogle.pageState || window.adsbygoogle.pageStateTs)) {
209-
const content = document.getElementsByClassName('content')[0];
210-
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;
211-
}
212-
});
213191

214192
console.log('Hello there');
215193
</script>

_sass/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ body {
130130
margin-right: auto;
131131
}
132132

133-
.content .adblockermessage {
133+
.content .support-message {
134134
width: 50vw;
135135
margin: auto;
136136
color: red;

0 commit comments

Comments
 (0)