|
6 | 6 | use CodeIgniter\HTTP\DownloadResponse;
|
7 | 7 | use CodeIgniter\HTTP\RequestInterface;
|
8 | 8 | use CodeIgniter\HTTP\ResponseInterface;
|
| 9 | +use CodeIgniter\I18n\Time; |
9 | 10 | use Config\Services;
|
10 | 11 | use Kint\Kint;
|
11 | 12 | use Michalsn\CodeIgniterHtmx\HTTP\IncomingRequest;
|
@@ -47,7 +48,7 @@ public function prepare(?RequestInterface $request = null, ?ResponseInterface $r
|
47 | 48 | helper('filesystem');
|
48 | 49 |
|
49 | 50 | // Updated to microtime() so we can get history
|
50 |
| - $time = sprintf('%.6f', microtime(true)); |
| 51 | + $time = sprintf('%.6f', Time::now()->format('U.u')); |
51 | 52 |
|
52 | 53 | if (! is_dir(WRITEPATH . 'debugbar')) {
|
53 | 54 | mkdir(WRITEPATH . 'debugbar', 0777);
|
@@ -75,11 +76,11 @@ public function prepare(?RequestInterface $request = null, ?ResponseInterface $r
|
75 | 76 | $kintScript = ($kintScript === '0') ? '' : $kintScript;
|
76 | 77 |
|
77 | 78 | $script = PHP_EOL
|
78 |
| - . '<script type="text/javascript" ' . csp_script_nonce() . ' id="debugbar_loader" ' |
| 79 | + . '<script ' . csp_script_nonce() . ' id="debugbar_loader" ' |
79 | 80 | . 'data-time="' . $time . '" '
|
80 | 81 | . 'src="' . site_url() . '?debugbar"></script>'
|
81 |
| - . '<script type="text/javascript" ' . csp_script_nonce() . ' id="debugbar_dynamic_script"></script>' |
82 |
| - . '<style type="text/css" ' . csp_style_nonce() . ' id="debugbar_dynamic_style"></style>' |
| 82 | + . '<script ' . csp_script_nonce() . ' id="debugbar_dynamic_script"></script>' |
| 83 | + . '<style ' . csp_style_nonce() . ' id="debugbar_dynamic_style"></style>' |
83 | 84 | . $kintScript
|
84 | 85 | . PHP_EOL;
|
85 | 86 |
|
|
0 commit comments