PageSourceSearch

https://nauka.one/storage/data-front/js/storage__scripts.js?ver=1

js nauka.one collected 2026-10-07 22:43:38 UTC 1,746 bytes, 62 lines download raw bytes

1
2/* ========== PRELOADER ========== */
3
4let preloader = document.querySelector('#preloader');
5/* ----- */
6window.addEventListener('load', () => {
7    setInterval(function() {
8        preloader.classList.add('inactive');
9    }, 300);
10    setInterval(function() {
11        preloader.remove();
12    }, 1000);
13});
14
15
16
17/* ========== ДИСКЛЕЙМЕР ========== */
18
19document.addEventListener('DOMContentLoaded', () => {
20    let disclaimer = document.querySelector('#disclaimer');
21    /* ----- */
22    if (disclaimer) {
23        disclaimer.querySelector('button').addEventListener('click', () => {
24            disclaimer.style.display = 'none';
25            document.cookie = 'disclaimer=hide; max-age=2592000; path=/; domain=.nauka.one';
26        });
27    }
28});
29
30
31
32/* ========== ПОДЕЛИТЬСЯ ========== */
33
34const shareButton = document.querySelectorAll('.btn__share'),
35      thisUrl = window.location.href, thisTitle = document.title;
36let shareFunc = function() {
37    if (navigator.share) {
38        navigator.share({
39            title: thisTitle,
40            url: thisUrl
41        }).catch(console.error);
42    }
43};
44shareButton.forEach(function(item) {
45    item.addEventListener('click', shareFunc, false);
46});
47
48
49
50/* ========== TOP ========== */
51
52let btnTop = document.querySelector('#btn__top');
53/* ----- */
54['load', 'scroll'].forEach(function(event) {
55    window.addEventListener(event, () => {
56        if (window.scrollY > 75 && btnTop && !btnTop.classList.contains('active')) {
57            btnTop.classList.add('active'); 
58        } else if (window.scrollY < 75 && btnTop && btnTop.classList.contains('active')) {
59            btnTop.classList.remove('active'); 
60        }
61    });
62});

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.