update styles

This commit is contained in:
Ivan Evans 2024-12-30 23:57:01 -07:00
parent 20c7342dc0
commit 1342c29eb5
27 changed files with 993 additions and 300 deletions

4
.github/SECURITY.md vendored
View file

@ -2,9 +2,9 @@
## Supported Versions
The latest version of sudo-flix is the only version that is supported, as it is the only version that is being actively developed.
The latest version of P-Stream is the only version that is supported, as it is the only version that is being actively developed.
## Reporting a Vulnerability
You can contact the sudo-flix maintainers to report a vulnerability:
You can contact the P-Stream maintainers to report a vulnerability:
- Report the vulnerability in the [Discord server](https://discord.gg/g742e7Mu2W)

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2023 sudo-flix
Copyright (c) 2023 P-Stream
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -1,12 +1,14 @@
{
"manifest_version": 3,
"name": "sudo-flix extension",
"optional_host_permissions": [ "\u003Call_urls>" ],
"permissions": [ "storage", "declarativeNetRequest", "activeTab", "cookies" ],
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "1.2.0",
"web_accessible_resources": [ {
"matches": [ "\u003Call_urls>" ],
"resources": [ "assets/active.png", "assets/inactive.png" ]
} ]
"manifest_version": 3,
"name": "P-Stream extension",
"optional_host_permissions": ["\u003Call_urls>"],
"permissions": ["storage", "declarativeNetRequest", "activeTab", "cookies"],
"update_url": "https://clients2.google.com/service/update2/crx",
"version": "1.2.0",
"web_accessible_resources": [
{
"matches": ["\u003Call_urls>"],
"resources": ["src/assets/active.png", "src/assets/inactive.png"]
}
]
}

View file

@ -1,9 +1,9 @@
{
"name": "@movie-web/extension",
"displayName": "sudo-flix extension",
"version": "1.2.0",
"displayName": "P-Stream extension",
"version": "1.3.1",
"description": "Enhance your streaming experience with just one click",
"author": "sudo-flix",
"author": "P-Stream",
"scripts": {
"dev": "plasmo dev",
"build": "plasmo build",
@ -18,7 +18,7 @@
"dependencies": {
"@plasmohq/messaging": "^0.6.2",
"@plasmohq/storage": "^1.11.0",
"plasmo": "0.84.0",
"plasmo": "0.89.4",
"react": "18.2.0",
"react-dom": "18.2.0"
},
@ -61,8 +61,8 @@
"web_accessible_resources": [
{
"resources": [
"assets/active.png",
"assets/inactive.png"
"src/assets/active.png",
"src/assets/inactive.png"
],
"matches": [
"<all_urls>"

File diff suppressed because it is too large Load diff

View file

@ -24,5 +24,5 @@ body {
#__plasmo {
height: 100%;
background-color: #0a0a10;
background-color: #0a0a0a;
}

BIN
src/assets/active.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
src/assets/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/assets/inactive.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -8,7 +8,7 @@ export function BottomLabel() {
<h3 className="bottom-label">
{version}
<div className="dot" />
sudo-flix
P-Stream
</h3>
);
}

View file

@ -21,21 +21,21 @@
}
.button.button-secondary {
background-color: #222033;
color: white;
background-color: hsl(240 3.7% 15.9%);
color: hsl(0 0% 98%);
}
.button.button-secondary:hover {
background-color: #2c2941;
color: white;
background-color: hsl(240 3.7% 15.9%/.8);
color: hsl(0 0% 98%);
}
.button.button-primary {
background-color: #4F328A;
color: white;
background-color: hsl(0 0% 98%);
color: hsl(240 5.9% 10%);
}
.button.button-primary:hover {
background-color: #5E3F9D;
color: white;
}
background-color: hsl(0 0% 98%/.9);
color: hsl(240 5.9% 10%);
}

View file

@ -8,7 +8,7 @@ export function DisabledScreen() {
<Icon name="warningCircle" />
</div>
<p>
The <strong>sudo-flix extension</strong> can not be used on this page
The <strong>P-Stream extension</strong> can not be used on this page
</p>
</div>
);

View file

@ -1,6 +1,6 @@
.frame {
height: 100%;
width: 100%;
background-color: #0a080e;
background-image: radial-gradient(271.48% 132.05% at 136.13% 65.62%, #271945b3 0%, #1c1c2c00 100%), radial-gradient(671.15% 123.02% at 76.68% -34.38%, #272753 0%, #17172000 100%);
background-color: #0a0a0a;
/* background-image: radial-gradient(271.48% 132.05% at 136.13% 65.62%, #271945b3 0%, #1c1c2c00 100%), radial-gradient(671.15% 123.02% at 76.68% -34.38%, #272753 0%, #17172000 100%); */
}

View file

@ -5,7 +5,7 @@ const icons = {
cookie: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M247.2 17c-22.1-3.1-44.6 .9-64.4 11.4l-74 39.5C89.1 78.4 73.2 94.9 63.4 115L26.7 190.6c-9.8 20.1-13 42.9-9.1 64.9l14.5 82.8c3.9 22.1 14.6 42.3 30.7 57.9l60.3 58.4c16.1 15.6 36.6 25.6 58.7 28.7l83 11.7c22.1 3.1 44.6-.9 64.4-11.4l74-39.5c19.7-10.5 35.6-27 45.4-47.2l36.7-75.5c9.8-20.1 13-42.9 9.1-64.9l-14.6-82.8c-3.9-22.1-14.6-42.3-30.7-57.9L388.9 57.5c-16.1-15.6-36.6-25.6-58.7-28.7L247.2 17zM208 144a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM144 336a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm224-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>`,
windows: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M432 64H208c-8.8 0-16 7.2-16 16V96H128V80c0-44.2 35.8-80 80-80H432c44.2 0 80 35.8 80 80V304c0 44.2-35.8 80-80 80H416V320h16c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16zM0 192c0-35.3 28.7-64 64-64H320c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V192zm64 32c0 17.7 14.3 32 32 32H288c17.7 0 32-14.3 32-32s-14.3-32-32-32H96c-17.7 0-32 14.3-32 32z"/></svg>`,
shield: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c16.7 8 36.1 8 52.8 0C454.7 420.7 495.5 239.2 496 140c.1-26.2-16.3-47.9-38.3-57.2L269.4 2.9zM160 154.4c0-5.8 4.7-10.4 10.4-10.4h.2c3.4 0 6.5 1.6 8.5 4.3l40 53.3c3 4 7.8 6.4 12.8 6.4h48c5 0 9.8-2.4 12.8-6.4l40-53.3c2-2.7 5.2-4.3 8.5-4.3h.2c5.8 0 10.4 4.7 10.4 10.4V272c0 53-43 96-96 96s-96-43-96-96V154.4zM216 288a16 16 0 1 0 0-32 16 16 0 1 0 0 32zm96-16a16 16 0 1 0 -32 0 16 16 0 1 0 32 0z"/></svg>`,
logo: `<svg width="1em" height="1em" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.2254 4.95486L10.5285 5.65174L9.83162 4.95486L10.5285 4.25799L7.7414 1.4709L7.04453 2.16777L6.34766 1.4709L7.04453 0.774022L6.34766 0.0771484L0.0761918 6.34861L0.773066 7.04549L1.46994 6.34861L2.16681 7.04549L1.46994 7.74236L4.25743 10.5299L4.95431 9.83298L5.65118 10.5299L4.95431 11.2267L5.65118 11.9236L11.9226 5.65214L11.2254 4.95486ZM2.86529 6.35021L2.16681 5.65174L2.86369 4.95487L3.56056 5.65174L2.86529 6.35021ZM4.25904 4.95647L3.56056 4.25799L4.25703 3.56152L4.95391 4.25839L4.25904 4.95647ZM5.65278 3.56272L4.95431 2.86424L5.65078 2.16777L6.34766 2.86464L5.65278 3.56272ZM6.34766 9.83258L5.65078 9.13571L6.34766 8.43883L7.04453 9.13571L6.34766 9.83258ZM7.7414 8.43883L7.04453 7.74196L7.741 7.04549L8.43788 7.74236L7.7414 8.43883ZM9.13515 7.04509L8.43828 6.34821L9.13475 5.65174L9.83162 6.34861L9.13515 7.04509Z" fill="currentColor"/></svg>`,
logo: `<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 20.927 20.927" preserveAspectRatio="xMidYMid meet"><g transform="translate(0,20.927) scale(0.003333,-0.003333)" fill="currentColor" stroke="none"><path d="M3910 5527 c-33 -4 -145 -17 -250 -28 -645 -73 -900 -187 -900 -405 l0 -89 154 -2 c209 -2 225 -17 381 -354 186 -399 337 -491 557 -341 103 70 176 67 252 -9 143 -142 -15 -342 -320 -404 l-123 -25 185 -393 c101 -217 189 -396 194 -398 6 -3 87 6 182 20 499 71 1160 -296 972 -541 -77 -101 -183 -100 -307 2 -186 154 -407 223 -610 188 -123 -21 -119 -9 -80 -274 40 -273 18 -701 -48 -916 -25 -82 252 -99 463 -28 655 220 1146 748 1330 1430 44 165 46 201 53 1206 l8 1035 -67 66 c-185 183 -1376 336 -2026 260z m1078 -1219 c118 -81 204 -84 312 -10 239 163 453 -73 240 -265 -241 -218 -703 -178 -832 71 -93 179 105 323 280 204z"/><path d="M2410 4591 c-950 -201 -2404 -1015 -2409 -1348 -1 -69 771 -1707 885 -1878 422 -633 1185 -984 1924 -886 221 29 293 68 482 264 575 594 727 1466 390 2232 -231 525 -749 1600 -785 1630 -57 48 -214 44 -487 -14z m579 -1122 c114 -54 145 -188 64 -281 -48 -56 -60 -58 -265 -47 -102 6 -177 -42 -229 -143 -95 -187 -339 -145 -339 57 0 291 482 550 769 414z m-1319 -630 c215 -106 85 -350 -173 -326 -144 13 -209 -21 -270 -140 -102 -197 -381 -119 -339 94 59 295 506 508 782 372z m1472 -577 c216 -217 -287 -789 -786 -895 -473 -100 -909 127 -654 341 71 60 93 62 226 22 348 -106 739 77 903 423 83 177 201 218 311 109z"/></g></svg>`,
network: `<svg width="1em" height="1em" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 640 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M256 64H384v64H256V64zM240 0c-26.5 0-48 21.5-48 48v96c0 26.5 21.5 48 48 48h48v32H32c-17.7 0-32 14.3-32 32s14.3 32 32 32h96v32H80c-26.5 0-48 21.5-48 48v96c0 26.5 21.5 48 48 48H240c26.5 0 48-21.5 48-48V368c0-26.5-21.5-48-48-48H192V288H448v32H400c-26.5 0-48 21.5-48 48v96c0 26.5 21.5 48 48 48H560c26.5 0 48-21.5 48-48V368c0-26.5-21.5-48-48-48H512V288h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H352V192h48c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48H240zM96 448V384H224v64H96zm320-64H544v64H416V384z"/></svg>`,
};

View file

@ -28,12 +28,13 @@
}
.setup-screen .icon {
background-color: #0b0b1b77;
color: #945DCC;
height: 40px;
font-size: 20px;
width: 40px;
border-radius: 9999px;
/* background-color: #0b0b1b77; */
color: #8288FE;
/* height: 40px; */
/* font-size: 20px; */
font-size: 40px;
/* width: 40px; */
/* border-radius: 9999px; */
display: flex;
justify-content: center;
align-items: center;

View file

@ -18,7 +18,7 @@ export function SetupScreen() {
<div className="icon">
<Icon name="logo" />
</div>
<h1 className="title">Let&apos;s get this set up!</h1>
<h1 className="title">Let&apos;s get things configured.</h1>
<p className="paragraph" style={{ paddingBottom: 25, paddingTop: 10 }}>
To get started, we need to setup some things first. Click the button below to continue.
</p>

View file

@ -27,7 +27,9 @@ export function useToggleWhitelistDomain(domain: string | null) {
const { domainWhitelist, addDomain, removeDomain } = useDomainWhitelist();
const isWhitelisted = domainWhitelist.includes(domain ?? '');
const { grantPermission } = usePermission();
const iconPath = (chrome || browser).runtime.getURL(isWhitelisted ? 'assets/active.png' : 'assets/inactive.png');
const iconPath = (chrome || browser).runtime.getURL(
isWhitelisted ? 'src/assets/active.png' : 'src/assets/inactive.png',
);
(chrome || browser).action.setIcon({
path: iconPath,

View file

@ -14,7 +14,7 @@ body {
display: flex;
flex-direction: column;
height: 100%;
background-color: #0A0A10;
background-color: #0a0a0a;
}
.container.permission-grant {

View file

@ -5,7 +5,7 @@ html {
}
body {
background-color: #0A0A10;
background-color: #0a0a0a;
color: white;
padding-bottom: 50px;
}
@ -85,7 +85,7 @@ body {
}
.permission-request .card.purple, .permission-request .card.purple .icon-circle {
border-color: #49277C;
border-color: hsl(0 0% 98%);
}
.permission-request .card.purple .icon-circle {

View file

@ -32,7 +32,7 @@ export default function PermissionRequest() {
We need some <br /> browser permissions
</h1>
<p className="text-color paragraph">
We don&apos;t like it either, but the sudo-flix extension needs quite a few permissions to function. Listed
We don&apos;t like it either, but the P-Stream extension needs quite a few permissions to function. Listed
below is an explanation for all permissions we need.
</p>
@ -66,8 +66,8 @@ export default function PermissionRequest() {
<h3>Network Requests</h3>
<p className="text-color paragraph">
This permission allows the extension to instruct the browser how to request data from sites. In more
technical terms, this allows sudo-flix to modify HTTP headers that it wouldn&apos;t normally be allowed
to.
technical terms, this allows P-Stream, movie-web, sudo-flix, watch.lonelil.ru, etc to modify HTTP headers
that it wouldn&apos;t normally be allowed to.
</p>
<p className="text-color paragraph">
You won&apos;t be prompted for this permission, it&apos;s included in Read & change data from all sites.
@ -76,8 +76,7 @@ export default function PermissionRequest() {
<Card icon={<Icon name="cookie" />}>
<h3>Read and write cookies</h3>
<p className="text-color paragraph">
Some sources use cookies for authentication. We need to be able to read and set those cookies. The
extension will only be able to accees the cookies for a few sites we scrape.
Some sources use cookies for authentication. We need to be able to read and set those cookies.
</p>
<p className="text-color paragraph">
You won&apos;t be prompted for this permission, it&apos;s included in Read & change data from all sites.

View file

@ -3,7 +3,7 @@ import { useStorage } from '@plasmohq/storage/hook';
import { makeUrlIntoDomain } from '~utils/domains';
export const DEFAULT_DOMAIN_WHITELIST = [];
export const DEFAULT_DOMAIN_WHITELIST = ['pstream.org'];
export const modifiableResponseHeaders = [
'access-control-allow-origin',