This repository has been archived by the owner on Nov 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
487 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>shortener</title> | ||
<link rel="stylesheet" href="./style.css"> | ||
</head> | ||
<body> | ||
|
||
<input id="url" placeholder="https://google.com"><br> | ||
<button id="submit">Submit</button><br><Br> | ||
<div> | ||
<p>Shortened URL :</p><a id="link"><p id="output"></p></a> | ||
</div> | ||
<button id="copy">Copy</button> | ||
|
||
</body> | ||
<script src="index.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
document.getElementById("submit").onclick = function(){ | ||
original_url = document.getElementById("url").value; | ||
endpoint = "https://shortapi.kioydio.org/create/?url="+original_url | ||
|
||
|
||
const Http = new XMLHttpRequest(); | ||
Http.open("GET", endpoint); | ||
Http.send(); | ||
|
||
Http.onreadystatechange=(e)=>{ | ||
document.getElementById("output").innerHTML = Http.responseText; | ||
document.getElementById("link").href = Http.responseText; | ||
console.log(Http.response); | ||
} | ||
|
||
} | ||
|
||
|
||
document.getElementById("copy").onclick = function(){ | ||
console.log("copy clicked") | ||
var copyText = document.getElementById("output"); | ||
|
||
/* Create a temporary textarea element to copy the text */ | ||
var tempTextarea = document.createElement("textarea"); | ||
tempTextarea.value = copyText.textContent; | ||
|
||
/* Append the textarea to the document */ | ||
document.body.appendChild(tempTextarea); | ||
|
||
/* Select and copy the text */ | ||
tempTextarea.select(); | ||
document.execCommand("copy"); | ||
|
||
/* Remove the temporary textarea */ | ||
document.body.removeChild(tempTextarea); | ||
|
||
/* Provide some visual feedback (optional) */ | ||
alert("Shortened URL copied to clipboard!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>shortener</title> | ||
<link rel="stylesheet" href="./style.css"> | ||
</head> | ||
<body> | ||
|
||
<input id="url" pattern="^(?:http|https)://(?:[\w\-.\?]+)(?::\d+)?(?:[/\?]|$)" placeholder="https://google.com"><br> | ||
<button id="submit">Submit</button><br><Br> | ||
<div id="maindiv"> | ||
<p>Shortened URL :</p><a id="link"><p id="output"></p></a> | ||
</div> | ||
<button id="copy">Copy</button> | ||
<div id="confirmouter"> | ||
<div id="confirm"> | ||
<p style="margin: 0px;">✔ Copied</p> | ||
</div> | ||
</div> | ||
|
||
|
||
</body> | ||
<script src="index.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
document.getElementById("submit").onclick = function(){ | ||
original_url = document.getElementById("url").value; | ||
endpoint = "https://shortapi.kioydio.org/create/?url="+original_url | ||
|
||
|
||
const Http = new XMLHttpRequest(); | ||
Http.open("GET", endpoint); | ||
Http.send(); | ||
|
||
Http.onreadystatechange=(e)=>{ | ||
document.getElementById("output").innerHTML = Http.responseText; | ||
document.getElementById("link").href = Http.responseText; | ||
console.log(Http.response); | ||
} | ||
|
||
} | ||
|
||
|
||
document.getElementById("copy").onclick = function(){ | ||
console.log("copy clicked") | ||
var copyText = document.getElementById("output"); | ||
|
||
/* Create a temporary textarea element to copy the text */ | ||
var tempTextarea = document.createElement("textarea"); | ||
tempTextarea.value = copyText.textContent; | ||
|
||
/* Append the textarea to the document */ | ||
document.body.appendChild(tempTextarea); | ||
|
||
/* Select and copy the text */ | ||
tempTextarea.select(); | ||
document.execCommand("copy"); | ||
|
||
/* Remove the temporary textarea */ | ||
document.body.removeChild(tempTextarea); | ||
|
||
/* Provide some visual feedback (optional) */ | ||
document.getElementById("confirm").style.opacity = "1"; | ||
setTimeout(function(){ | ||
document.getElementById("confirm").style.opacity = "0"; | ||
},2000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "Kioydioshort", | ||
"version": "31.12.2023", | ||
"description": "Extension endpoint for shortening URLs with Kioydioshort", | ||
"icons": { | ||
"16": "icons/16.png", | ||
"32": "icons/32.png", | ||
"48": "icons/48.png", | ||
"128": "icons/128.png" | ||
}, | ||
"action": { | ||
"default_popup": "index.html" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
body{ | ||
background-color: #1e1e1e; | ||
text-align: center; | ||
color: white; | ||
font-family: Arial; | ||
background-image: url(./icons/background.png); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
} | ||
|
||
a{ | ||
color: #2828fd; | ||
margin-left: 5px; | ||
} | ||
|
||
div{ | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: center; | ||
margin-bottom: 0px; | ||
} | ||
|
||
#copy{ | ||
font-size: 10px; | ||
margin-top: 0px; | ||
} | ||
|
||
#submit{ | ||
margin-top: 5px; | ||
} | ||
|
||
button{ | ||
border-radius: 5px; | ||
border: 1px solid rgb(88, 86, 86); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
body{ | ||
background-color: #1e1e1e; | ||
text-align: center; | ||
color: white; | ||
font-family: Arial; | ||
background-image: url(./icons/background.png); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
} | ||
|
||
a{ | ||
color: #2828fd; | ||
margin-left: 5px; | ||
} | ||
|
||
#maindiv{ | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: center; | ||
margin-bottom: 0px; | ||
} | ||
|
||
#copy{ | ||
font-size: 10px; | ||
margin-top: 0px; | ||
} | ||
|
||
#submit{ | ||
margin-top: 5px; | ||
} | ||
|
||
button{ | ||
border-radius: 5px; | ||
border: 1px solid rgb(88, 86, 86); | ||
} | ||
|
||
#confirm{ | ||
display: block; | ||
color: white; | ||
border-radius: 5px; | ||
background-color: #00d26a; | ||
margin: 5px; | ||
padding: 2px; | ||
padding-right: 4px; | ||
padding-left: 4.5px; | ||
width: max-content; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
transition: opacity 0.5s ease; | ||
opacity: 0; | ||
} | ||
|
||
#confirmouter{ | ||
display: block; | ||
text-align: center; | ||
align-items: center; | ||
justify-content: center; | ||
display: flex; | ||
flex-direction: column; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>shortener</title> | ||
<link rel="stylesheet" href="./style.css"> | ||
</head> | ||
<body> | ||
|
||
<input id="url" placeholder="https://google.com"><br> | ||
<button id="submit">Submit</button><br><Br> | ||
<div id="maindiv"> | ||
<p>Shortened URL :</p><a id="link"><p id="output"></p></a> | ||
</div> | ||
<button id="copy">Copy</button> | ||
<div id="confirmouter"> | ||
<div id="confirm"> | ||
<p style="margin: 0px;">✔ Copied</p> | ||
</div> | ||
</div> | ||
|
||
|
||
</body> | ||
<script src="index.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
document.getElementById("submit").onclick = function(){ | ||
original_url = document.getElementById("url").value; | ||
endpoint = "https://shortapi.kioydio.org/create/?url="+original_url | ||
|
||
|
||
const Http = new XMLHttpRequest(); | ||
Http.open("GET", endpoint); | ||
Http.send(); | ||
|
||
Http.onreadystatechange=(e)=>{ | ||
document.getElementById("output").innerHTML = Http.responseText; | ||
document.getElementById("link").href = Http.responseText; | ||
console.log(Http.response); | ||
} | ||
|
||
} | ||
|
||
|
||
document.getElementById("copy").onclick = function(){ | ||
console.log("copy clicked") | ||
var copyText = document.getElementById("output"); | ||
|
||
/* Create a temporary textarea element to copy the text */ | ||
var tempTextarea = document.createElement("textarea"); | ||
tempTextarea.value = copyText.textContent; | ||
|
||
/* Append the textarea to the document */ | ||
document.body.appendChild(tempTextarea); | ||
|
||
/* Select and copy the text */ | ||
tempTextarea.select(); | ||
document.execCommand("copy"); | ||
|
||
/* Remove the temporary textarea */ | ||
document.body.removeChild(tempTextarea); | ||
|
||
/* Provide some visual feedback (optional) */ | ||
document.getElementById("confirm").style.opacity = "1"; | ||
setTimeout(function(){ | ||
document.getElementById("confirm").style.opacity = "0"; | ||
},2000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"manifest_version": 2, | ||
"name": "Kioydioshort", | ||
"version": "31.12.2023", | ||
|
||
"description": "Enables users to quickly create shortened URLs via Kioydioshort", | ||
"homepage_url": "https://shorten.kioydio.org", | ||
"icons": { | ||
"48": "icons/48.png" | ||
}, | ||
|
||
"permissions": ["activeTab"], | ||
|
||
"browser_action": { | ||
"default_icon": "icons/32.png", | ||
"default_title": "Beastify", | ||
"default_popup": "index.html" | ||
} | ||
} | ||
|
Oops, something went wrong.