14 lines
910 B
PHP
14 lines
910 B
PHP
<?php
|
|
// Apply spinner fix: rename .sp to .spnr to avoid CSS collision with kanban header
|
|
$f = '/var/www/html/growth-engine-v2.html';
|
|
@exec('chattr -i ' . $f . ' 2>/dev/null');
|
|
$c = file_get_contents($f);
|
|
if ($c === false) { echo json_encode(['error'=>'cannot read']); exit; }
|
|
$c = str_replace('.sp{display:inline-block;width:10px;height:10px;border:2px solid var(--brd);border-top-color:var(--gold);border-radius:50%;animation:spi .5s linear infinite}',
|
|
'.spnr{display:inline-block;width:10px;height:10px;border:2px solid var(--brd);border-top-color:var(--gold);border-radius:50%;animation:spi .5s linear infinite}', $c);
|
|
$c = str_replace('class="sp">', 'class="spnr">', $c);
|
|
$c = str_replace('<span class="sp">', '<span class="spnr">', $c);
|
|
file_put_contents($f, $c);
|
|
echo json_encode(['ok'=>true, 'size'=>strlen($c), 'spnr'=>substr_count($c,'spnr'), 'kh_sp'=>substr_count($c,'.kh.sp')]);
|
|
|