1jQuery(function(){ 2 3 $(document).on("click", "#main_menu_button", function(){ 4 if ($("#conteiner_menu").hasClass("close")) { 5 $("#conteiner_menu").removeClass("close"); 6 $("body").addClass("o_menu"); 7 } 8 else { 9 $("#conteiner_menu").addClass("close"); 10 $("body").removeClass("o_menu"); 11 } 12 }); 13 14 $(document).on("click", ".menu-bg, .menu-close", function(){ 15 console.log("click "); 16 if ($("#conteiner_menu").hasClass("close")) { 17 $("#conteiner_menu").removeClass("close"); 18 $("body").addClass("o_menu"); 19 } 20 else { 21 $("#conteiner_menu").addClass("close"); 22 $("body").removeClass("o_menu"); 23 } 24 }); 25 26 // $(window).resize(function(){ 27 // widthDoc = $(document).width(); 28 // a_banners_init(widthDoc); 29 // //console.log("resize"); 30 // }); 31 32 var widthDoc = $(window).width(); 33 $(window).resize(function(){ 34 if($(window).width() != widthDoc){ 35 //DO RESIZE 36 a_banners_init(widthDoc); 37 widthDoc = $(window).width(); 38 } 39 }); 40 41 42 43 widthDoc = $(document).width(); 44 a_banners_init(widthDoc); 45 46 47 $(document).ready(function(){ 48 $(".wp-block-image a").colorbox({ 49 rel: "gallery", // обÑединÑÐµÑ Ð² гÑÑÐ¿Ð¿Ñ 50 maxWidth: "95%", 51 maxHeight: "95%" 52 }); 53 }); 54 55 56}); 57 58 59function a_banners_init(widthDoc) { 60 single_body = $("body.single").length; 61 $(".add-full-line").remove(); 62 $(".contentColumn .chronicle-posts .widget_banners-widget").remove(); 63 //$(".contentColumn .chronicle-posts iframe.banner-dor").remove(); 64 65 $(".single-post .contentColumn .widget_banners-widget").each(function(i,el) { 66 el = $(this).parent(".banners-contexts"); 67 68 //console.log(el); 69 //console.log($(this)); 70 71 if ($(el).length > 0) { 72 } else { 73 $(this).remove(); 74 } 75 }); 76 77 78 79 //iframe_ban = $("iframe.banner-dor")[0].outerHTML; 80 81 arr_banners = $(".rightColumn .widget_banners-widget .banners-widget-visible-m"); 82 count_arr_banners = arr_banners.length; 83 //console.log(count_arr_banners); 84 arr_banners_cont = []; 85 arr_banners.each(function (index, value) { 86 arr_banners_cont[index] = $(this); 87 //console.log(arr_banners_cont[index].parent()[0].outerHTML); 88 89 }); 90 91 92 93 94 95 96 // if (count_arr_banners >= 2) { 97 // arr_banners1 = $($(".rightColumn .widget_banners-widget .banners-widget-visible-m")[0]).parent()[0].outerHTML; 98 // arr_banners2 = $($(".rightColumn .widget_banners-widget .banners-widget-visible-m")[1]).parent()[0].outerHTML; 99 // arr_banners3 = $($(".rightColumn .widget_banners-widget .banners-widget-visible-m")[2]).parent()[0].outerHTML; 100 // // arr_banners4 = $($(".rightColumn .widget_banners-widget .banners-widget-visible-m")[3]).parent()[0].outerHTML; 101 // } else if (count_arr_banners == 1) { 102 // arr_banners1 = $($(".rightColumn .widget_banners-widget .banners-widget-visible-m")[0]).parent()[0].outerHTML; 103 // } 104 105 if (single_body) { 106 if (widthDoc < 769) { 107 console.log(single_body); 108 109 110 111 112 //index_chronicle = Math.floor($(".chronicle-posts hr.full-line").length/(count_arr_banners)); 113 114 //console.log(index_chronicle); 115 //count_arr_banners_print = 0; 116 //i = 0; 117 $(arr_banners_cont).each(function (index, value) { 118 //if (i == index_chronicle) { 119 $("body.single article.post footer.entry-meta").before(arr_banners_cont[index].parent()[0].outerHTML); 120 console.log(index); 121 //count_arr_banners_print = count_arr_banners_print + 1; 122 //i = 0; 123 //} 124 //i = i + 1; 125 }); 126 127 128 // if (count_arr_banners >= 2) { 129 // //$("body.single article.post footer.entry-meta").before(iframe_ban); 130 // $("body.single article.post footer.entry-meta").before(arr_banners1) ; 131 // $("body.single article.post footer.entry-meta").before(arr_banners2) ; 132 // $("body.single article.post footer.entry-meta").before(arr_banners3) ; 133 // // $("body.single article.post footer.entry-meta").before(arr_banners4) ; 134 // //console.log(count_arr_banners); 135 // } 136 // if (count_arr_banners == 1) { 137 // $("body.single article.post .entry-content").after(arr_banners1); 138 // } 139 } 140 } else { 141 142 if (widthDoc < 769) { 143 144 index_chronicle = Math.floor($(".chronicle-posts hr.full-line").length/(count_arr_banners)); 145 146 console.log(index_chronicle); 147 count_arr_banners_print = 0; 148 i = 0; 149 $(".chronicle-posts hr.full-line").each(function (index, value) { 150 if (i == index_chronicle) { 151 $(this).before('<hr class="full-line add-full-line">'+arr_banners_cont[count_arr_banners_print].parent()[0].outerHTML); 152 count_arr_banners_print = count_arr_banners_print + 1; 153 i = 0; 154 } 155 i = i + 1; 156 }); 157 158 159 160 // if (count_arr_banners >= 2) { 161 // $(".chronicle-posts hr.full-line:first").before('<hr class="full-line add-full-line">'+arr_banners1) ; 162 // $(".chronicle-posts hr.full-line:eq(6)").before('<hr class="full-line add-full-line">'+arr_banners2) ; 163 // $(".chronicle-posts hr.full-line:eq(12)").before('<hr class="full-line add-full-line">'+arr_banners3) ; 164 // // $(".chronicle-posts hr.full-line:eq(18)").before('<hr class="full-line add-full-line">'+arr_banners4) ; 165 // } 166 // if (count_arr_banners == 1) { 167 // console.log("132"); 168 // $(".chronicle-posts hr.full-line:first").before('<hr class="full-line add-full-line">'+arr_banners1) ; 169 // } 170 } 171 172 } 173 174} 175 176function getSelectedText(){ 177 var text = ""; 178 if (window.getSelection) { 179 text = window.getSelection(); 180 }else if (document.getSelection) { 181 text = document.getSelection(); 182 }else if (document.selection) { 183 text = document.selection.createRange().text; 184 } 185 return text; 186} 187jQuery(function(){ 188// ÐÑÑлеживание нажаÑÐ¸Ñ ÐºÐ½Ð¾Ð¿Ð¾Ðº 189 $(document).ready(function() { 190 // пÑи нажаÑии на Ctrl + Enter 191 192 // var isCtrl = false;
193 // $(document).keyup(function (e) { 194 // if(e.which == 17) isCtrl = false; 195 // }).keydown(function (e) { 196 // if(e.which == 17) isCtrl=true; 197 // if(e.which == 13 && isCtrl == true) { 198 // // полÑÑаем и показÑваем вÑделеннÑй ÑекÑÑ 199 // text = getSelectedText(); 200 201 202 // console.log(text['anchorNode']); 203 // } 204 // }); 205 206 207 208 209 $('img[data-src]').each(function() { 210 $(this).attr('src', $(this).attr('data-src')); 211 $(this).load(function() { 212 $(this).removeAttr('data-src'); 213 }); 214 }); 215 216 217 218 //$('#wp_popular_fixed').ready(function(){ 219 //$(this).text('ÐагÑÑжаÑ...'); 220 221 if (typeof upload_load_popular_fixed !== 'undefined') { 222 var data_load_popular_fixed = { 223 'action': 'load_popular_fixed', 224 'posts_per_page': posts_per_page, 225 'posts_prewiev_page' : posts_prewiev_page, 226 }; 227 $.ajax({ 228 url:'/wp-admin/admin-ajax.php', // обÑабоÑÑикdata:data, // даннÑе 229 data: data_load_popular_fixed, // Ñип запÑоÑа 230 type:'POST', // Ñип запÑоÑа 231 success:function(respond){ 232 if( respond ) { 233 $('#wp_popular_fixed').html(respond); // вÑÑавлÑем новÑе поÑÑÑ 234 } else { 235 $('#wp_popular_fixed').html("ÐÑибка загÑÑзки"); // еÑли Ð¼Ñ Ð´Ð¾Ñли до поÑледней ÑÑÑаниÑÑ Ð¿Ð¾ÑÑов, ÑкÑоем ÐºÐ½Ð¾Ð¿ÐºÑ 236 } 237 } 238 }); 239 //}); 240 } 241 242 243 244 245 $(document).on("click", "#main_search_button", function(){ 246 if ($(".wrapper-header-info").hasClass("open-search")) { 247 $(".wrapper-header-info").removeClass("open-search"); 248 } 249 else { 250 $(".wrapper-header-info").addClass("open-search"); 251 } 252 }); 253 254 255 256 257 }); 258 259 260 261 262}); 263 264 265 266 267 268 269 270 271
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.