From fa7b938dca3cb362c9eab41bd236350327e837cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com>
Date: Fri, 16 Apr 2021 18:00:42 +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.short.js | 29 +++++++-----------
assets/js/joe.short.min.js | 2 +-
core/factory.php | 8 ++---
core/function.php | 2 +-
core/short.php | 12 +++-----
package.json | 2 +-
public/include.php | 4 +--
typecho/write/css/joe.write.min.css | 2 +-
typecho/write/css/joe.write.min.scss | 46 ++++++++++++++++++++++++++++
typecho/write/js/_actions.js | 38 +++++++++++++++++++++++
typecho/write/js/_create.js | 1 +
typecho/write/js/_tools.js | 5 +++
typecho/write/js/joe.write.chunk.js | 29 ++++++++++++++++--
typecho/write/js/joe.write.js | 3 ++
14 files changed, 144 insertions(+), 39 deletions(-)
diff --git a/assets/js/joe.short.js b/assets/js/joe.short.js
index 0530ecb..3fb55ba 100644
--- a/assets/js/joe.short.js
+++ b/assets/js/joe.short.js
@@ -91,12 +91,6 @@ document.addEventListener('DOMContentLoaded', () => {
}
}
window.customElements.define('joe-abtn', JoeAbtn);
-
- /*
- ------------------------以下未测试------------------------------------------
- */
-
- /* 便条按钮 */
class JoeAnote extends HTMLElement {
constructor() {
super();
@@ -104,22 +98,21 @@ document.addEventListener('DOMContentLoaded', () => {
icon: this.getAttribute('icon') || 'fa-download',
href: this.getAttribute('href') || '#',
type: /^secondary$|^success$|^warning$|^error$|^info$/.test(this.getAttribute('type')) ? this.getAttribute('type') : 'secondary',
- content: this.innerHTML.trim().replace(/^(
)|(
)$/g, '') || '标签按钮'
+ content: this.getAttribute('content') || '标签按钮'
};
- this.render();
- }
- get template() {
- return `
-
- ${this.options.content}
-
- `;
- }
- render() {
- this.innerHTML = this.template;
+ this.innerHTML = `
+
+ ${this.options.content}
+
+ `;
}
}
window.customElements.define('joe-anote', JoeAnote);
+
+ /*
+ ------------------------以下未测试------------------------------------------
+ */
+
/* 点击复制 */
class JoeCopy extends HTMLElement {
constructor() {
diff --git a/assets/js/joe.short.min.js b/assets/js/joe.short.min.js
index 27327e8..441ef9b 100644
--- a/assets/js/joe.short.min.js
+++ b/assets/js/joe.short.min.js
@@ -1 +1 @@
-document.addEventListener("DOMContentLoaded",()=>{class t extends HTMLElement{constructor(){super(),this.innerHTML=`\n\t\t\t\t
`})).replace(/\:\@\(\s*(高兴|小怒|脸红|内伤|装大款|赞一个|害羞|汗|吐血倒地|深思|不高兴|无语|亲亲|口水|尴尬|中指|想一想|哭泣|便便|献花|皱眉|傻笑|狂汗|吐|喷水|看不见|鼓掌|阴暗|长草|献黄瓜|邪恶|期待|得意|吐舌|喷血|无所谓|观察|暗地观察|肿包|中枪|大囧|呲牙|抠鼻|不说话|咽气|欢呼|锁眉|蜡烛|坐等|击掌|惊喜|喜极而泣|抽烟|不出所料|愤怒|无奈|黑线|投降|看热闹|扇耳光|小眼睛|中刀)\s*\)/g,function(t,e){return e=encodeURI(e).replace(/%/g,""),`
`})).replace(/{mtitle([^}]*)\/}/g,"