File tree Expand file tree Collapse file tree 3 files changed +42
-32
lines changed
Expand file tree Collapse file tree 3 files changed +42
-32
lines changed Original file line number Diff line number Diff line change @@ -45,21 +45,21 @@ This extension is "**ready to use after download**" and usually requires no worr
4545 - Note: ` .tar.gz ` would be matched by both ` .gz ` and ` .tar.gz `
4646
4747 ``` text
48- jpg
49- jpeg
50- png
51- tif
52- tiff
53- webp
54- avif
55- gif
56- pdf
57- docx
58- doc
59- pptx
60- ppt
61- xlsx
62- xls
48+ . jpg
49+ . jpeg
50+ . png
51+ . tif
52+ . tiff
53+ . webp
54+ . avif
55+ . gif
56+ . pdf
57+ . docx
58+ . doc
59+ . pptx
60+ . ppt
61+ . xlsx
62+ . xls
6363 ```
6464
6565### How to set domains that do not need to be captured
Original file line number Diff line number Diff line change 4545 - 注:` .tar.gz ` 会被 ` .gz ` 与 ` .tar.gz ` 匹配
4646
4747 ``` text
48- jpg
49- jpeg
50- png
51- tif
52- tiff
53- webp
54- avif
55- gif
56- pdf
57- docx
58- doc
59- pptx
60- ppt
61- xlsx
62- xls
48+ . jpg
49+ . jpeg
50+ . png
51+ . tif
52+ . tiff
53+ . webp
54+ . avif
55+ . gif
56+ . pdf
57+ . docx
58+ . doc
59+ . pptx
60+ . ppt
61+ . xlsx
62+ . xls
6363 ```
6464
6565### 如何屏蔽来自指定域名的文件
Original file line number Diff line number Diff line change @@ -20,13 +20,24 @@ export const getStyle = () => styleElement
2020function PlasmoOverlay ( ) {
2121 const notify = usePort ( "notify" )
2222 const [ open , setOpen ] = useState ( false )
23+ const [ rootFontSize , setRootFontSize ] = useState ( "" )
2324
2425 const handleClose = ( ) => {
2526 setOpen ( false )
27+ if ( rootFontSize ) {
28+ setTimeout ( ( ) => {
29+ document . documentElement . style . fontSize = rootFontSize
30+ } , 500 )
31+ }
2632 }
2733
2834 useEffect ( ( ) => {
2935 if ( notify . data ) {
36+ const tempRootFontSize = document . documentElement . style . fontSize
37+ if ( tempRootFontSize && parseInt ( tempRootFontSize ) > 32 ) {
38+ document . documentElement . style . fontSize = null
39+ setRootFontSize ( tempRootFontSize )
40+ }
3041 setOpen ( true )
3142 }
3243 } , [ notify . data ] )
@@ -39,8 +50,7 @@ function PlasmoOverlay() {
3950 open = { open }
4051 anchorOrigin = { { vertical : "bottom" , horizontal : "right" } }
4152 autoHideDuration = { 6000 }
42- onClose = { handleClose }
43- message = { notify . data . message } >
53+ onClose = { handleClose } >
4454 < Alert
4555 onClose = { handleClose }
4656 severity = { notify . data . type || "success" }
You can’t perform that action at this time.
0 commit comments