Merge pull request #1164 from mhancoc7/patch-1

Add the "async" parameter to script tags
This commit is contained in:
Diego Najar 2020-03-27 12:53:08 +01:00 committed by GitHub
commit 061f7c1b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -214,7 +214,7 @@ class Theme {
$scripts = '';
foreach($files as $file) {
$scripts .= '<script src="'.$base.$file.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
$scripts .= '<script async src="'.$base.$file.'?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
return $scripts;
@ -253,7 +253,7 @@ class Theme {
public static function jsBootstrap()
{
return '<script src="'.DOMAIN_CORE_JS.'bootstrap.bundle.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
return '<script async src="'.DOMAIN_CORE_JS.'bootstrap.bundle.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
public static function cssBootstrap()
@ -269,7 +269,7 @@ class Theme {
public static function jsSortable()
{
// https://github.com/psfpro/bootstrap-html5sortable
return '<script src="'.DOMAIN_CORE_JS.'jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
return '<script async src="'.DOMAIN_CORE_JS.'jquery.sortable.min.js?version='.BLUDIT_VERSION.'"></script>'.PHP_EOL;
}
}