var zbpConfig = { bloghost: "http://www.zewww.com/", blogversion: "173430", ajaxurl: "http://www.zewww.com/zb_system/cmd.php?act=ajax&src=", cookiepath: "/", lang: { error: { 72: "名称不能为空或格式不正确", 29: "邮箱格式不正确,可能过长或为空", 46: "评论内容不能为空或过长" } }, comment: { useDefaultEvents: true, inputs: { action: { getter: function () { return $("#inpId").parent("form").attr("action"); } }, name: { selector: '#inpName', saveLocally: true, required: true, validateRule: /^[^\s ]+$/ig, validateFailedErrorCode: 72, }, email: { selector: '#inpEmail', saveLocally: true, validateRule: /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/ig, validateFailedErrorCode: 29, }, homepage: { selector: '#inpHomePage', getter: function () { var t = $('#inpHomePage').val(); return (!/^(.+)\:\/\//.test(t) && t !== "") ? 'http://' + t : t; }, saveLocally: true }, postid: { selector: '#inpId', required: true }, verify: { selector: '#inpVerify' }, content: { selector: '#txaArticle', required: true, validateRule: /./ig, validateFailedErrorCode: 46, }, replyid: { selector: '#inpRevID' }, format: { getter: function () {return 'json';} } } } }; var zbp = new ZBP(zbpConfig); var bloghost = zbp.options.bloghost; var cookiespath = zbp.options.cookiepath; var ajaxurl = zbp.options.ajaxurl; var lang_comment_name_error = zbp.options.lang.error[72]; var lang_comment_email_error = zbp.options.lang.error[29]; var lang_comment_content_error = zbp.options.lang.error[46]; $(function () { zbp.cookie.set("timezone", (new Date().getTimezoneOffset()/60)*(-1)); var $cpLogin = $(".cp-login").find("a"); var $cpVrs = $(".cp-vrs").find("a"); var $addinfo = zbp.cookie.get("addinfo"); if (!$addinfo){ return ; } $addinfo = JSON.parse($addinfo); if ($addinfo.chkadmin){ $(".cp-hello").html("欢迎 " + $addinfo.useralias + " (" + $addinfo.levelname + ")"); $cpLogin.html("后台管理"); } if($addinfo.chkarticle){ $cpVrs.html("新建文章"); $cpVrs.attr("href", zbp.options.bloghost + "zb_system/cmd.php?act=ArticleEdt"); } }); $(function(){ let inpNameVal = $(zbpConfig.comment.inputs.name.selector).val(); if (typeof inpNameVal === "undefined") { return; } if (inpNameVal.trim() === "" || inpNameVal === "访客"){ zbp.userinfo.output(); } }); document.writeln("'); } let logostyle='';logostyle+='left:auto;right:20px;';logostyle+='max-width:120px;max-height:120px;'; $('video').each(function (i) { let _this = $(this); if(_this.hasClass('dplayer-video')){ return true; } let VideoID = 'ly_dplayer_' + i + '_' + new Date().getTime(); let VideoSrc = _this.attr('src'); if(!VideoSrc){ VideoSrc = _this.find('source').attr('src'); } if(VideoSrc){ let p = _this.parent(); if(p.prop('tagName')=='P'){ p.css({'height':'auto','overflow':'auto','padding-bottom':'unset'}); } let poster = _this.attr('poster'); if(!autoplay){ if(_this.attr('autoplay')){ autoplay = VideoID; } } if(!pid){ pid = VideoID; } _this.after('
'); _this.remove(); $(function () { ly_dplayer_wh(VideoID); dp[VideoID] = new DPlayer({ container: document.getElementById(VideoID), autoplay: 0, theme: '#ff0000', loop: 0, lang: 'zh-cn', hotkey: true, preload: 'auto', logo: 'https://www.zewww.com/zb_users/upload/2023/06/20230629090126168800048686468.png', volume: 0.7, mutex: true, video: { url: decodeURIComponent(VideoSrc), pic: poster?poster:'', type: 'auto', }, contextmenu: [{ text: '泽网', link: 'http://www.zewww.com/', } ], }); $('head').append(''); if(logostyle){ $('head').append(''); logostyle = ''; } $('.dplayer-mask').on('contextmenu', function(e){ e.preventDefault(); }); $('.dplayer-menu').remove(); $(function() { ly_dplayer_hide(VideoID); }); }); } }); $(document).on('click', '.ly_dplayer_switch span', function (e) { let d = $(this).attr('data-num'); $('.ly_dplayer_switch span').attr('style',''); $(this).attr('style','border-radius:3px;background:#084dad;color:#fff;'); let dd = JSON.parse(ly_dplayer_switch); dp[pid].switchVideo( { url: dd[d][0], pic: dd[d][1], thumbnails: dd[d][1] } ); dp[pid].play(); $(function() { ly_dplayer_hide(pid); }); }); $(function() { let n = $('.ly_dplayer_switch').data('play'); if(autoplay){ pid = autoplay; window.location.hash = autoplay; dp[autoplay].play(); }else if(n){ n--; window.location.hash = pid; $('.ly_dplayer_switch span:eq('+n+')').click(); }else if(play){ window.location.hash = pid; dp[pid].play(); } }); } } $(function() { ly_dplayer_function(); });