From d5c8ecbc757917b1547e6591b9f3f0c03bea7693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com> Date: Fri, 19 Feb 2021 18:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/joe.live.js | 2 +- assets/js/joe.owo.min.js | 1 - core/parse.php | 4 ++-- typecho/editor/joe.owo.js | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) delete mode 100644 assets/js/joe.owo.min.js diff --git a/assets/js/joe.live.js b/assets/js/joe.live.js index af73d60..8c17322 100644 --- a/assets/js/joe.live.js +++ b/assets/js/joe.live.js @@ -25,7 +25,7 @@ document.addEventListener('DOMContentLoaded', () => { renderLiveType(); function renderLiveType() { $.ajax({ - url: '/usr/themes/Joe/assets/json/joe.live.json', + url: 'https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/assets/json/joe.live.json', success(res) { const item = res[queryData.index]; $('.joe_live__type-title .text').html(item.name); diff --git a/assets/js/joe.owo.min.js b/assets/js/joe.owo.min.js deleted file mode 100644 index 51e963a..0000000 --- a/assets/js/joe.owo.min.js +++ /dev/null @@ -1 +0,0 @@ -function _instanceof(t,n){return null!=n&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n}function _classCallCheck(t,n){if(!_instanceof(t,n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,n){for(var e=0;e').concat(i,""),e+='\n \n ");$(this.options.contain).html('\n
'.concat(this.options.seat,'
\n
\n ').concat(e,'\n
').concat(n,"
\n
\n ")),this.initEvent()}},{key:"initEvent",value:function(){var t=this.options.contain;$(document).on("click",function(){var n=t+" .box";$(n).stop().slideUp("fast")});var n=t+" .seat";$(n).on("click",function(t){t.stopPropagation(),$(this).siblings(".box").stop().slideToggle("fast")});var e=t+" .box .bar .item";$(e).on("click",function(n){n.stopPropagation(),$(this).addClass("active").siblings().removeClass("active");var e=t+' .box .scroll[data-index="'+$(this).attr("data-index")+'"]';$(e).show().siblings(".scroll").hide()});var i=t+" .scroll .item",o=$(this.options.target)[0];$(i).on("click",function(){var t=$(this).attr("data-text"),n=o.selectionEnd,e=o.value;o.value=e.slice(0,n)+t+e.slice(n),o.focus()}),$(e).first().click()}}]),t}();"undefined"!=typeof module&&void 0!==module.exports?module.exports=JoeOwO:window.JoeOwO=JoeOwO; \ No newline at end of file diff --git a/core/parse.php b/core/parse.php index b876f5a..37e1a54 100644 --- a/core/parse.php +++ b/core/parse.php @@ -17,14 +17,14 @@ function _parseReply($text) $text = preg_replace_callback( '/\:\:\(\s*(呵呵|哈哈|吐舌|太开心|笑眼|花心|小乖|乖|捂嘴笑|滑稽|你懂的|不高兴|怒|汗|黑线|泪|真棒|喷|惊哭|阴险|鄙视|酷|啊|狂汗|what|疑问|酸爽|呀咩爹|委屈|惊讶|睡觉|笑尿|挖鼻|吐|犀利|小红脸|懒得理|勉强|爱心|心碎|玫瑰|礼物|彩虹|太阳|星星月亮|钱币|茶杯|蛋糕|大拇指|胜利|haha|OK|沙发|手纸|香蕉|便便|药丸|红领巾|蜡烛|音乐|灯泡|开心|钱|咦|呼|冷|生气|弱|吐血|狗头)\s*\)/is', function ($match) { - return '表情'; + return '表情'; }, $text ); $text = preg_replace_callback( '/\:\@\(\s*(高兴|小怒|脸红|内伤|装大款|赞一个|害羞|汗|吐血倒地|深思|不高兴|无语|亲亲|口水|尴尬|中指|想一想|哭泣|便便|献花|皱眉|傻笑|狂汗|吐|喷水|看不见|鼓掌|阴暗|长草|献黄瓜|邪恶|期待|得意|吐舌|喷血|无所谓|观察|暗地观察|肿包|中枪|大囧|呲牙|抠鼻|不说话|咽气|欢呼|锁眉|蜡烛|坐等|击掌|惊喜|喜极而泣|抽烟|不出所料|愤怒|无奈|黑线|投降|看热闹|扇耳光|小眼睛|中刀)\s*\)/is', function ($match) { - return '表情'; + return '表情'; }, $text ); diff --git a/typecho/editor/joe.owo.js b/typecho/editor/joe.owo.js index 68a9f7a..51fefd0 100644 --- a/typecho/editor/joe.owo.js +++ b/typecho/editor/joe.owo.js @@ -4,7 +4,7 @@ class JoeOwO { contain: '.joe_owo__contain', target: '.joe_owo__target', seat: 'OωO', - api: '/usr/themes/Joe/assets/json/joe.owo.json' + api: 'https://cdn.jsdelivr.net/gh/HaoOuBa/Joe@master/assets/json/joe.owo.json' }; this.options = Object.assign(defaultOption, options); $.ajax({