Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Initial Push
Browse files Browse the repository at this point in the history
  • Loading branch information
sthivaios committed Jan 1, 2024
1 parent ca9e3ff commit ec4a108
Show file tree
Hide file tree
Showing 27 changed files with 487 additions and 0 deletions.
Binary file added chrome-exten/icons/128.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 chrome-exten/icons/16.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 chrome-exten/icons/32.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 chrome-exten/icons/48.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 chrome-exten/icons/FullSize.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 chrome-exten/icons/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions chrome-exten/index-old.html
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>
39 changes: 39 additions & 0 deletions chrome-exten/index-old.js
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!");
}
26 changes: 26 additions & 0 deletions chrome-exten/index.html
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>
42 changes: 42 additions & 0 deletions chrome-exten/index.js
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);
}
15 changes: 15 additions & 0 deletions chrome-exten/manifest.json
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"
}
}
36 changes: 36 additions & 0 deletions chrome-exten/style-old.css
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);
}
62 changes: 62 additions & 0 deletions chrome-exten/style.css
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;
}
Binary file added firefox-exten/icons/128.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 firefox-exten/icons/16.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 firefox-exten/icons/32.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 firefox-exten/icons/48.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 firefox-exten/icons/FullSize.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 firefox-exten/icons/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions firefox-exten/index.html
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>
42 changes: 42 additions & 0 deletions firefox-exten/index.js
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);
}
20 changes: 20 additions & 0 deletions firefox-exten/manifest.json
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"
}
}

Loading

0 comments on commit ec4a108

Please sign in to comment.