1jQuery(document).ready(function () {
2
3 $(".news-list .text").each(function () {
4 var $this = $(this);
5 var text = $this.html();
6 // Заменяем все на обычный пробел
7 text = text.replace(/(?:\s| )+/g, ' ');
8 $this.html(text);
9 });
10 $(".page-text").each(function () {
11 var $this = $(this);
12 var text = $this.html();
13 // Заменяем все на обычный пробел
14 text = text.replace(/(?:\s| )+/g, ' ');
15 $this.html(text);
16 });
17
18 document_ready();
19 if (catalog_actions_icons.length > 0) {
20 for (i in catalog_actions_icons) {
21 catalog_actions_icons(i, catalog_actions_icons[i]);
22 }
23 }
24 $("span[data-href]").each(function () {
25 var target_attr = "";
26 if ($(this).attr("target") != undefined)
27 target_attr = ' target="' + $(this).attr("target") + '"';
28 var class_attr = "";
29 if ($(this).attr("class") != undefined)
30 class_attr = ' class="' + $(this).attr("class") + '"';
31 $(this).replaceWith(
32 '<a href="' +
33 $(this).attr("data-href") +
34 '"' +
35 target_attr +
36 class_attr +
37 ">" +
38 $(this).html() +
39 "</a>",
40 );
...
</html>