Fix BlurNSFW

This commit is contained in:
Vendicated 2025-12-16 20:30:41 +01:00
parent 21e61784bc
commit dc03ab9e82
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
2 changed files with 6 additions and 6 deletions

View file

@ -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;

View file

@ -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 =