title="Loading" until page load

Hi, newbie question. I am trying to have the FF title = “Loading…” until the page load is complete and then show the true title of the page. I got the following code from the Mozilla AI support (and similar from Bing AI), but the code is not working (no errors in console log). Any ideas?


// Set the initial title to "Loading.."
document.title = "Loading..";

// Add an event listener for the "load" event
window.addEventListener("load", function() {
  // Once the page is fully loaded, update the title to the original title
  document.title = document.title.replace("Loading..", "");



“manifest_version”: 2,
“name”: “Loading”,
“version”: “1.0”,

“description”: “Adds Loading… to title until page is fully loaded”,

“content_scripts”: [
“matches”: ["<all_urls>"],
“js”: [“loading.js”]

“browser_specific_settings”: {
“gecko”: {
“id”: “,myemailhere@gmail.com