PageSourceSearch

https://www.memorysensory.com/static/js/site/init.js?v=v10

js memorysensory.com collected 2026-09-25 10:55:40 UTC 3,214 bytes, 101 lines download raw bytes

1$(function(){
2    // 对分页的链接添加处理
3    if (!tools.isEmptyValue($('.pagination').toArray())){
4        $('.pagination>a ').each(function(index, el) {
5            if ($(el).attr('href') !="#") {
6                el.href+=location.search;
7            };
8        });
9    };
10
11    // 验证码
12$('input[name="captchas"]').one('focusin',function(e){
13    img = $(this).next('img.captchas');
14    if (tools.isEmptyValue(img)) {
15        img = $(this).next().next('img.captchas');
16    };
17    if ($(img).attr('src') == "" || $(img).attr('src') == "#" || $(img).attr('src') == "/img/blank.png") {
18        $(img).attr('src',SITE_URL+'captchas');
19    };
20});
21
22if ($('img.captchas').attr('src') == "" || $('img.captchas').attr('src') == "#" || $('img.captchas').attr('src') == "/img/blank.png") {
23    $('img.captchas').attr('src',SITE_URL+'captchas');
24};
25// $('img.captchas').after('<a href="#">获取验证码</a>');
26
27$('img.captchas').click(function(e){
28    $(this).attr('src','');
29    $(this).attr('src',SITE_URL+'captchas');
30});
31});
32
33/**
34 * @brief 创建表单验证
35 * 注意引用  jquery.validate.js 和 jquery.validate.lang.cn.js
36 * @param frm  表单 Id
37 * @param rules 验证规则
38 */
39function make_validate(frm,rules,messages,inline){
40    if (inline == 0) {
41        inline = "block";
42    }else{
43        inline = "inline";
44    }
45    $('#'+frm).validate({
46        ignore: ".ignore", // 忽略
47        rules:rules,
48        onchange: true,
49        onblur: true,
50        messages:messages,
51        errorClass: "help-"+inline+" validate",
52        errorElement: "span",
53        highlight:function(element, errorClass, validClass) {
54            $(element).removeClass('success');
55            $(element).addClass('error');
56        },
57        unhighlight: function(element, errorClass, validClass) {
58            $(element).removeClass('error');
59            $(element).addClass('success');
60        }
61        // ,errorPlacement: function(error, element) {
62        //     error.appendTo($(element).parents(".control-group"));
63        // }
64    });
65}
66
67/**
68 * @brief 创建表单验证
69          带有返回函数, 可以验证后直接用ajax处理
70 * 注意引用  jquery.validate.js 和 jquery.validate.lang.cn.js
71 * @param frm  表单 Id
72 * @param rules 验证规则
73 */
74function make_validate_submit(frm,rules,messages,submit_fun,inline){
75    if (inline == 0) {
76        inline = "block";
77    }else{
78        inline = "inline";
79    }
80    $('#'+frm).validate({
81        ignore: ".ignore", // 忽略
82        rules:rules,
83        onchange: true, 
84        onblur: true,
85        messages:messages,
86        errorClass: "help-inline validate",
87        errorElement: "span",
88        highlight:function(element, errorClass, validClass) {
89            $(element).removeClass('success');
90            $(element).addClass('error');
91        },
92        unhighlight: function(element, errorClass, validClass) {
93            $(element).removeClass('error');
94            $(element).addClass('success');
95        },
96        submitHandler:function(form){
97            form.preventDefault();
98            submit_fun(form);
99        }
100    });
101}

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.