Rename the project after the web service that it uses

This commit is contained in:
0x1eef 2024-03-28 15:49:55 -03:00
parent 352c075f84
commit f98a97ff05
17 changed files with 40 additions and 50 deletions

View file

@ -1,4 +1,4 @@
name: photon name: myip.wtf
on: on:
push: push:

View file

@ -1,4 +1,4 @@
name: photon name: myip.wtf
on: on:
push: push:

View file

@ -1,52 +1,39 @@
## About ## About
Photon is a Chromium extension that provides information about myip.wtf relays information about your public IP address
the public IP address you are using to connect to the internet. When from
the extension's icon is clicked, the extension makes a request to the [clean.myip.wtf.com/json](https://clean.myip.wtf.com/json)
[clean.wtfismyip.com](https://clean.wtfismyip.com) to your browser.
web service to discover information about your public IP address, and
then displays that information in a simple HTML view.
## Features ## Demo
* Displays a public IP address. <p>
* Displays the Internet Service Provider (ISP) associated with a public IP address. <img src="https://raw.githubusercontent.com/0x1eef/myip.wtf/main/share/myip.wtf/myip.wtf.png">
* Displays the city associated with a public IP address. </p>
* Displays the country associated with a public IP address.
* Displays whether or not a public IP address is a Tor exit node.
## Install ## Install
Produce the "build" directory: * Produce the `build/` directory
git clone https://github.com/0x1eef/photon.git git clone https://github.com/0x1eef/myip.wtf
cd photon cd myip.wtf
npm i npm i
npm run build npm run build
Add the extension to Chrome: * Load the extension
* Visit `chrome://extensions`. * Visit `chrome://extensions`.
* Check "Developer mode" (top right hand corner). * Check `Developer mode` (top right hand corner).
* Click "Load unpacked extension". * Click `Load unpacked extension`.
* Choose the "build/" directory from the file dialog. * Choose the `build/` directory from the file dialog.
* Done. * Done.
## Sources ## Sources
* [Source code (GitHub)](https://github.com/0x1eef/photon#readme) * [GitHub](https://github.com/0x1eef/myip.wtf#readme)
* [Source code (GitLab)](https://gitlab.com/0x1eef/photon#about) * [GitLab](https://gitlab.com/0x1eef/myip.wtf#about)
## Screenshots ## License
<p>
<img src="https://raw.githubusercontent.com/0x1eef/photon/main/share/photon/photon.png">
</p>
## <a id="license"> License </a>
[BSD Zero Clause](https://choosealicense.com/licenses/0bsd/). [BSD Zero Clause](https://choosealicense.com/licenses/0bsd/).
<br> <br>
See [LICENSE](./LICENSE). See [LICENSE](./LICENSE).

8
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "photon", "name": "myip.wtf",
"version": "0.2.1", "version": "0.3.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "photon", "name": "myip.wtf",
"version": "0.2.1", "version": "0.3.0",
"dependencies": { "dependencies": {
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"

View file

@ -1,6 +1,6 @@
{ {
"name": "photon", "name": "myip.wtf",
"version": "0.2.1", "version": "0.3.0",
"dependencies": { "dependencies": {
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"

BIN
share/myip.wtf/myip.wtf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View file

@ -9,7 +9,7 @@
<body> <body>
<div id="root"></div> <div id="root"></div>
<footer> <footer>
Powered by <a href="https://clean.wtfismyip.com">clean.wtfismyip.com</a> Powered by <a href="https://clean.myip.wtf">clean.myip.wtf</a>
</footer> </footer>
<script src="/js/index.js"></script> <script src="/js/index.js"></script>
</body> </body>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -4,7 +4,7 @@ import { TResponse, Response } from "~/lib/response";
type Maybe<T> = T | null; type Maybe<T> = T | null;
export function useWebService(): [Maybe<TResponse>, Maybe<Error>] { export function useWebService(): [Maybe<TResponse>, Maybe<Error>] {
const endpoint = "https://clean.wtfismyip.com/json"; const endpoint = "https://clean.myip.wtf/json";
const [response, setResponse] = useState<Maybe<TResponse>>(null); const [response, setResponse] = useState<Maybe<TResponse>>(null);
const [error, setError] = useState<Maybe<Error>>(null); const [error, setError] = useState<Maybe<Error>>(null);
const options: RequestInit = {cache: "no-store"}; const options: RequestInit = {cache: "no-store"};

View file

@ -1,15 +1,18 @@
{ {
"manifest_version": 3, "manifest_version": 3,
"name": "Photon", "name": "myip.wtf",
"version": "0.3.0", "version": "0.3.0",
"description": "Provides information about your public IP address.", "description": "Relays information about your public IP address from myip.wtf to your browser",
"action": { "action": {
"default_popup": "/html/browseraction.html" "default_popup": "/html/browseraction.html"
}, },
"permissions": [],
"icons": { "icons": {
"16": "images/icons/icon16.png", "16": "images/icons/wtf16x16.png",
"128": "images/icons/icon128.png" "48": "images/icons/wtf48x48.png",
"64": "images/icons/wtf64x64.png",
"128": "images/icons/wtf128x128.png",
"256": "images/icons/wtf256x256.png"
}, },
"permissions": [],
"default_locale": "en" "default_locale": "en"
} }