Skip to content

Commit

Permalink
Merge pull request #22 from aviiciii/dev
Browse files Browse the repository at this point in the history
Code Refactor and Readme added
  • Loading branch information
aviiciii authored Jun 2, 2023
2 parents ee6e08e + 5a258d4 commit ede4cd3
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 663 deletions.
4 changes: 0 additions & 4 deletions .gitignore

This file was deleted.

45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
# shortlink
# Shorten!

NOTE: Don't make in public. KEYS EXPOSED
The Shorten Web Application allows users to generate shortened URLs for their long URLs. It is a simple and easy-to-use tool built using HTML, CSS, and JavaScript.

## Features

- Generates short URLs for long URLs to make them more manageable and shareable.
- Uses the short.io API service to handle URL shortening and redirection.
- Provides a clean and intuitive user interface for quick URL shortening.

## Prerequisites

Before getting started, make sure you have the following:

- A domain or subdomain to host the application.
- Registration of your domain/subdomain with short.io to obtain a public API key.

## Installation and Setup

1. Fork this repository to your GitHub account.
2. Clone the forked repository to your local machine.
3. Register your domain/subdomain with short.io to generate a public API key.
4. Open the `assets/script.js` file in a text editor.
5. Replace the placeholder API key in the `'authorization'` field with your short.io API key.
6. Rename the domain `'link.laavesh.ml'` to your own domain or subdomain in the following files:
- `index.html`
- `assets/script.js`

## Usage

1. Deploy the application to your domain or subdomain.
2. Visit your domain or subdomain in a web browser.
3. Enter a long URL in the input field.
4. Click on the "Shorten" button.
5. The application will generate a shortened URL using the short.io API and display it to the user.
6. Copy the shortened URL and use it wherever you need.

## Contributing

Contributions are welcome! If you have any suggestions, improvements, or bug fixes, feel free to create a pull request.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
2 changes: 2 additions & 0 deletions assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ document.getElementById("myinput").onclick = function () {

// data to be sent to the API
var data = {
// domain -- change here if you want to use your own domain
domain: "link.laavesh.ml",
originalURL: link,
allowDuplicates: false,
Expand All @@ -37,6 +38,7 @@ document.getElementById("myinput").onclick = function () {
headers: {
accept: "application/json",
"Content-Type": "application/json",
// API key -- change here if you want to use your own API key (public key)
authorization: "pk_ynFkEXQHXdWrijOF",
},
body: JSON.stringify(data),
Expand Down
23 changes: 0 additions & 23 deletions edit.py

This file was deleted.

Empty file removed short/db.sqlite3
Empty file.
22 changes: 0 additions & 22 deletions short/manage.py

This file was deleted.

Empty file removed short/short/__init__.py
Empty file.
16 changes: 0 additions & 16 deletions short/short/asgi.py

This file was deleted.

124 changes: 0 additions & 124 deletions short/short/settings.py

This file was deleted.

22 changes: 0 additions & 22 deletions short/short/urls.py

This file was deleted.

16 changes: 0 additions & 16 deletions short/short/wsgi.py

This file was deleted.

Empty file removed short/transfer/__init__.py
Empty file.
3 changes: 0 additions & 3 deletions short/transfer/admin.py

This file was deleted.

6 changes: 0 additions & 6 deletions short/transfer/apps.py

This file was deleted.

Empty file.
3 changes: 0 additions & 3 deletions short/transfer/models.py

This file was deleted.

Binary file removed short/transfer/static/transfer/copy.png
Binary file not shown.
Binary file removed short/transfer/static/transfer/favicon.png
Binary file not shown.
79 changes: 0 additions & 79 deletions short/transfer/static/transfer/script.js

This file was deleted.

Loading

0 comments on commit ede4cd3

Please sign in to comment.