From 894a15979995ae235701b7ddf914f54aa17d0e47 Mon Sep 17 00:00:00 2001 From: Roman Parpalak Date: Sun, 28 Apr 2024 01:07:17 +0300 Subject: [PATCH] Minor client performance fixes. --- www/index.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/www/index.php b/www/index.php index e93df28..38bf054 100644 --- a/www/index.php +++ b/www/index.php @@ -21,10 +21,10 @@ function __ ($key) { global $i18n; - return isset($i18n[$key]) ? $i18n[$key] : 'Missing translation: ' . $key . ''; + return $i18n[$key] ?? 'Missing translation: ' . $key . ''; } -if (substr($_SERVER['REQUEST_URI'], 0, 3) === '/g/') { +if (str_starts_with($_SERVER['REQUEST_URI'], '/g/')) { $editor_content = urldecode(substr($_SERVER['REQUEST_URI'], 3)); } else { $editor_content = 'f(x)'; @@ -32,7 +32,7 @@ function __ ($key) { ?> - + <?php echo __('title'); ?> @@ -40,7 +40,6 @@ function __ ($key) { -
@@ -49,7 +48,7 @@ function __ ($key) { $linkUrl) { - if ($linkLang != $lang) { + if ($linkLang !== $lang) { ?> SVG

-

+

Editor preview

@@ -104,7 +103,9 @@ function __ ($key) { ?>

-
$$$$
+
+ +

@@ -153,6 +154,7 @@ function __ ($key) { +