locizify 5.2.10 → 5.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/umd/locizify.js +4 -4
- package/dist/umd/locizify.min.js +2 -2
- package/locizify.js +4 -4
- package/locizify.min.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/umd/locizify.js
CHANGED
|
@@ -8727,13 +8727,13 @@
|
|
|
8727
8727
|
}
|
|
8728
8728
|
|
|
8729
8729
|
if (window.document.title) {
|
|
8730
|
-
var keyTitle = window.document.getElementsByTagName('title').length > 0 && window.document.getElementsByTagName('title')[0].getAttribute(
|
|
8730
|
+
var keyTitle = window.document.getElementsByTagName('title').length > 0 && window.document.getElementsByTagName('title')[0].getAttribute(instance.options.keyAttr);
|
|
8731
8731
|
window.document.title = instance.t(keyTitle || window.document.title);
|
|
8732
8732
|
}
|
|
8733
8733
|
|
|
8734
|
-
if (document.querySelector('meta[name="description"]') && document.querySelector('meta[name="description"]').content) {
|
|
8735
|
-
var keyDescr = document.querySelector('meta[name="description"]').getAttribute(instance.options.keyAttr) || document.querySelector('meta[name="description"]').content;
|
|
8736
|
-
document.querySelector('meta[name="description"]').setAttribute("content", instance.t(keyDescr));
|
|
8734
|
+
if (window.document.querySelector('meta[name="description"]') && window.document.querySelector('meta[name="description"]').content) {
|
|
8735
|
+
var keyDescr = window.document.querySelector('meta[name="description"]').getAttribute(instance.options.keyAttr) || window.document.querySelector('meta[name="description"]').content;
|
|
8736
|
+
window.document.querySelector('meta[name="description"]').setAttribute("content", instance.t(keyDescr));
|
|
8737
8737
|
}
|
|
8738
8738
|
|
|
8739
8739
|
options.onInitialTranslate();
|