File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
apps/slax-reader-extensions/src Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -411,7 +411,7 @@ export class MarkManager extends Base {
411411 }
412412
413413 getApproxText ( range : Range ) : HighlightRangeInfo | undefined {
414- if ( ! range ) {
414+ if ( ! range || range . collapsed || range . toString ( ) . trim ( ) . length === 0 ) {
415415 return undefined
416416 }
417417
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ watch(
177177 }
178178
179179 loadBriefDetail ().then (() => {
180- loadSelection ()
180+ bookmarkBriefInfo . value && loadSelection ()
181181 })
182182 }
183183)
@@ -211,7 +211,7 @@ props.browser.runtime.onMessage.addListener(
211211onMounted (() => {
212212 updateBookmarkStatus ()
213213 loadBriefDetail ().then (() => {
214- loadSelection ()
214+ bookmarkBriefInfo . value && loadSelection ()
215215 })
216216
217217 tryGetUserInfo (true ).then (res => {
Original file line number Diff line number Diff line change @@ -58,6 +58,12 @@ export default defineContentScript({
5858 html{
5959 z-index: 99999999999 !important;
6060 }
61+
62+ @media print {
63+ :host, html {
64+ display: none !important;
65+ }
66+ }
6167 ` ,
6268 onMount : container => {
6369 const app = createApp ( SidePanel , {
You can’t perform that action at this time.
0 commit comments