Fix BlurNSFW
This commit is contained in:
parent
21e61784bc
commit
dc03ab9e82
2 changed files with 6 additions and 6 deletions
|
|
@ -24,8 +24,8 @@ let style: HTMLStyleElement;
|
|||
|
||||
function setCss() {
|
||||
style.textContent = `
|
||||
.vc-nsfw-img [class^=imageContainer],
|
||||
.vc-nsfw-img [class^=wrapperPaused] {
|
||||
.vc-nsfw-img [class*=imageContainer],
|
||||
.vc-nsfw-img [class*=wrapperPaused] {
|
||||
filter: blur(${Settings.plugins.BlurNSFW.blurAmount}px);
|
||||
transition: filter 0.2s;
|
||||
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ export default definePlugin({
|
|||
|
||||
function SearchBar({ instance, SearchBarComponent }: { instance: Instance; SearchBarComponent: TSearchBarComponent; }) {
|
||||
const [query, setQuery] = useState("");
|
||||
const ref = useRef<{ containerRef?: React.RefObject<HTMLDivElement>; } | null>(null);
|
||||
const ref = useRef<HTMLElement>(null);
|
||||
|
||||
const onChange = useCallback((searchQuery: string) => {
|
||||
setQuery(searchQuery);
|
||||
|
|
@ -147,10 +147,10 @@ function SearchBar({ instance, SearchBarComponent }: { instance: Instance; Searc
|
|||
|
||||
|
||||
// scroll back to top
|
||||
ref.current?.containerRef?.current
|
||||
ref.current
|
||||
?.closest("#gif-picker-tab-panel")
|
||||
?.querySelector("[class|=\"content\"]")
|
||||
?.firstElementChild?.scrollTo(0, 0);
|
||||
?.querySelector('[class*="scrollerBase"]')
|
||||
?.scrollTo(0, 0);
|
||||
|
||||
|
||||
const result =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue