Remove Google Ads script from header container in app.cpp to streamline the application and improve loading performance.

This commit is contained in:
Torsten Schulz (local)
2025-11-16 14:56:29 +01:00
parent a77ad7b784
commit ee52a35f91

View File

@@ -256,18 +256,6 @@ Wt::WHBoxLayout *App::createActionLayout(Wt::WVBoxLayout *verticalContainer) {
void App::createHeadContainer(Wt::WVBoxLayout *layout) { void App::createHeadContainer(Wt::WVBoxLayout *layout) {
auto header = layout->addWidget(std::make_unique<Wt::WContainerWidget>()); auto header = layout->addWidget(std::make_unique<Wt::WContainerWidget>());
header->addNew<Wt::WText>("<h1>ypChat</h1>")->setInline(true); header->addNew<Wt::WText>("<h1>ypChat</h1>")->setInline(true);
header->addNew<Wt::WText>((std::string)"<script async src=""https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1104166651501135"" " +
" crossorigin=""anonymous""></script>" +
"<ins class=""adsbygoogle"" " +
" style=""display:block"" " +
" data-ad-client=""ca-pub-1104166651501135"" " +
" data-ad-slot=""8252321071"" " +
" data-ad-format=""auto"" " +
" data-full-width-responsive=""true""></ins>" +
"<script> " +
"(adsbygoogle = window.adsbygoogle || []).push({}); " +
"</script>", Wt::TextFormat::UnsafeXHTML)
->setInline(true);
header->setStyleClass("header"); header->setStyleClass("header");
} }