1document.addEventListener('DOMContentLoaded', function() { 2 3 var scrollUp = document.getElementById('scrollup'); // найÑи ÑÐ»ÐµÐ¼ÐµÐ½Ñ 4 if ( !scrollUp ) return; 5 6 scrollUp.onmouseover = function() { // добавиÑÑ Ð¿ÑозÑаÑноÑÑÑ 7 scrollUp.style.opacity=0.8; 8 scrollUp.style.filter = 'alpha(opacity=80)'; 9 }; 10 11 scrollUp.onmouseout = function() { //ÑбÑаÑÑ Ð¿ÑозÑаÑноÑÑÑ 12 scrollUp.style.opacity = 0.5; 13 scrollUp.style.filter = 'alpha(opacity=50)'; 14 }; 15 16 scrollUp.onclick = function() { //обÑабоÑка клика 17 window.scrollTo(0,0); 18 }; 19 20// show button 21 22 function toggleScrollUp() { // пÑи ÑкÑолле показÑваÑÑ Ð¸ пÑÑÑаÑÑ Ð±Ð»Ð¾Ðº 23 if ( window.pageYOffset > 0 ) { 24 scrollUp.style.display = 'block'; 25 } else { 26 scrollUp.style.display = 'none'; 27 } 28 } 29 30 window.addEventListener('scroll', toggleScrollUp, { passive: true }); 31 toggleScrollUp(); 32}); 33 34$(document).ready(function(){ 35 36 $('.frate').each(function(){ 37 var rate = $(this), 38 rdata = rate.find('.rate-data'), 39 rrate = parseInt(rdata.find('.ratingtypeplusminus').text(), 10), 40 rvote = parseInt(rdata.find('span[id*=vote]').text(), 10); 41 rate.append('<div class="rbar"><div class="rfill"></div></div>'); 42 if ( rvote >= rrate && rvote > 0 ) { 43 var m = (rvote - rrate)/2, 44 p = rvote - m, 45 perc = Math.round(p/rvote*100); 46 rate.find('.rate-plus span').html(p); 47 rate.find('.rate-minus span').html(m); 48 rate.find('.rfill').css({'width':''+perc+'%'}); 49 }; 50 }); 51 52}); 53 54 function doRateLD( rate, id ) { 55 ShowLoading(''); 56 $.get(dle_root + "engine/ajax/rating.php", { go_rate: rate, news_id: id, skin: dle_skin, user_hash: dle_login_hash }, function(data){ 57 HideLoading(''); 58 if ( data.success ) { 59 var rating = data.rating; 60 rating = rating.replace(/</g, "<"); 61 rating = rating.replace(/>/g, ">"); 62 rating = rating.replace(/&/g, "&"); 63 $("#ratig-layer-" + id).html(rating); 64 $("#vote-num-id-" + id).html(data.votenum); 65 var rt = parseInt($(rating).text()), 66 m = (data.votenum - rt)/2, 67 p = data.votenum - m, 68 perc = Math.round(p/data.votenum*100), 69 fRate = $("#frate-" + id); 70 fRate.find('.rate-plus span').html(p); 71 fRate.find('.rate-minus span').html(m); 72 fRate.find('.rfill').css({'width':''+perc+'%'}); 73 } else if (data.error) {DLEalert ( data.errorinfo, dle_info );} 74 }, "json"); 75 };
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.