PageSourceSearch

https://cwo.cc/wp-content/themes/onenav/js/new-post.js?ver=4.1810

js cwo.cc collected 2026-10-06 13:16:09 UTC 4,376 bytes, 119 lines download raw bytes

1/*!
2 * Theme Name:One Nav
3 * Theme URI:https://www.iotheme.cn/
4 * Author:iowen
5 * Author URI:https://www.iowen.cn/
6 */
7function currentType(data) {
8    var t = $(data).data('type');
9    $('input[name="sites_type"]').val(t);
10    if(t=='wechat'){
11        $('.tg-wechat-id').show();
12        $('.tg-sites-url').hide();
13    }else{
14        $('.tg-wechat-id').hide();
15        $('.tg-sites-url').show();
16    }
17};
18(function($){ 
19    $('#get_info').click(function() {
20        var url = $('.sites-link').val();
21        if( url != '' ){
22            if(isURL(url)){
23                getUrlData(url);
24            }else{
25                showAlert({"status":3,"msg":tg_data.local.url_error});
26            }
27        }else{
28            showAlert({"status":3,"msg":tg_data.local.fill_url});
29        }
30    });
31    $('.post-tg #submit').click(function() {
32        var t = $(this); 
33
34        if (t.hasClass('is-post')) tinyMCE.triggerSave();
35        
36        captcha_ajax(t, '', function (result) {
37            if(result.status == 1){
38                $('.form-control').not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');
39                //清理图标
40                $(".show-sites").attr("src", theme.addico);
41                $(".tougao-sites").val('');
42                $(".remove-sites").data('id','').hide();
43                $(".upload-sites").val("").parent().removeClass('disabled');
44                $('[name="image_captcha"]').val('');
45                $('.image-captcha').click();
46            }
47        });
48        return false;
49    }); 
50    $('.remove-ico').click(function() {
51        var doc_id = $(this).data('type');
52        $("#show_"+doc_id).attr("src", theme.addico);
53        $("#remove_"+doc_id).hide();
54        $("#upload_"+doc_id).val("");
55    });
56})(jQuery);
57function uploadImg(file) {
58    var doc_id = file.getAttribute("data-type");
59    if (file.files != null && file.files[0] != null) {
60        if (!/\.(jpg|jpeg|png|JPG|PNG)$/.test(file.files[0].name)) {
61            $("#show_"+doc_id).attr("src", theme.addico);    
62            $("#upload_"+doc_id).val("");
63            $("#remove_"+doc_id).hide();
64            showAlert({"status":3,"msg":tg_data.local.only_jpg});   
65            return false;    
66        } 
67        if(file.files[0].size > (tg_data.sites_img_max * 1024)){
68            $("#show_"+doc_id).attr("src", theme.addico);
69            $("#upload_"+doc_id).val("");
70            $("#remove_"+doc_id).hide();
71            showAlert({"status":3,"msg":tg_data.local.sites_img_max_msg});
72            return false;
73        }
74        var reader = new FileReader();
75        reader.readAsDataURL(file.files[0]);
76        reader.onload = function(arg) {
77            var image = new Image();
78            image.src = arg.target.result;
79            image.onload = function() { 
80                $("#show_"+doc_id).attr("src", image.src);
81                $("#remove_"+doc_id).show();
82            };
83            image.onerror = function() { 
84                $("#show_"+doc_id).attr("src", theme.addico);
85                $("#upload_"+doc_id).val("");
86                $("#remove_"+doc_id).hide();
87                showAlert({"status":3,"msg":tg_data.local.only_img});
88                return false;
89            }
90        }
91    }else{
92        $("#show_"+doc_id).attr("src", theme.addico);
93        $("#upload_"+doc_id).val("");
94        $("#remove_"+doc_id).hide();
95        showAlert({"status":2,"msg":tg_data.local.select_file});
96        return false;
97    }
98};
99
100function getUrlData(_url){
101        $.post("//apiv2.iotheme.cn/webinfo/get.php", { url: _url, type: "json", key:tg_data.theme_key },function(data,status){ 
102            if(data.code==0){ 
103                showAlert({"status":3,"msg":tg_data.local.get_failed});
104            }
105            else{ 
106                dataInput(data);
107                showAlert({"status":1,"msg":tg_data.local.get_success});
108            } 
109        }).fail(function () {
110            showAlert({"status":3,"msg":tg_data.local.timeout2});
111        });
112} 
113function dataInput(data) {
114    var des = $('.sites-des');
115    $('.sites-title').val(data.site_title); 
116    des.val(data.site_description.slice(0,des.attr('maxlength'))); 
117    change_input(des);
118    $('.sites-keywords').val(data.site_keywords);
119}

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.