mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Add endpoints to customize or disable iD's changing of the document title (close #7503)
Use the initial title as the default base title
This commit is contained in:
@@ -49,7 +49,7 @@ export function behaviorHash(context) {
|
||||
|
||||
function computedTitle(includeChangeCount) {
|
||||
|
||||
var baseTitle = 'iD';
|
||||
var baseTitle = context.documentTitleBase() || 'iD';
|
||||
var contextual;
|
||||
var changeCount;
|
||||
var titleID;
|
||||
@@ -89,6 +89,8 @@ export function behaviorHash(context) {
|
||||
}
|
||||
|
||||
function updateTitle(includeChangeCount) {
|
||||
if (!context.setsDocumentTitle()) return;
|
||||
|
||||
var newTitle = computedTitle(includeChangeCount);
|
||||
if (document.title !== newTitle) {
|
||||
document.title = newTitle;
|
||||
|
||||
Reference in New Issue
Block a user