From da67643ea48de8481f8c35f9dd88ee2ac45b486f Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 8 Feb 2017 01:37:13 +0300 Subject: [PATCH 1/4] Drop useless code --- common.blocks/yandex-metrica/yandex-metrica.bemhtml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 : { From 5b7b9053e6d7a91e83f66bdd5099485569a7eb4c Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 8 Feb 2017 01:43:11 +0300 Subject: [PATCH 2/4] Update 00-basic.html --- .../yandex-metrica/yandex-metrica.tmpl-specs/00-basic.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ - + From 102ab51a6d034d7454d5eb743628453cc7cdd131 Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 8 Feb 2017 01:43:27 +0300 Subject: [PATCH 3/4] Update 10-csp-nonce.html --- .../yandex-metrica/yandex-metrica.tmpl-specs/10-csp-nonce.html | 1 - 1 file changed, 1 deletion(-) 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"; From 024550f59e7148bdf0d3c5e6b24a65de69a53327 Mon Sep 17 00:00:00 2001 From: Vladimir Grinenko Date: Wed, 8 Feb 2017 01:54:30 +0300 Subject: [PATCH 4/4] Update yandex-metrica.bh.js --- common.blocks/yandex-metrica/yandex-metrica.bh.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 : {