Skip to content

Instantly share code, notes, and snippets.

View nedgar's full-sized avatar

Nick Edgar nedgar

View GitHub Profile
@nedgar
nedgar / roam_prefix_title.txt
Last active December 17, 2020 17:51
Roam Research roam/js extension to show "Roam: " as browser window prefix
- Copy/paste the JS code block below under a `{{[[roam/js]]}}` block on any page (import does not format it correctly).
- Doc on roam/js extensions: https://roamresearch.com/#/app/help/page/3l_9j6aAv
- {{[[roam/js]]}}
- ```javascript
function checkTitle() {
const t = document.title, r = 'Roam: ';
if (!t.startsWith(r)) { document.title = r + t; }
};
new MutationObserver(checkTitle).observe(
document.querySelector('title'),