1const range = (start, end) => Array.from({length: (end - start)}, (v, k) => k + start); 2 3function validate_orcid(orcid){ 4 var mod = 11; 5 if (!orcid) return true; 6 var summ=0; 7 if (orcid.length!=19) return false; 8 if (orcid[4]!='-' || orcid[9]!='-' || orcid[14]!='-') return false; 9 for (var i=0;i<orcid.length-1;i++){ 10 if(i==4||i==9||i==14) continue; 11 summ=2*(summ+parseInt(orcid[i])); 12 } 13 remainder = summ % mod 14 check_waited = (mod+1-remainder)%mod 15 check = orcid[orcid.length-1]; 16 if (check=="X") check=10; 17 else check = parseInt(check); 18 if (check==check_waited) return true; 19 return false; 20} 21if (!Object.values) Object.values = o=>Object.keys(o).map(k=>o[k]); 22$("document").ready(function(){ 23 // sticky header 24 var nav_offset=$('nav.navbar').height(); 25 var fixmeTop = $('#navbarWrapper').offset().top; 26 var btn = $('#totop'); 27 $(document.body).on('touchmove', onScroll); 28 $(window).on('scroll', onScroll); 29 function onScroll() { 30 var currentScroll = jQuery(window).scrollTop(); 31 var btn = $('#totop'); 32 if (currentScroll >= 800){ 33 btn.addClass('show'); 34 } else { 35 btn.removeClass('show'); 36 } 37 if (window.innerWidth<960) return; 38 if (currentScroll >= fixmeTop-nav_offset) { 39 $('#navbarWrapper').css({ 40 position: 'fixed', 41 top: nav_offset+'px', 42 left: '0', 43 }); 44 $('#navbarWrapper').addClass("floating"); 45 $('.mainMenu .menu').css({background: "transparent"}) 46 } else { 47 $('#navbarWrapper').css({ 48 position: 'relative', 49 top: 0 50 }); 51 $('#navbarWrapper').removeClass("floating"); 52 $('.mainMenu .menu').css({background: ""}) 53 } 54 } 55 56 // article tables expand buttons 57 var i=1; 58 $(".tablefull").each(function(){ 59 if($(this).width()<$(this).find('table').width()){ 60 var scrollid='full_toggle_'+i; 61 var tmp='<a id="'+scrollid+'" class="full_toggle" onclick="toggleFullWidth(false,\''+scrollid+'\');"></a>'; 62 $(this).prepend(tmp); 63 } 64 i+=1; 65 }); 66 67 // expand buttons 68 btn.on('click', function(e) { 69 e.preventDefault(); 70 jQuery('html, body').animate({scrollTop:0}, '300'); 71 }); 72 if (getCookie("expanded")=="true"){ 73 toggleFullWidth(); 74 } 75 76 // rsci vidjet 77 if($("#rsci-rating").length){ 78 var set=false; 79 $("#issnp, #issne").each(function(){ 80 var issn=$(this).attr("data-id"); 81 $.get("https://api.elpub.ru/elpub/getRSCI",{"issn":issn}) 82 .done(function( data ) { 83 if(!data) return; 84 var contents = ""; 85 if (data.if2){ 86 contents+='<span class="title">ÐФ Ð ÐÐЦ:</span><span class="value">'+data.if2+"</span><br/>"; 87 } 88 if (data.hirsh10){ 89 contents+='<span class="title">H-INDEX:</span><span class="value">'+data.hirsh10+"</span><br/>"; 90 } 91 if (contents){ 92 $("#rsci-rating").prepend(contents); 93 set=true; 94 } else{ 95 $("#rsci-rating").remove() 96 } 97 }); 98 }); 99 } 100 101 $("input[id$=orcid]").change(function(){ 102 var replace = $(this).val().replace(/\s/g,''); 103 var rep = ""; 104 for (var i=0;i<replace.length;i++){ 105 if (i==4 || i==9 || i==14) 106 rep += "-"; 107 else 108 rep += replace[i] 109 } 110 $(this).val(rep); 111 if(!validate_orcid($(this).val())){ 112 $(this).css({"background":"#ff5348"}) 113 } 114 else{ 115 $(this).css({"background":"#caffca"}) 116 } 117 }); 118 119 $("input[id^=doi]").not("#doiSettings input").keyup(function(){ 120 if($(this).val() != $(this).val().replace(/[^a-zA-Z0-9-\._;\(\)\/]/g, '')){ 121 $(this).css({"background":"#ff5348"}) 122 } 123 else{ 124 $(this).css({"background":"#caffca"}) 125 } 126 }); 127 128 if($("input[id$=orcid]").length){ 129 $("#body form").submit(function (evt) { 130 $("input[id$=orcid]").each(function(){ 131 if(!validate_orcid($(this).val())){ 132 evt.preventDefault(); 133 $('html, body').animate({scrollTop: $(this).offset().top-100}, 1000); 134 } 135 }); 136 $("input[id^=doi]").each(function(){ 137 if($(this).val() != $(this).val().replace(/[^a-zA-Z0-9-\._;\(\)\/]/g, '')){ 138 evt.preventDefault(); 139 $('html, body').animate({scrollTop: $(this).offset().top-100}, 1000); 140 } 141 }); 142 }); 143 } 144 $("#edn").change(function(){ 145 if(!$(this).val()){ 146 return; 147 } 148 if($(this).val()==$('end_check').val()){ 149 $(this).css({"background":"#ff5348"}); 150 return; 151 } 152 $.get("/index/article/edn/",{"edn":$(this).val()}) 153 .done(function( data ) { 154 if (!data) $("#edn").css({"background":"#caffca"}); 155 else $("#edn").css({"background":"#ff5348"}); 156 }); 157 }); 158}); 159 160function setCookie(name,value,days=4) { 161 var expires = ""; 162 if (days) { 163 var date = new Date(); 164 date.setTime(date.getTime() + (days*24*60*60*1000)); 165 expires = "; expires=" + date.toUTCString(); 166 } 167 document.cookie = name + "=" + (value || "") + expires + "; path=/"; 168} 169function getCookie(name) { 170 var nameEQ = name + "="; 171 var ca = document.cookie.split(';'); 172 for(var i=0;i < ca.length;i++) { 173 var c = ca[i]; 174 while (c.charAt(0)==' ') c = c.substring(1,c.length); 175 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 176 } 177 return null; 178} 179 180function showMoreJDesc(){ 181 $('.journalDescription').css('height','auto'); 182 $('.journalInfo .readmore').hide(); 183 $('.journalInfo .fade').hide(); 184 $('.journalInfo .readless').show(); 185 return false;
186} 187 188function hideMoreJDesc(){ 189 $('.journalDescription').css('height',''); 190 $('.journalInfo .readmore').show(); 191 $('.journalInfo .fade').show(); 192 $('.journalInfo .readless').hide(); 193 return false; 194} 195 196$(".preview .file").click(function(){ 197 var src = $(this).find("img").attr("src"); 198 $("#image-back img").attr("src", src); 199 $("#image-back").show(); 200 return false; 201}); 202 203document.onkeydown = function(evt) { 204 evt = evt || window.event; 205 var isEscape = false; 206 if ("key" in evt) { 207 isEscape = (evt.key == "Escape" || evt.key == "Esc"); 208 } else { 209 isEscape = (evt.keyCode == 27); 210 } 211 if (isEscape) { 212 $("#image-back").hide(); 213 } 214}; 215 216$("#image-back, #qr-back").click(function(){ 217 $(this).hide(); 218 return false; 219}); 220 221$("#image-back img").click(function(e){ 222 e.stopPropagation(); 223}); 224 225function toggleFullWidth(save=false, scrollid=''){ 226 $("#sidebar").toggle(); 227 $(".full_toggle").toggleClass("active"); 228 $("#main").toggleClass("full"); 229 if (scrollid){ 230 $('html, body').scrollTop($("#"+scrollid).offset().top-120); 231 } 232 if (save){ 233 if($(".full_toggle").hasClass("active")){ 234 setCookie("expanded", "true"); 235 } else { 236 setCookie("expanded", "false"); 237 } 238 } 239} 240 241function toggleAbstract(article_id, link){ 242 $('#abstract-'+article_id).toggle(200); 243 $('#abstract-toggle-'+article_id).toggleClass('active'); 244 if ($('#abstract-toggle-'+article_id).hasClass('active')) $.ajax({"url":link}); 245} 246 247function hideCitationsTooltip(){ 248 $("#citation-tooltip").fadeOut(500); 249 $("#citation-tooltip .extra-text").fadeOut(500); 250} 251 252function scrollToFootnote(index){ 253 $("sup").removeClass("elluminate"); 254 var footnote = $("sup:contains("+index+")").first(); 255 if (!footnote.length) return; 256 $('html, body').animate({scrollTop: footnote.offset().top-150}, 500); 257 footnote.addClass("elluminate"); 258} 259 260function scrollToCitation(index){ 261 var citation = $("a:contains('["+index+"]'), a:contains('["+index+"-'), a:contains('["+index+"â'), a:contains('["+index+",'), a:contains('["+index+" '), a:contains('["+index+";')").first(); 262 if (citation.length) $('html, body').animate({scrollTop: citation.offset().top-150}, 500); 263} 264 265function createCitationLinks(){ 266 $(".fullHTML").html($(".fullHTML").html().replace(/(\[.*?\])/g, '<a href="#" class="citation-link">$1</a>')); 267 $("body").append('<div id="citation-tooltip">\ 268 <div class="container">\ 269 <a class="close-cross" href="#" onclick="hideCitationsTooltip(); return false;"></a>\ 270 <div class="inner">\ 271 <div class="text"></div>\ 272 <div class="extra-text"></div>\ 273 </div>\ 274 </div></div>'); 275 276 277 $(".citation-link").each(function(){ 278 let number_array = $(this).text().match(/^\d+|\d+\b|\d+(?=\w)/g); 279 280 if (!number_array || !($(this).text()[1] >= '1' && $(this).text()[1] <= '9')){ 281 $(this).replaceWith($(this).html()); 282 return; 283 } 284 var start = parseInt(number_array[0]); 285 var end = start; 286 var links = [start]; 287 if(number_array.length>1 && ($(this).text().includes('-')||$(this).text().includes('â'))){ 288 if(!$(this).text().includes(',')){ 289 end = parseInt(number_array[1]); 290 links = range(start, end+1); 291 } 292 } 293 var html = ''; 294 for(var i = 0; i < links.length; i++){ 295 html+=$("#articleCitations p:eq("+(links[i]-1)+")").html()+'<br/>'; 296 } 297 $(this).click(function(){ 298 $("#citation-tooltip .text").html(html); 299 $("#citation-tooltip").fadeIn(500); 300 return false; 301 }); 302 }); 303 304 $("#articleTitle sup, .fullHTML sup, #articleAbstract sup").not('.nohighlight sup').each(function(){ 305 let number_array = $(this).text().match(/^\d+|\d+\b|\d+(?=\w)/g); 306 if (!number_array || !($(this).text()[0] >= '1' && $(this).text()[0] <= '9')){ 307 return; 308 } 309 var link_number = parseInt(number_array[0]); 310 $(this).wrap('<a href="#">'); 311 $(this).parent().click(function(){ 312 $("#citation-tooltip .text").html($(".footnotes p:eq("+(link_number-1)+")").html()); 313 $("#citation-tooltip").fadeIn(500); 314 315 $("#citation-tooltip .text a[href='#']").each(function(){ 316 let number_array_inner = $(this).text().match(/^\d+|\d+\b|\d+(?=\w)/g); 317 if (!number_array_inner || !($(this).text()[1] >= '1' && $(this).text()[1] <= '9')){ 318 //$(this).replaceWith($(this).text()); 319 return; 320 } 321 var link_number = parseInt(number_array_inner[0]); 322 $(this).click(function(){ 323 $("#citation-tooltip .extra-text").html($("#articleCitations p:eq("+(link_number-1)+")").html()); 324 $("#citation-tooltip .extra-text").fadeIn(500); 325 return false;
326 }); 327 328 }) 329 return false; 330 }); 331 332 }); 333 334 $(".footnotes p").each(function(index){ 335 $(this).prepend('<a href="#" class="before" onclick="scrollToFootnote('+(index+1)+'); return false">↑</a>'); 336 }) 337 338 $("#articleCitations p").each(function(index){ 339 $(this).prepend('<a href="#" class="before" onclick="scrollToCitation('+(index+1)+'); return false">↑</a>'); 340 }) 341 342 $("body").click(function(){ 343 hideCitationsTooltip(); 344 }); 345 346 $("#citation-tooltip").click(function(e){ 347 e.stopPropagation(); 348 }); 349 350} 351 352function goBack(){ 353 window.location.href = document.referrer; 354} 355 356function openAdmin(path="jour"){ 357 var base = document.location.origin+"/"+path+"/"; 358 window.open(base+"editor/backIssues", "w1"); 359 window.open(base+"manager/importexport/plugin/ElibraryImportExportPlugin/issues", "w2"); 360 window.open(base+"manager/importexport/plugin/CrossRefExportPlugin/issues", "w3"); 361 window.open(base+"manager/plugin/importexport/CrossRefExportPlugin/settings", "w4"); 362 window.open("https://doi.crossref.org/", "w5"); 363 window.open("http://markup.elibrary.ru/JournalProjects/My", "w6"); 364} 365 366 367/*$(".banners").slick({ 368 rows: 2, 369 slidesPerRow: 3, 370 arrows: false, 371 dots: true, 372 infinite: true, 373 autoplay: true, 374 autoplaySpeed: 4000, 375});*/
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.