Skip to content

Commit

Permalink
shifted to .xyz and updated the api endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
aviiciii committed Apr 12, 2024
1 parent fa0c639 commit 3700514
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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.co",
domain: "link.laavesh.xyz",
originalURL: link,
allowDuplicates: false,
};
Expand All @@ -33,13 +33,13 @@ document.getElementById("myinput").onclick = function () {
}

// send the data to the API
fetch("https://api.short.cm/links/public", {
fetch("https://api.short.io/links/public", {
method: "post",
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",
authorization: "pk_M8NSz2WK3m9gHdH2",
},
body: JSON.stringify(data),
})
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<!-- shortened url box -->
<div class="msg row">
<div class="column left">
<p id="message">link.laavesh.co/ </p>
<p id="message">link.laavesh.xyz/ </p>
</div>
<div class="column right">
<button name="qr-btn" id="qr-btn"> <img id="qr" src="assets/qr.png" alt="qr" /> </button>
Expand All @@ -91,7 +91,7 @@
<!-- Modal content -->
<div class="modal-content">
<span class="close"></span>
<img id="qr-img" src="https://api.qrserver.com/v1/create-qr-code/?data=https://link.laavesh.co/&qzone=2&size=250x250&bgcolor=f1ede2" />
<img id="qr-img" src="https://api.qrserver.com/v1/create-qr-code/?data=https://link.laavesh.xyz/&qzone=2&size=250x250&bgcolor=f1ede2" />
</div>

</div>
Expand Down
6 changes: 3 additions & 3 deletions old.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ <h1 class="message">Shorten your link!</h1>
document.getElementById("myinput").onclick = function () {
var link = document.getElementById("linkinput").value;
var data = {
domain: "link.laavesh.co",
domain: "link.laavesh.xyz",
originalURL: link,
allowDuplicates: false,
};
// add custom path if it exists
if (document.getElementById("pathinput").value != "") {
data.path = document.getElementById("pathinput").value;
}
fetch("https://api.short.cm/links/public", {
fetch("https://api.short.io/links/public", {
method: "post",
headers: {
accept: "application/json",
"Content-Type": "application/json",
authorization: "pk_ynFkEXQHXdWrijOF",
authorization: "pk_M8NSz2WK3m9gHdH2",
},
body: JSON.stringify(data),
})
Expand Down

0 comments on commit 3700514

Please sign in to comment.