Add access keys to 10 first notes

This commit is contained in:
quenousimporte 2024-10-15 17:14:07 +02:00
parent 20236765ff
commit aa3a99bd0b
1 changed files with 8 additions and 1 deletions

View File

@ -66,6 +66,7 @@
<div> <div>
<?php <?php
$index = 1;
foreach($_SESSION['index'] as $path) foreach($_SESSION['index'] as $path)
{ {
$name = basename($path); $name = basename($path);
@ -83,7 +84,13 @@
} }
} }
echo '<div><a href=note.php?title=' . urlencode($name) . '>' . $name .'</a>'; echo '<div><a href=note.php?title=' . urlencode($name) . ' ';
if ($index < 10)
{
echo 'accesskey="' . $index .'" ';
}
$index++;
echo '>' . $name .'</a>';
if ($filter && str_contains(cleanstring($content), cleanstring($filter))) if ($filter && str_contains(cleanstring($content), cleanstring($filter)))
{ {
$pos = strpos(cleanstring($content), cleanstring($filter)); $pos = strpos(cleanstring($content), cleanstring($filter));