Search engines

This commit is contained in:
rift 2023-12-27 17:14:12 -06:00
parent 04cf73e84a
commit e14f84d1bb
5 changed files with 31 additions and 2 deletions

View file

@ -20,12 +20,14 @@ export function ProxyFrame(props: { url: string }) {
// pass the URL encoded with encodeURIcomponent
const localProxy = localStorage.getItem("proxy") || "automatic";
const proxyMode = localStorage.getItem("proxyMode") || "embed";
const searchEngine =
localStorage.getItem("searchEngine") || "https://google.com/search?q=%s";
const [ProxiedUrl, setProxiedUrl] = useState<string | undefined>(undefined);
let decodedUrl = decodeURIComponent(props.url);
//attempt to convert to a valid url
decodedUrl = searchUtil(decodedUrl, "https://google.com/search?q=%s");
decodedUrl = searchUtil(decodedUrl, searchEngine);
let proxyRef;