Corrige aussi la hauteur repliée (box-sizing: border-box) : le padding de .text s'ajoutait à la hauteur configurée. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
785 B
PHP
21 lines
785 B
PHP
<?php
|
|
// Run inside the FreshRSS container (mounted with the extension):
|
|
// php reset.php [collapsed_height]
|
|
// Enables the extension and mark-read-on-scroll for user "test", sets the
|
|
// collapsed height, reader view, and marks every entry unread.
|
|
declare(strict_types=1);
|
|
|
|
$height = (int)($argv[1] ?? 250);
|
|
$dir = '/var/www/FreshRSS/data/users/test';
|
|
$file = "$dir/config.php";
|
|
$conf = include $file;
|
|
$conf['extensions_enabled']['Read More'] = true;
|
|
$conf['extensions']['Read More']['collapsed_height'] = $height;
|
|
$conf['mark_when']['scroll'] = true;
|
|
$conf['view_mode'] = 'reader';
|
|
file_put_contents($file, "<?php\nreturn " . var_export($conf, true) . ";\n");
|
|
|
|
$pdo = new PDO("sqlite:$dir/db.sqlite");
|
|
$pdo->exec('UPDATE entry SET is_read = 0');
|
|
echo "reset ok (height=$height)\n";
|