Skip to content

Commit

Permalink
ESLint flat config + update pkgs + sh0rt.zip
Browse files Browse the repository at this point in the history
  • Loading branch information
DEVTomatoCake committed Feb 11, 2024
1 parent b3158e4 commit 199ec85
Show file tree
Hide file tree
Showing 9 changed files with 462 additions and 280 deletions.
202 changes: 0 additions & 202 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
node-version: 21

- name: "🛸 install eslint html plugins"
run: npm i
run: npm i --omit=optional

- name: "🔍 lint code"
run: npx eslint --ext .html,.js . --report-unused-disable-directives
run: npx eslint .
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules/
/node_modules/
8 changes: 4 additions & 4 deletions assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async function share(type) {
const name = Math.random().toString(36).slice(7)
const date = Date.now() + 1000 * 60 * 60 * 24 * 7

const res = await fetch("https://shorter.cf", {
const res = await fetch("https://sh0rt.zip", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand All @@ -178,9 +178,9 @@ async function share(type) {

const json = await res.json()
if (res.ok) {
document.getElementById("share-link").href = "https://shorter.cf/" + name
document.getElementById("share-link").innerText = "https://shorter.cf/" + name
document.getElementById("share-img").src = "https://api.qrserver.com/v1/create-qr-code/?data=" + encodeURIComponent("https://shorter.cf/" + name) + "&size=150x150&qzone=2"
document.getElementById("share-link").href = "https://sh0rt.zip/" + name
document.getElementById("share-link").innerText = "https://sh0rt.zip/" + name
document.getElementById("share-img").src = "https://api.qrserver.com/v1/create-qr-code/?data=" + encodeURIComponent("https://sh0rt.zip/" + name) + "&size=150x150&qzone=2"
openDialog(document.getElementById("shareDialog"))
} else alert("Couldn't create link: " + json.error)
return
Expand Down
4 changes: 4 additions & 0 deletions assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ strong {
color: var(--heading-color);
}

#shareImage {
display: none;
}

header .packType {
display: flex;
gap: 15px;
Expand Down
Loading

0 comments on commit 199ec85

Please sign in to comment.