diff --git a/assets/js/lamu-leimu.js b/assets/js/lamu-leimu.js index 4af7e3f2471c02e2692e5d11d95a7263f41127e6..ccb5b6180ec3a14650bae437b1171fcbfc3f07bf 100644 --- a/assets/js/lamu-leimu.js +++ b/assets/js/lamu-leimu.js @@ -1,6 +1,6 @@ !(function () { - var style = '@media (max-width:860px){.sidebar_wo{display:none}}.sidebar_wo{position:fixed;bottom:0;z-index:1000;line-height:0;cursor:url(https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/cursor/leimu.cur),pointer}#lamu:hover{-webkit-transform:translate(0,0);transform:translate(0,0);-ms-transform:translate(0,0)}#lamu{right:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:translate(7px,7px);transform:translate(7px,7px);-ms-transform:translate(7px,7px)}#leimu:hover{-webkit-transform:translate(0,0);transform:translate(0,0);-ms-transform:translate(0,0)}#leimu{left:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:translate(-7px,7px);transform:translate(-7px,7px);-ms-transform:translate(-7px,7px)}'; + var style = '@media (max-width:860px){.sidebar_wo{display:none}}.sidebar_wo{position:fixed;bottom:0;z-index:1000;line-height:0;cursor:url(https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/cursor/leimu.cur),pointer}#lamu:hover{-webkit-transform:translate(0,0);transform:translate(0,0);-ms-transform:translate(0,0)}#lamu{right:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:translate(7px,7px);transform:translate(7px,7px);-ms-transform:translate(7px,7px)}#leimu:hover{-webkit-transform:translate(0,0);transform:translate(0,0);-ms-transform:translate(0,0)}#leimu{left:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:translate(-7px,7px);transform:translate(-7px,7px);-ms-transform:translate(-7px,7px)}'; var css = document.createElement('style'); css.type = 'text/css'; @@ -8,7 +8,7 @@ var head = document.head || document.getElementsByTagName('head')[0]; head.appendChild(css); - var lamuleimuDiv = '<div class="sidebar_wo" id="leimu"><img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/bottom/leimu1.png" alt="雷姆" onmouseover="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/bottom/leimu2.png\'" onmouseout="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/bottom/leimu1.png\'"></div><div class="sidebar_wo" id="lamu"><img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/bottom/lamu1.png" alt="拉姆" onmouseover="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/bottom/lamu2.png\'" onmouseout="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/bottom/lamu1.png\'"></div>'; + var lamuleimuDiv = '<div class="sidebar_wo" id="leimu"><img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/bottom/leimu1.png" alt="雷姆" onmouseover="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/bottom/leimu2.png\'" onmouseout="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/bottom/leimu1.png\'"></div><div class="sidebar_wo" id="lamu"><img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/bottom/lamu1.png" alt="拉姆" onmouseover="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/bottom/lamu2.png\'" onmouseout="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/bottom/lamu1.png\'"></div>'; var div = document.createElement('div'); div.innerHTML = lamuleimuDiv; diff --git a/comments.php b/comments.php index f4383ae39ed8824da4eb59e2f8736cc50807709e..1f1e20471be7e24246e0686206fa59fe771581e9 100644 --- a/comments.php +++ b/comments.php @@ -69,7 +69,7 @@ </div> <div class="comment-content"> <b><?php get_comment_at($comments->coid); ?></b> - <?php echo preg_replace('#\@\((.*?)\)#', '<img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/alu/$1.png">', $comments->content); // 替æ¢å…³é”®è¯ä¸ºè¡¨æƒ… ?> + <?php echo preg_replace('#\@\((.*?)\)#', '<img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/alu/$1.png">', $comments->content); // 替æ¢å…³é”®è¯ä¸ºè¡¨æƒ… ?> </div> <?php if ($comments->children) { ?> <div class="comment-children" id="pllc"> @@ -173,7 +173,7 @@ logo: 'OωO表情', container: document.getElementsByClassName('OwO')[0], target: document.getElementsByClassName('OwO-textarea')[0], - api: 'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/json/OwO.json', + api: 'https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/json/OwO.json', position: 'down', width: '100%', maxHeight: '250px' @@ -221,7 +221,7 @@ el=$('#comment-'+comment.parent).find('.comment-children').find('.comment-list') if(0==el.length) {$('<ol class="comment-list"></ol>').prependTo($('#comments'));el=$('#comments > .comment-list');} var html='<li id="comment-{coid}" class="comment-body comment-ajax comment-parent comment-odd"> <div class="comment-author"> <img class="avatar" src="{avatar}" alt="{author}" width="32" height="32"> <div class="comment-info"> <cite class="fn"><a href="{url}" rel="external nofollow" target="_blank">{author}</a></cite> <em class="comment-meta"><a href="{permalink}">{datetime}</a></em> </div> <div class="comment-reply"><a href="{permalink}" rel="nofollow" onclick="return TypechoComment.reply(\'\comment-{coid}\'\, {coid});">回å¤</a></div> </div> <div class="comment-content">{content}</div> </li>';$.each(comment,function(k,v) -{regExp=new RegExp('{'+k+'}','g');html=html.replace(regExp,v);});var reg1=/@\(([^ ]*)\)/g;html=html.replace(reg1,"<img src=\"https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/alu/$1.png\"\>");$(html).prependTo(el);} +{regExp=new RegExp('{'+k+'}','g');html=html.replace(regExp,v);});var reg1=/@\(([^ ]*)\)/g;html=html.replace(reg1,"<img src=\"https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/alu/$1.png\"\>");$(html).prependTo(el);} $.ajax({url:'<?php $this->permalink();?>',type:'POST',data:params,dataType:'json',beforeSend:function() {$(".loading").css("display","block");},complete:function() {$(".loading").css("display","none");new NoticeJs({text:'评论æˆåŠŸï¼ˆ//â–½//)',position:'middleCenter',animation:{open:'animated bounceInRight',close:'animated bounceOutLeft'}}).show();},success:function(result) diff --git a/footer.php b/footer.php index b72cb92ddafd29dfd49d13d7ecc82cd378f09bcb..bdbf883e81afbe41dabc0b84b70663ddd9b51a69 100644 --- a/footer.php +++ b/footer.php @@ -100,12 +100,12 @@ </script> <?php endif; ?> - <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/js/img-lazy.min.js"></script> - <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/js/moment.min.js"></script> + <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/js/img-lazy.min.js"></script> + <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/js/moment.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/mermaid@11.0.2/dist/mermaid.min.js"></script> <script>mermaid.init({noteMargin: 10}, ".lang-mermaid");</script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/nprogress@0.2.0/nprogress.min.js"></script> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/css/noticejs.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/css/noticejs.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.7.2/animate.min.css" /> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/notice.js@0.4.0/dist/notice.min.js"></script> <script type="text/javascript"> @@ -122,7 +122,7 @@ <script async src="<?php $this->options->umamiUrl(); ?>" data-website-id="<?php $this->options->umamiId(); ?>" data-do-not-track="<?php $this->options->umamiDoNotTrack(); ?>"></script> <?php endif; ?> <?php if ($this->options->returnTop === 'enable'): ?> - <script defer type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/js/lamu-leimu.min.js"></script> + <script defer type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/js/lamu-leimu.min.js"></script> <?php endif; ?> </div> </div> diff --git a/functions.php b/functions.php index 9f440ee3c51702f1ee883ea5c8ec554a8c766117..0d624cce689aedf91de3b680d94518cb7835ed33 100644 --- a/functions.php +++ b/functions.php @@ -169,7 +169,7 @@ function parseContent($obj) { $obj->content = str_ireplace($widgetOptions->src_add,$widgetOptions->cdn_add,$obj->content); } - $obj->content = preg_replace('/<\s*img[\s\S]+?(?:src=[\'"]([\S\s]*?)[\'"]\s*|alt=[\'"]([\S\s]*?)[\'"]\s*|[a-z]+=[\'"][\S\s]*?[\'"]\s*)+[\s\S]*?>/i','<img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/lazyload.jpg" alt="$2" data-src="$1" />', $obj->content); + $obj->content = preg_replace('/<\s*img[\s\S]+?(?:src=[\'"]([\S\s]*?)[\'"]\s*|alt=[\'"]([\S\s]*?)[\'"]\s*|[a-z]+=[\'"][\S\s]*?[\'"]\s*)+[\s\S]*?>/i','<img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/lazyload.jpg" alt="$2" data-src="$1" />', $obj->content); $obj->content = preg_replace("/<a href=\"([^\"]*)\">/i", "<a href=\"\\1\" target=\"_blank\">", $obj->content); echo trim($obj->content); } diff --git a/header.php b/header.php index fbb37b9aeb24799fa6b2d92d69c181b6f9f31d84..fc028ebec03d9bf41da95c1fc4be5c7ec0827026 100644 --- a/header.php +++ b/header.php @@ -17,20 +17,20 @@ <?php if ($this->options->favicon): ?> <link href="<?php $this->options->favicon(); ?>" rel="shortcut icon" /> <?php else: ?> - <link href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/icon.ico" rel="shortcut icon" /> + <link href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/icon.ico" rel="shortcut icon" /> <?php endif; ?> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.6.0/css/all.min.css" /> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/css/main.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/css/main.min.css" /> <?php if ($this->options->themeColor == '0'): ?> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/css/gray.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/css/gray.min.css" /> <?php elseif ($this->options->themeColor == '1'): ?> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/css/white.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/css/white.min.css" /> <?php elseif ($this->options->themeColor == '2'): ?> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/css/black.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/css/black.min.css" /> <?php elseif ($this->options->themeColor == '3'): ?> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/css/green.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/css/green.min.css" /> <?php else: ?> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/css/gray.min.css" /> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/css/gray.min.css" /> <?php endif; ?> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" /> @@ -42,7 +42,7 @@ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script> - <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/assets/js/jQuery.scrollLoad.min.js"></script> + <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/assets/js/jQuery.scrollLoad.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery-pjax@2.0.1/jquery.pjax.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/owo@1.0.2/dist/OwO.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/console-ban@5.0.0/dist/console-ban.min.js"></script> @@ -56,7 +56,7 @@ <?php if ($this->options->logo): ?> <img class="user-avatar" src="<?php $this->options->logo(); ?>" alt="头åƒ" /> <?php else: ?> - <img class="user-avatar" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.14/images/avatar.png" alt="头åƒ" /> + <img class="user-avatar" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/Simplecho@0.1.15/images/avatar.png" alt="头åƒ" /> <?php endif; ?> <div class="site-name gt-c-content-color-first"> <?php $this->options->title(); ?> diff --git a/index.php b/index.php index 86726f5358177d2d5bbed253940d7286cb92cf9b..5e2150e40a51127938f4bf5796109698ae6cb29c 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ * * @package Simplecho * @author XiaoXi - * @version 0.1.14 + * @version 0.1.15 * @link https://soraharu.com/ */ if (!defined('__TYPECHO_ROOT_DIR__')) exit;