diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-01-20 22:35:36 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-04-22 11:31:14 +0200 |
commit | eecce139eaa15b3c4d7944dd586b11e150d5e5b6 (patch) | |
tree | b65ed721bf9349c764e575e29f55286e2b09a886 | |
parent | f989a43135ce42a43c35193b8eecefb055aec84c (diff) |
Set the `title` tag in the HTML5 export immediately
This makes the project title display without having to wait for
the project to finish loading.
-rw-r--r-- | misc/dist/html/fixed-size.html | 2 | ||||
-rw-r--r-- | misc/dist/html/full-size.html | 2 | ||||
-rw-r--r-- | platform/javascript/export/export.cpp | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/misc/dist/html/fixed-size.html b/misc/dist/html/fixed-size.html index 6c6a3a5d2d..e7a23b3f29 100644 --- a/misc/dist/html/fixed-size.html +++ b/misc/dist/html/fixed-size.html @@ -3,7 +3,7 @@ <head> <meta charset="utf-8" /> <link id='-gd-engine-icon' rel='icon' type='image/png' href='favicon.png' /> - <title></title> + <title>$GODOT_PROJECT_NAME</title> <style type="text/css"> body { diff --git a/misc/dist/html/full-size.html b/misc/dist/html/full-size.html index 92b65257d4..193f2a6aad 100644 --- a/misc/dist/html/full-size.html +++ b/misc/dist/html/full-size.html @@ -4,7 +4,7 @@ <meta charset='utf-8' /> <meta name='viewport' content='width=device-width, user-scalable=no' /> <link id='-gd-engine-icon' rel='icon' type='image/png' href='favicon.png' /> - <title></title> + <title>$GODOT_PROJECT_NAME</title> <style type='text/css'> body { diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 39faae2d17..36076a2af9 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -252,6 +252,7 @@ void EditorExportPlatformJavaScript::_fix_html(Vector<uint8_t> &p_html, const Re String current_line = lines[i]; current_line = current_line.replace("$GODOT_BASENAME", p_name); + current_line = current_line.replace("$GODOT_PROJECT_NAME", ProjectSettings::get_singleton()->get_setting("application/config/name")); current_line = current_line.replace("$GODOT_HEAD_INCLUDE", p_preset->get("html/head_include")); current_line = current_line.replace("$GODOT_DEBUG_ENABLED", p_debug ? "true" : "false"); str_export += current_line + "\n"; |