Submission validation

This commit is contained in:
rift 2023-12-21 10:53:46 -06:00
parent d72028ce78
commit c28d823d7c

View file

@ -1,4 +1,3 @@
// @ts-ignore
import { RammerheadEncode } from "./RammerheadEncode";
import { useEffect, useState } from "preact/hooks";
@ -15,6 +14,13 @@ export function ProxyFrame(props: { url: string }) {
var decodedUrl = decodeURIComponent(props.url);
if (!decodedUrl.includes(".")) {
decodedUrl = "https://www.google.com/search?q=" + decodedUrl; // If the users input has no . then we change it to a google query. TODO: Feature to change search engines
}
if (decodedUrl.startsWith("http://") || !decodedUrl.startsWith("https://")) {
decodedUrl = "https://" + decodedUrl;
}
useEffect(() => {
// For now we can redirect to the results. In the future we will add an if statement looking for the users proxy display choice
if (localProxy === "rammerhead") {