mirror of
https://github.com/NebulaServices/Nebula.git
synced 2025-05-17 13:30:00 -04:00
Submission validation
This commit is contained in:
parent
d72028ce78
commit
c28d823d7c
1 changed files with 7 additions and 1 deletions
|
@ -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") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue