Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit e2ecd2aa authored by Deepak Khatri's avatar Deepak Khatri :dog:
Browse files

WIP: Don't chage document title

parent 68211f56
No related merge requests found
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
{% block extrahead %} {% block extrahead %}
<script> <script>
document.title = "Page Loading....";
// The redirect_folders dictionary is passed from html_context // The redirect_folders dictionary is passed from html_context
const redirectFolders = JSON.parse('{{ redirect_folders | tojson | safe }}'); const redirectFolders = JSON.parse('{{ redirect_folders | tojson | safe }}');
...@@ -28,9 +26,6 @@ ...@@ -28,9 +26,6 @@
// Redirect is found // Redirect is found
redirectFound = true; redirectFound = true;
// Update the document title since the redirect link is found
document.title = "Page Moved!";
// Update the heading with the correct information // Update the heading with the correct information
const headingElement = document.getElementById('pageHeading'); const headingElement = document.getElementById('pageHeading');
if (headingElement) { if (headingElement) {
...@@ -99,8 +94,7 @@ ...@@ -99,8 +94,7 @@
}) })
.catch(error => { .catch(error => {
console.error("Error checking the URL:", error); console.error("Error checking the URL:", error);
// In case of an error, ensure the title is properly set // In case of an error, ensure the title is properly set
document.title = "Page Not Found (404)";
const headingElement = document.getElementById('pageHeading'); const headingElement = document.getElementById('pageHeading');
if (headingElement) { if (headingElement) {
headingElement.textContent = "Page Not Found (404)"; headingElement.textContent = "Page Not Found (404)";
...@@ -114,8 +108,7 @@ ...@@ -114,8 +108,7 @@
} }
// If no potential redirect match is found after iteration, set title to Page Not Found // If no potential redirect match is found after iteration, set title to Page Not Found
if (!redirectFound) { if (!redirectFound) {
document.title = "Page Not Found (404)";
const headingElement = document.getElementById('pageHeading'); const headingElement = document.getElementById('pageHeading');
if (headingElement) { if (headingElement) {
headingElement.textContent = "Page Not Found (404)"; headingElement.textContent = "Page Not Found (404)";
...@@ -148,7 +141,7 @@ ...@@ -148,7 +141,7 @@
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" id="closeRedirect"></button> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" id="closeRedirect"></button>
</div> </div>
<div class="modal-body text-center"> <div class="modal-body text-center">
<p>We have found the page you are looking for, redirecting in...</p> <p>We have found the page you are looking for, redirecting in....</p>
<div class="countdown display-1 fw-bold" id="countdownNumber">5</div> <div class="countdown display-1 fw-bold" id="countdownNumber">5</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment