From e95b208af90cc386a7d8d1bcab426727cf4f0121 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 21 Sep 2022 22:42:33 +0200 Subject: Update time --- includes/edit.php | 41 +++++------------------------------------ 1 file changed, 5 insertions(+), 36 deletions(-) (limited to 'includes/edit.php') diff --git a/includes/edit.php b/includes/edit.php index 85382a0..5bbd38a 100644 --- a/includes/edit.php +++ b/includes/edit.php @@ -1,36 +1,9 @@ -= 0) { - return $tense = "now"; - } elseif ($difference > 0) { - $tense = "ago"; - } else { - $tense = "later"; - } - - for ($j = 0; $difference >= $lengths[$j] && $j < count($lengths)-1; $j++) { - $difference /= $lengths[$j]; - } - - $difference = round($difference); - - $period = $periods[$j] . ($difference >1 ? "s" :''); - return "{$difference} {$period} {$tense}"; +if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-" . $memberID . "-metadata.json")) { + $metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-" . $memberID . "-metadata.json"), true)); } -$metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . $systemID . "-" . $memberID . "-metadata.json"), true)); - ?>
@@ -42,8 +15,8 @@ $metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'
-

- Saved · bytes +

+ Saved · bytes · ">View page

@@ -166,10 +139,6 @@ $metadata = parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT' } } else { timeSinceLastModified = 0; - document.getElementById("editor-save-status").innerHTML = "Saved"; - document.getElementById("editor-save-status").classList.add("text-muted"); - document.getElementById("editor-save-status").classList.remove("text-warning"); - document.getElementById("editor-save-status").classList.remove("text-primary"); } }, 100) -- cgit