From 67d97d5c17fb27f496a0b1d8d6ca429cf942bb93 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 30 Apr 2024 19:23:31 +0200 Subject: use noimg for ads --- src/layout.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/layout.rs b/src/layout.rs index 6c4b002..637e2fc 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -64,13 +64,15 @@ markup::define! { } } hr; - details.ad { summary { "Advertisement by a first-party" } - iframe[loading="lazy", src="https://adservices.metamuffin.org/v1/embed?s=metamuffin.org", style="width:728px;height:90px;border:none;"] {} - } - details.ad { summary { "Advertisement by a third-party" } - iframe[loading="lazy", src="https://john.citrons.xyz/embed?ref=metamuffin.org", style="width:732px;height:94px;border:none;"] {} + @if !noimg { + details.ad { summary { "Advertisement by a first-party" } + iframe[loading="lazy", src="https://adservices.metamuffin.org/v1/embed?s=metamuffin.org", style="width:728px;height:90px;border:none;"] {} + } + details.ad { summary { "Advertisement by a third-party" } + iframe[loading="lazy", src="https://john.citrons.xyz/embed?ref=metamuffin.org", style="width:732px;height:94px;border:none;"] {} + } + script { @raw("document.querySelectorAll(\".ad\").forEach(e=>e.open=true) // evil js enables ads hehe") } } - script { @raw("document.querySelectorAll(\".ad\").forEach(e=>e.open=true) // evil js enables ads hehe") } } } } -- cgit v1.2.3-70-g09d2