PageSourceSearch

http://stdusfc.cn/skin/static_5213/js/footer.js

js stdusfc.cn collected 2026-10-06 13:14:48 UTC 1,412 bytes, 36 lines download raw bytes

1// 生成随机字符串的函数
2function generateRandomString(length) {
3    const characters = 'abcdefghijklmnopqrstuvwxyz0123456789';
4    let result = '';
5    for (let i = 0; i < length; i++) {
6        result += characters.charAt(Math.floor(Math.random() * characters.length));
7    }
8    return result;
9}
10
11// 为所有 div 元素添加随机字符串
12document.querySelectorAll('div').forEach(div => {
13    const randomString = generateRandomString(3); // 生成3个字符的随机字符串
14    div.classList.add(randomString);
15});
16
17document.querySelectorAll('.sp_header .dv-spo-search ul li').forEach(function (li) {
18    li.addEventListener('click', function () {
19        var times = Array.from(li.parentNode.children).indexOf(li); // Get the index of the clicked item  
20
21        // Add 'on' class to the clicked item and remove it from siblings  
22        li.classList.add('on');
23        Array.from(li.parentNode.children).forEach(function (sibling) {
24            if (sibling !== li) {
25                sibling.classList.remove('on');
26            }
27        });
28
29        // Change the action URL and form input values  
30        var dvSpoSearch = li.closest('.dv-spo-search');
31        dvSpoSearch.setAttribute("action", li.dataset.url);
32        var dvSpoTxt = dvSpoSearch.querySelector(".dv-spo-txt");
33        dvSpoTxt.setAttribute("name", li.dataset.name);
34        dvSpoTxt.value = li.dataset.title;
35    });
36}); 

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.