Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Dec 11, 2020
1 parent f0a61f9 commit 8a36059
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/CmsSeoComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,16 @@ public function bootstrap($application)
}


if (strpos($response->data, $this->countersContent) === false) {
//Для google page speed не показываем этот блок
if (!$this->isGooglePageSpeedRequest()) {
$replaces["</body>"] = Html::tag('div', $this->countersContent, ['style' => 'display: none;', 'data-is-auto' => 'true']) . "</body>";
if ($this->countersContent) {
if (strpos($response->data, $this->countersContent) === false) {
//Для google page speed не показываем этот блок
if (!$this->isGooglePageSpeedRequest()) {
$replaces["</body>"] = Html::tag('div', $this->countersContent, ['style' => 'display: none;', 'data-is-auto' => 'true']) . "</body>";
}
}
}


if ($replaces) {
$response->data = strtr($response->data, $replaces);
}
Expand Down

0 comments on commit 8a36059

Please sign in to comment.