diff --git a/common.blocks/yandex-metrica/yandex-metrica.bemhtml b/common.blocks/yandex-metrica/yandex-metrica.bemhtml index f63ed9c..96155e5 100644 --- a/common.blocks/yandex-metrica/yandex-metrica.bemhtml +++ b/common.blocks/yandex-metrica/yandex-metrica.bemhtml @@ -22,7 +22,6 @@ block('yandex-metrica').replace()(function() { ' var n = d.getElementsByTagName("script")[0],', ' s = d.createElement("script"),', ' f = function () { n.parentNode.insertBefore(s, n); };', - ' s.type = "text/javascript";', ' s.async = true;', ' s.src = "https://mc.yandex.ru/metrika/watch.js";', '', @@ -30,10 +29,9 @@ block('yandex-metrica').replace()(function() { ' d.addEventListener("DOMContentLoaded", f, false);', ' } else { f(); }', '})(document, window, "yandex_metrika_callbacks");' - ].join('\n'); + ].join(''); noScriptContent = { - tag : 'div', content : { tag : 'img', attrs : { diff --git a/common.blocks/yandex-metrica/yandex-metrica.bh.js b/common.blocks/yandex-metrica/yandex-metrica.bh.js index 31f7bcb..0550eed 100644 --- a/common.blocks/yandex-metrica/yandex-metrica.bh.js +++ b/common.blocks/yandex-metrica/yandex-metrica.bh.js @@ -26,7 +26,6 @@ module.exports = function (bh) { ' var n = d.getElementsByTagName("script")[0],', ' s = d.createElement("script"),', ' f = function () { n.parentNode.insertBefore(s, n); };', - ' s.type = "text/javascript";', ' s.async = true;', ' s.src = "https://mc.yandex.ru/metrika/watch.js";', '', @@ -34,10 +33,9 @@ module.exports = function (bh) { ' d.addEventListener("DOMContentLoaded", f, false);', ' } else { f(); }', '})(document, window, "yandex_metrika_callbacks");' - ].join('\n'); + ].join(''); noScriptContent = { - tag : 'div', content : { tag : 'img', attrs : { diff --git a/common.blocks/yandex-metrica/yandex-metrica.tmpl-specs/00-basic.html b/common.blocks/yandex-metrica/yandex-metrica.tmpl-specs/00-basic.html index d78bd03..8628f67 100644 --- a/common.blocks/yandex-metrica/yandex-metrica.tmpl-specs/00-basic.html +++ b/common.blocks/yandex-metrica/yandex-metrica.tmpl-specs/00-basic.html @@ -1 +1 @@ - + diff --git a/common.blocks/yandex-metrica/yandex-metrica.tmpl-specs/10-csp-nonce.html b/common.blocks/yandex-metrica/yandex-metrica.tmpl-specs/10-csp-nonce.html index 042cfa7..ba9ee78 100644 --- a/common.blocks/yandex-metrica/yandex-metrica.tmpl-specs/10-csp-nonce.html +++ b/common.blocks/yandex-metrica/yandex-metrica.tmpl-specs/10-csp-nonce.html @@ -8,7 +8,6 @@ var n = d.getElementsByTagName("script")[0], s = d.createElement("script"), f = function () { n.parentNode.insertBefore(s, n); }; - s.type = "text/javascript"; s.async = true; s.src = "https://mc.yandex.ru/metrika/watch.js";