Remove Google Ads script from header container in app.cpp to streamline the application and improve loading performance.
This commit is contained in:
12
src/app.cpp
12
src/app.cpp
@@ -256,18 +256,6 @@ Wt::WHBoxLayout *App::createActionLayout(Wt::WVBoxLayout *verticalContainer) {
|
||||
void App::createHeadContainer(Wt::WVBoxLayout *layout) {
|
||||
auto header = layout->addWidget(std::make_unique<Wt::WContainerWidget>());
|
||||
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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user