Skip to content

Commit

Permalink
Added css and a bunch of stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
silvereengames committed Feb 27, 2024
1 parent 7fb6984 commit 039c454
Show file tree
Hide file tree
Showing 10 changed files with 124 additions and 14 deletions.
2 changes: 1 addition & 1 deletion node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions public/blocked.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="index.css">
<style>
h1 {
font-size: 70px;
color: white;
font-weight: 900;
}

p {
color: white;
}

.center {
text-align: center;
}
</style>
</head>
<body>
<div style="width: 1px; height: 25vh;"></div>
<h1 class="center">Uh oh!</h1>
<div style="width: 1px; height: 0.2vh;"></div>
<p class="center" style="margin: 0px 5vw 0px 5vw;">We usually do not block websites on this proxy but their are some restrictions to that. The website you were trying to access had 18+ content, and for legal reasons, we can not grant you access. Although this one site is blocked, you are free to visit the billions of websites on the internet!</p>
</body><!--Make this better pls its like... not good-->
</html>
7 changes: 6 additions & 1 deletion public/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ html::after {
}

.nav-logo img {
width: 50px;
width: 00px;
margin: 0;
position: absolute;
left: 0;
top: 0;
height: auto;
transform: scaleX(-1);
}

.nav-links {
Expand Down
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Moonlight V4</title>
<title>Moonlight 4.0</title>
<link rel="stylesheet" href="index.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
</head>
Expand All @@ -19,7 +19,7 @@
</div>
</div>
<div class="container">
<h1>Moonlight V4</h1>
<h1>Moonlight 4.0</h1>
<div class="btns">
<a>Games</a>
<a>Search</a>
Expand Down
Binary file modified public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/moon-light-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 10 additions & 8 deletions public/search/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ html::after {
bottom: 0;
}

#uv-address {
color: white;
}



.nav {
padding: 10px 20px;
display: flex;
Expand All @@ -45,11 +51,6 @@ html::after {
margin-right: auto;
}

.nav-logo img {
width: 50px;
height: auto;
}

.nav-links {
list-style: none;
padding: 5px;
Expand Down Expand Up @@ -114,14 +115,15 @@ html::after {


input[type="text"] {
padding: 10px;
padding: 1rem 3rem;
width: 50vw;
background: transparent;
border: 3px solid #001f3f;
border-radius: 5px;
border-radius: 50px;
font-family: "Poppins", sans-serif;
font-size: 16px;
font-size: 1rem;
transition: all 0.3s ease;
text-align: center;
}

input[type="text"]:focus{
Expand Down
1 change: 0 additions & 1 deletion public/search/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<body>
<div class="nav">
<div class="nav-logo">
<img src="../logo.png">
</div>
<div class="nav-links">
<li><a>Apps</a></li>
Expand Down
1 change: 1 addition & 0 deletions public/uv/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"use strict";

/**
* @type {HTMLFormElement}
*/
Expand Down
75 changes: 74 additions & 1 deletion public/uv/uv.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,18 @@ const blocked = [
];

const blockedsites = [

"pornhub.com",
"xvideos.com",
"xnxx.com",
"pornmate.com",
"bestpornsites.net"
]

const blockedqueries = [
"porn",
"silvereen"
];

self.__uv$config = {
/**
* The prefix for UV (Ultraviolet) resources.
Expand Down Expand Up @@ -245,4 +254,68 @@ const blocked = [
return new Response(null, {});
return request;
},
/**
* Function to inject scripts into the doc Head
* @type {function}
* @param {URL} url - The URL for the rewrite function.
* @returns {string} - The script to inject.
*/
inject: async (url) => {
if (url.host === 'discord.com') {
return `
<script src="https://raw.githubusercontent.com/Vencord/builds/main/browser.js"></script>
<link rel="stylesheet" href="https://raw.githubusercontent.com/Vencord/builds/main/browser.css">
`;
}

return ``;
},
/**
* Middleware function for handling requests.
* @type {function}
* @param {Request} request - The request object.
* @returns {Request|Response} The modified request or a response.
*/
middleware: (request) => {
const url = new URL(request.url);

console.log(url.host);
if (blockedsites.includes(url.host)) {
return new Response(window.location.replace("/"));
}
if (
url.pathname.includes("ads.js") ||
url.pathname.includes("pagead.js") ||
url.pathname.includes("partner.ads.js ")
)
return new Response(null, {});
return request;
},
middleware: (request) => {
const url = new URL(request.url);

console.log(url.host);

// Check if the URL's host is in the blocked array
if (blocked.includes(url.host)) {
return new Response(null, {});
}

// Check if the URL's host is in the blockedsites array
if (blockedsites.includes(url.host)) {
// Redirect to blocked.html
return Response.redirect('../blocked.html', 307);
}

// Existing checks for specific ad-related paths
if (
url.pathname.includes("ads.js") ||
url.pathname.includes("pagead.js") ||
url.pathname.includes("partner.ads.js ")
) {
return new Response(null, {});
}

return request;
},
};

0 comments on commit 039c454

Please sign in to comment.