[openstreetmap/openstreetmap-website] Propagate iD title to parent (PR #5865)
Marwin Hochfelsner
notifications at github.com
Mon Mar 31 06:40:46 UTC 2025
@hlfan commented on this pull request.
> @@ -76,5 +76,10 @@ document.addEventListener("DOMContentLoaded", function () {
const data = parent.OSM.mapParams();
goToLocation(data);
});
+
+ const projectTitle = parent.document.title;
+ new MutationObserver(() =>
+ parent.document.title = [document.title, projectTitle].filter(t => t).join(" | ")
+ ).observe(document.querySelector("title"), { childList: true, characterData: true });
Took out `subtree` while moving to watch the title directly and forgot to put it back in.
_"Sometimes, my [confusion] is... It's almost frightening."_
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5865#discussion_r2020477550
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5865/review/2728347810 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250330/fa3945ea/attachment-0001.htm>
More information about the rails-dev
mailing list