Skip to content

Instantly share code, notes, and snippets.

@Sentinel-7
Forked from ig0r74/plugin.php
Created August 4, 2020 10:34
Show Gist options
  • Save Sentinel-7/e9c5f930a564bfc4775025a09e5dd495 to your computer and use it in GitHub Desktop.
Save Sentinel-7/e9c5f930a564bfc4775025a09e5dd495 to your computer and use it in GitHub Desktop.
MODX убрать все type="text/javascript"
<?php
switch ($modx->event->name) {
case 'OnWebPagePrerender':
$output = &$modx->resource->_output; // перехватываем содержимое страницы
$output = str_replace(' type="text/javascript"',"",$output);
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment