# Customize browser tab title?

**URL:** https://community.silverbullet.md/t/customize-browser-tab-title/399
**Category:** General
**Created:** [April 23, 2024, 4:07pm UTC](https://community.silverbullet.md/t/customize-browser-tab-title/399 "2024-04-23T16:07:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jamesgecko](https://community.silverbullet.md/user_avatar/community.silverbullet.md/jamesgecko/32/289_2.png) [@jamesgecko](https://community.silverbullet.md/u/jamesgecko)
#### Post date: [April 23, 2024, 4:07pm UTC](https://community.silverbullet.md/t/customize-browser-tab-title/399/1 "2024-04-23T16:07:06Z")

</div>

Right now the title of the browser tab is identical to the title of the note being viewed. `Journal/Week/2024-04-22`, or `SETTINGS`, for example. I’d like to add a postfix to the title. `Journal/Week/2024-04-22 - SilverBullet`, or `SETTINGS - SilverBullet`.

Is this possible to do? The [Space Script](https://silverbullet.md/Space%20Script) feature sounds promising. If I can hook the function that sets the browser title and change the string in-flight, that could work. But I’m a little bit lost trying to find the function I’d need to hook.

My use case is using [Hammerspoon](https://www.hammerspoon.org/) to add a hotkey for the SilverBullet browser tab.

---

<div class="post-metadata">

### Author: ![zef](https://community.silverbullet.md/user_avatar/community.silverbullet.md/zef/32/7_2.png) [@zef](https://community.silverbullet.md/u/zef)
#### Post date: [April 24, 2024, 11:56am UTC](https://community.silverbullet.md/t/customize-browser-tab-title/399/2 "2024-04-24T11:56:39Z")

</div>

This is hacky, but this seems to work:

````markdown
```space-script
silverbullet.registerEventListener({name: "editor:pageLoaded"}, (event) => {
  const pageName = event.data[0];
  setTimeout(() => {
    document.title = `${pageName} - whatever`;  
  });
});
```

````

---

<div class="post-metadata">

### Author: ![Alan](https://community.silverbullet.md/user_avatar/community.silverbullet.md/alan/32/510_2.png) [@Alan](https://community.silverbullet.md/u/Alan)
#### Post date: [August 9, 2024, 2:31pm UTC](https://community.silverbullet.md/t/customize-browser-tab-title/399/3 "2024-08-09T14:31:17Z")

</div>

@zef the above doesn’t seem to work any longer - if you do it without no or a short timeout, the title gets replaced again with the original (no suffix) title.

For anyone else coming to this now, you need to add a delay of around 500ms on. I’m using 1 second here:

````auto
```space-script
silverbullet.registerEventListener({name: "editor:pageLoaded"}, (event) => {
  const pageName = event.data[0];
  setTimeout(() => {
    document.title = `${pageName} - whatever`;  
  }, 1000);
});
```

````

I’m not sure if it’s because the `editor:pageLoaded` is no longer the correct/final event to listen for?
