mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 07:06:45 +02:00
Defer syntax highlighting
This commit is contained in:
@@ -7,8 +7,8 @@ function script(string $source, string $trailing = "\n"): string {
|
||||
}
|
||||
|
||||
/** Return <script src> element */
|
||||
function script_src(string $url): string {
|
||||
return "<script src='" . h($url) . "'" . nonce() . "></script>\n";
|
||||
function script_src(string $url, bool $defer = false): string {
|
||||
return "<script src='" . h($url) . "'" . nonce() . ($defer ? " defer" : "") . "></script>\n";
|
||||
}
|
||||
|
||||
/** Get a nonce="" attribute with CSP nonce */
|
||||
|
Reference in New Issue
Block a user