var zbpConfig = { bloghost: "https://www.58xp.com/", blogversion: "173295", ajaxurl: "https://www.58xp.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(); } }); $(function() {let lyinlogin=$('.inlogin');lyinlogin.html('# 登录登录');if($('#divCommentPost form').length>0){$('#divCommentPost form').prepend('
发表评论取消回复
名称:(*)
邮箱:
主页:
');}}); $(function(){ let href = ''; href = location.href.replace(/(https?:\/\/[^\/]+).*/g, '$1'); if(href.indexOf('https://www.58xp.com')===-1){ window.location.href = location.href.replace(href, 'https://www.58xp.com'); }else{ href = ''; } if (!href) { let id=$('#ly_cache').attr('data-id'); let end=$('#ly_cache').attr('data-end'); if(end && Math.floor(new Date().getTime()/1000)>end){ $.ajax({ url: window.location.href, dataType: 'html', headers: {'LYCACHE':1}, beforeSend: function(xhr){ xhr.setRequestHeader('Cache-Control', 'no-cache'); xhr.setRequestHeader('Expires', '0'); }, timeout: 500, error: function(){ }, success: function(){ } }); } if(id && !isNaN(parseFloat(id))){ let re = /(spider|bot|Google)/i; if (!re.test(navigator.userAgent)) { let view = '.detail_title span:eq(0)'; if(view && $(view).length){ view = '1'; }else{ view = ''; } $.ajax({ type: 'post', data :'act=ly_cache&view=' + view + '&ID=' + id, url: bloghost + 'zb_users/plugin/ly_cache/main.php', success: function (d) { if(d && !isNaN(d)){ $('.detail_title span:eq(0)').html(d); } }, timeout: 1000 }); } } } }); $(function() {if ($("img.lazy").length > 0) {window.ly_lazyload = {lazy:"lazy",data:"data-src"};$("head").append('');}}); $(function () { if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) { $('head').append(''); $(function () { let wows=["bounce","pulse","rubberBand","shake","swing","wobble","bounceIn","bounceInDown","bounceInLeft","bounceInRight","bounceInUp","fadeIn","fadeInDown","fadeInLeft","fadeInRight","fadeInUp","flipInX","flipInY","lightSpeedIn","rotateIn","rotateInDownLeft","rotateInDownRight","rotateInUpLeft","rotateInUpRight","rollIn","zoomIn"];$(".newcomm li").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$(".swiper-x img").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$(".cms img").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$(".banner img").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$(".article img").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$(".detail img").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$(".Commentlist .avatar").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$("h1").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$(".menu-title a").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}});$(".show img").each(function () {if(!$(this).is(".wow")){$(this).addClass("wow " + wows[Math.floor(Math.random()*wows.length)] + "");}}); if (typeof WOW === 'function') {new WOW().init();} }); } }); var logostyle='';logostyle+='left:auto;right:20px;';$(function() {$('h1').before($('video').eq(0).parent()); if($('.ly_dplayer_switch').length){ $('h1').before($('.ly_dplayer_switch'));} }); $(function() { function ly_dplayer_whs(VideoID){ let w= 800; let h= 450; let r = 0; let ww = $('#' + VideoID).width(); if(w>ww){ r = ww/w; w = w*r; h = h*r; } $('#' + VideoID).css({'height':h + 'px','width':w + 'px'}); $('.ly_dplayer_switch').css({'max-width':w + 'px'}); } function ly_dplayer_wh(VideoID){ let w = $('#' + VideoID).width(); let h = w*1.79; let r = 0; let hs = ly_dplayer_h(); if(h>hs){ r = hs/h; w = w*r; h = h*r; } $('#' + VideoID).css({'max-height':h + 'px','max-width':w + 'px'}); $('.ly_dplayer_switch').css({'max-width':w + 'px'}); } function ly_dplayer_whx(VideoID,_this){ let w = parseInt(_this.attr('width')); let h = parseInt(_this.attr('height')); let r = 0; let ww = $('#' + VideoID).width(); if(w>ww){ r = ww/w; w = w*r; h = h*r; } $('#' + VideoID).css({'height':h + 'px','width':w + 'px'}); $('.ly_dplayer_switch').css({'max-width':w + 'px'}); } function ly_dplayer_h(){var t=0;if(document.body.clientHeight&&document.documentElement.clientHeight)t=document.body.clientHeightdocument.documentElement.clientHeight?document.body.clientHeight:document.documentElement.clientHeight;return t*0.9} if ($('video').length > 0) { var Videostyle = ''; var autoplay = 1; $('video').each(function () { var _this = $(this); var VideoID = 'video' + new Date().getTime(); var 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'}); } $('head').append(''); $(function () { var poster = _this.attr('poster'); _this.after('
'); _this.remove(); ly_dplayer_wh(VideoID); let dp = new DPlayer({ container: document.getElementById(VideoID), autoplay: autoplay, theme: '#ff0000', loop: 0, lang: 'zh-cn', hotkey: true, preload: 'auto', logo: 'https://www.58xp.com/zb_users/upload/ly_PictureMakeover.png', volume: 0.7, mutex: true, video: { url: decodeURIComponent(VideoSrc), pic: poster?poster:'https://www.58xp.com/zb_users/upload/2024/10/20241017185825172916270528754.png', type: 'auto', }, contextmenu: [{ text: '老阳插件', link: 'https://www.58xp.com/', } ], }); $('head').append(''); if(logostyle){ $('head').append(''); logostyle = ''; } $('.dplayer-mask').on('contextmenu', function(e){ e.preventDefault(); }); $('.dplayer-menu').remove(); if(autoplay){ autoplay = 0; } $(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.switchVideo( { url: dd[d][0], pic: dd[d][1], thumbnails: dd[d][1] } ); dp.play(); }); }); } }); } }); function ly_clipboard_info(e, t) { e = $(e.trigger); var a = ''; b = e.html(); if (b != t) { a = b; e.html(t); } if (a) { setTimeout(function() { e.html(a); }, 3000); } } function ly_clipboard() { $(function() { if ($('pre').length > 0) { $('head').append(''); if (typeof ClipboardJS === "undefined") { $('head').append(''); } $(function() { var clipboard = new ClipboardJS('.ly_copy button.copy'); clipboard.on('success', function(e) { ly_clipboard_info(e, 'OK '); e.clearSelection(); }); var i = 0; $('pre').each(function() { i++; if (typeof($(this).attr('id')) == 'undefined') { $(this).attr('id', 'copy_' + i); var offset = $(this).offset(); $(this).before('
'); } }); }); } }); } ly_clipboard(); $(function() {if ($('img.viewer').length > 0) {$('head').append('');}}); var ly_wxlogin_code = ''; function ly_wxlogin_status(num) { if(!ly_wxlogin_code){ return; } num++; if (num < 100) { $.ajax({ url: 'https://www.58xp.com/zb_users/plugin/ly_wxlogin/wx.php?status=' + ly_wxlogin_code, dataType:"jsonp", success: function(data) { if (data.ok) { window.location = data.ok; } else { setTimeout("ly_wxlogin_status("+num+");", 2000); } }, error: function(){ setTimeout("ly_wxlogin_status("+num+");", 2000); } }); } else { setTimeout("window.location.reload();", 1000); } } $(function(){ $("form").each(function(){ if($(this).find("textarea").length>0){ $(this).attr("action",""); return $(this).html('
微信登录QQ登录
'); } }); $(document).on('click', '.ly_wxlogin', function (e) { ly_wxlogin_code = ''; $('head').append(''); $(function() { $('#ly_lightgallery img').each(function () { let src = $(this).attr('data-src'); if(!src){ src = $(this).attr('data-original'); } if(!src){ src = $(this).attr('data-srcset'); } if(src){ $(this).attr('src',src); } }); let effectn = ["slide","cube","flip","coverflow"]; let randeffect = effectn[Math.floor(Math.random() * effectn.length)]; new ly_Swiper('.ly_swiper-container', {speed: 3000,loop: true,effect : randeffect,parallax: true,autoplay: {delay: 3000},pagination: {el: '.swiper-pagination',clickable: true},navigation: {nextEl: '.swiper-button-next',prevEl: '.swiper-button-prev'}}); $(function() {$(".swiper-button-next, .swiper-button-prev").css({"display":"none"});$(".ly_swiper-container .swiper-pagination-bullet").css({"display":"none"});}); }); }}); $((function () {if(navigator.userAgent.match(/ MicroMessenger\/(\d+\.\d+\.\d+)/i)){$("head").append('');}})); $(function () { var lyzbp_apps = $('#lyzbp_apps'); if (lyzbp_apps.length) { $('head').append(''); } }); $(function(){if ($('pre').length > 0) { $('head').append('