Skip to content

Commit 6948eda

Browse files
committed
Merge branch 'pull/5865'
2 parents 45a8515 + 7a8bc77 commit 6948eda

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

app/assets/javascripts/id.js

+5
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,10 @@ document.addEventListener("DOMContentLoaded", function () {
7676
const data = parent.OSM.mapParams();
7777
goToLocation(data);
7878
});
79+
80+
const projectTitle = parent.document.title;
81+
new MutationObserver(() =>
82+
parent.document.title = [document.title, projectTitle].filter(t => t).join(" | ")
83+
).observe(document.querySelector("title"), { childList: true, subtree: true, characterData: true });
7984
}
8085
});

app/views/site/id.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<!--[if !IE || gte IE 9]><!-->
77
<%= javascript_include_tag "id" %>
88
<!-- <![endif]-->
9+
<title></title>
910
</head>
1011
<body>
1112
<% data = {}

0 commit comments

Comments
 (0)