diff --git a/src/Flows.css b/src/Flows.css index 42ae439..796749a 100644 --- a/src/Flows.css +++ b/src/Flows.css @@ -154,4 +154,19 @@ .box-id { color: #666666; +} +.box-id a:hover::before { + content: "复制全文"; + position: relative; + width: 5em; + height: 1.3em; + line-height: 1.3em; + margin-bottom: -1.3em; + border-radius: 3px; + text-align: center; + top: -1.5em; + display: block; + color: white; + background-color: rgba(0,0,0,.6); + pointer-events: none; } \ No newline at end of file diff --git a/src/Flows.js b/src/Flows.js index 2fc8de1..7bbd471 100644 --- a/src/Flows.js +++ b/src/Flows.js @@ -10,7 +10,7 @@ import {TokenCtx, ReplyForm} from './UserAction'; import {API} from './flows_api'; const IMAGE_BASE='http://www.pkuhelper.com:10301/services/pkuhole/images/'; -const AUDIO_BASE='/audio_proxy/'; +const AUDIO_BASE='http://www.pkuhelper.com:10301/services/pkuhole/audios/'; const SEARCH_PAGESIZE=50; const CLICKABLE_TAGS={a: true, audio: true}; @@ -256,7 +256,8 @@ class FlowSidebar extends PureComponent { do_reply(name,event) { if(event.target.tagName.toLowerCase()!=='a') { let text=this.reply_ref.current.get(); - this.reply_ref.current.set_and_focus('Re '+name+': '); + if(/^\s*(Re (洞主|\b[A-Z][a-z]+){0,2}:)?\s*$/.test(text)) // text is nearly empty so we can replace it + this.reply_ref.current.set_and_focus('Re '+name+': '); } }