Make yandex-metrica generated HTML a bit smaller#64
Conversation
| ' var n = d.getElementsByTagName("script")[0],', | ||
| ' s = d.createElement("script"),', | ||
| ' f = function () { n.parentNode.insertBefore(s, n); };', | ||
| ' s.type = "text/javascript";', |
There was a problem hiding this comment.
text/javascript is default value
There was a problem hiding this comment.
Uh, but why Metrica provides this attribute? May be it brings value for using in old browsers?
There was a problem hiding this comment.
I don't think we should care for such old browsers.
| ].join(''); | ||
|
|
||
| noScriptContent = { | ||
| tag : 'div', |
| ' d.addEventListener("DOMContentLoaded", f, false);', | ||
| ' } else { f(); }', | ||
| '})(document, window, "yandex_metrika_callbacks");' | ||
| ].join('\n'); |
There was a problem hiding this comment.
should safe ~35 bytes :)
|
please squash commits before merge |
|
I propose to implement it into a modifier. Something like I don't like to get minified script by default. Metrica provides script such our current template does. I'd like to save this behaviour. |
|
When you apply BEMHTML templates to BEMJSON you get minimized HTML. |
|
Ok, you're right. |
No description provided.