// app/webview.tsx import React, { useRef } from 'react'; import { WebView } from 'react-native-webview'; const WebViewScreen = () => { const webviewRef = useRef(null); const injectedJavaScript = ` const filterPosts = () => { const posts = document.querySelectorAll('div[data-testid="post_message"]'); posts.forEach(post => { if (post.innerText.includes('some keyword')) { post.style.display = 'none'; // Hide post } }); }; filterPosts(); `; return ( { if (webviewRef.current) { webviewRef.current.injectJavaScript(injectedJavaScript); } }} /> ); }; export default WebViewScreen;