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

Commit

Permalink
added some shit (i don't even know what the hell im doing)
Browse files Browse the repository at this point in the history
  • Loading branch information
sthivaios committed Feb 25, 2024
1 parent d4624d2 commit 033a7fc
Show file tree
Hide file tree
Showing 5 changed files with 478 additions and 0 deletions.
56 changes: 56 additions & 0 deletions chrome-exten/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>reKnag</title>
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
<link rel="icon" href="./icon/128.png">
</head>
<body>

<div id="parent">

<div id="inputdetails">

<a id="header" href="https://kioydioshort.kioydiolabs.org/">
<img src="./icon/32.png"><p class="p" id="kstext">reKnag</p>
</a>

<!-- <div id="hr"></div> -->

<input id="url" placeholder="URL to shorten :"><br>

<button id="submit">Submit</button><br><Br>

<div id="maindiv">
<button id="copy">
<span id="copyicon" class="material-symbols-outlined">content_copy</span>
</button>
<p class="p">Shortened URL :</p>
</div>

<a id="link"><p id="output"></p></a>

<div id="helpouterouter">
<div id="helpouter">
<a class="helpatag" href="https://ksdocs.kioydiolabs.org/user-documentation.html">Need help?</a>
<a class="helpatag" href="./privacy-policy.html">Privacy Policy</a>
</div>
</div>

<div id="confirmouter">
<div id="confirm">
<p style="margin: 0px;">✔ Copied</p>
</div>
</div>


</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": "6.1.2024",
"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"
}
}
63 changes: 63 additions & 0 deletions chrome-exten/privacy-policy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kioydioshort</title>
<link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
<link rel="icon" href="./icon/128.png">
</head>
<body>

<div id="parent">
<div id="inputdetailspol">
<a id="header" href="https://kioydioshort.kioydiolabs.org/">

</a>
<p id="policy">

<h3 style="margin: 0px;">Privacy policy for reKnag.com</h3>
<p>Effective as of : January 29, 2024</p><div id="hrpol"></div>

<h4>1. Introduction</h4>
<rest>Welcome to reKnag.com. This Privacy Policy is designed to help you understand how we collect, use, disclose, and safeguard your personal information in relation to our AdSense integration.</rest><br>

<h4>2. Information We Collect</h4>
<rest>2.1 AdSense Information: We may collect information related to AdSense, including but not limited to ad impressions, clicks, and other interactions. This information is collected by Google AdSense, and we do not control or process this data.</rest><br>

<h4>3. AdSense and Third-Party Services</h4>
<rest>3.1 Google AdSense: Our site uses Google AdSense, a third-party advertising service provided by Google. AdSense may use cookies to serve relevant ads based on users' visits to our site and other websites on the internet. For more information on how Google AdSense uses data, please refer to Google's Privacy Policy.</rest><br>

<h4>4. Security</h4>
<rest>We implement reasonable security measures to protect your information. However, please note that AdSense data is collected and processed by Google, and their security measures apply. Refer to Google's Privacy Policy for more details.</rest><br>

<h4>5. Your Choices</h4>
<rest>You can control your preferences related to personalized advertising by adjusting your Google Ad Settings.</rest><br>

<h4>6. Changes to This Privacy Policy</h4>
<rest>We reserve the right to update our Privacy Policy. Any changes will be posted on this page with an updated effective date.</rest><br>

<h4>7. Contact Us</h4>
<rest>If you have any questions about this Privacy Policy, please contact us at <a id="helpatag" href="mailto:[email protected]">[email protected]</a>.</rest>
</p>
<a id="link"><p id="output"></p></a>

<div id="confirmouter">
<div id="confirm">
<p style="margin: 0px;">✔ Copied</p>
</div>
</div>
<div id="helpouterouter">
<div id="helpouter">
<a id="helpatag" href="./index.html">Back</a>
</div>
</div>

</div>

</div>

</body>
<script src="index.js"></script>
</html>
Loading

0 comments on commit 033a7fc

Please sign in to comment.