Skip to content

Commit

Permalink
Skip minify Google tag manager
Browse files Browse the repository at this point in the history
  • Loading branch information
sonvnn committed Nov 7, 2023
1 parent 867889d commit 20e43f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/library/astroid/Document.php
Expand Up @@ -293,7 +293,7 @@ public function minifyJS($html)
// print_r($matches);
$script = [];
if (isset($matches[5]) && $matches[5] == '</script>' && !empty($matches[2])) {
if (strpos($matches[0], 'type="module"') > 0 || strpos($matches[0], 'media/system/js/joomla-hidden-mail-es5.min.js') > 0 || strpos($matches[0], 'webcomponents-bundle.min.js') > 0) {
if (strpos($matches[0], 'type="module"') > 0 || strpos($matches[0], 'media/system/js/joomla-hidden-mail-es5.min.js') > 0 || strpos($matches[0], 'webcomponents-bundle.min.js') > 0 || strpos($matches[0], 'www.googletagmanager.com') > 0) {
return $matches[0];
}
$script = ['content' => $this->beutifyURL($matches[2]), 'type' => 'url'];
Expand Down

0 comments on commit 20e43f2

Please sign in to comment.