feat: allow modifiying browser title on ajaxify

v1.18.x
Barış Soner Uşaklı 4 years ago
parent c111bde126
commit 698718f87c

@ -194,8 +194,9 @@ ajaxify = window.ajaxify || {};
// Allow translation strings in title on ajaxify (#5927) // Allow translation strings in title on ajaxify (#5927)
title = translator.unescape(title); title = translator.unescape(title);
var data = { title: title };
translator.translate(title, function (translated) { $(window).trigger('action:ajaxify.updateTitle', data);
translator.translate(data.title, function (translated) {
window.document.title = $('<div></div>').html(translated).text(); window.document.title = $('<div></div>').html(translated).text();
}); });
}); });

Loading…
Cancel
Save