Skip to content

Commit

Permalink
fix name on images & new screens
Browse files Browse the repository at this point in the history
  • Loading branch information
DEVTomatoCake committed Jan 10, 2024
1 parent d2d6c9b commit d203cfd
Show file tree
Hide file tree
Showing 21 changed files with 27 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
uses: actions/checkout@v4

- name: "🔧 setup node"
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 21

- name: "🛸 install eslint html plugins"
run: npm i
Expand Down
4 changes: 2 additions & 2 deletions assets/analyzer.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ let dpExclusive = {
s: 0
},
functions: [],
functionCalls: []
functionCalls: ["#minecraft:load", "#minecraft:tick"]
}
let rpExclusive = {
atlases: 0,
Expand Down Expand Up @@ -293,7 +293,7 @@ async function mainScan(hasData = false) {
s: 0
},
functions: [],
functionCalls: []
functionCalls: ["#minecraft:load", "#minecraft:tick"]
}
rpExclusive = {
atlases: 0,
Expand Down
Binary file removed assets/images/favicon.ico
Binary file not shown.
Binary file modified assets/images/icon-128x128.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 modified assets/images/icon-144x144.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 modified assets/images/icon-152x152.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 modified assets/images/icon-192x192.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 modified assets/images/icon-384x384.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 modified assets/images/icon-512x512.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 modified assets/images/icon-72x72.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 modified assets/images/icon-96x96.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 modified assets/images/icon.pdn
Binary file not shown.
Binary file modified assets/images/icon.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 removed assets/images/screen_result.png
Binary file not shown.
Binary file removed assets/images/showcase.png
Binary file not shown.
Binary file added assets/images/showcase1.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 assets/images/showcase2.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 assets/images/showcase3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions assets/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ window.addEventListener("load", () => {
done = parsed.done
errors = parsed.errors
rpMode = parsed.rpMode
document.getElementById("radiorp").checked = rpMode

filetypes = parsed.filetypes
packFiles = parsed.packFiles
Expand Down Expand Up @@ -127,6 +128,7 @@ function clearResults() {
document.getElementById("progress").innerText = ""
document.getElementById("result").innerHTML = ""
document.getElementById("resultButtons").hidden = true
document.getElementById("shareImage").style.display = "none"
if (interval) clearInterval(interval)
}

Expand All @@ -151,21 +153,27 @@ async function share(type) {
emptyFiles,
dpExclusive,
rpExclusive
}, null, type == "json" ? 4 : void 0)
}, null, type == "json" ? "\t" : void 0)
if (type == "link") {
const name = Math.random().toString(36).slice(7)
const date = Date.now() + 1000 * 60 * 60 * 24 * 7

const res = await fetch("https://shorter.cf", {
method: "POST",
headers: {
"Content-Type": "application/json"
"Content-Type": "application/json",
Accept: "application/json",
"User-Agent": "TomatoCake / pack-analyzer"
},
body: JSON.stringify({name, url: location.href + "?data=" + encodeURIComponent(content), date})
body: JSON.stringify({
name,
date,
url: location.href + "?data=" + encodeURIComponent(content)
})
})

const json = await res.json()
if (json.status == "success") {
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"
Expand Down
11 changes: 7 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@
"description": "A tool which allows you to analyze Minecraft Java datapacks and resourcepacks, and generate stats and share from them.",
"screenshots": [
{
"src": "/assets/images/screen_result.png",
"src": "/assets/images/showcase1.png",
"type": "image/png",
"sizes": "713x339"
"sizes": "828x795"
},{
"src": "/assets/images/showcase.png",
"src": "/assets/images/showcase2.png",
"type": "image/png",
"sizes": "597x363"
},{
"src": "/assets/images/showcase3.png",
"type": "image/png",
"form_factor": "wide",
"sizes": "955x500"
}
]
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"main": "index.html",
"author": "TomatoCake",
"license": "CC BY-NC-SA 4.0 https://creativecommons.org/licenses/by-nc-sa/4.0",
"repository": {
"type": "git",
"url": "https://github.com/DEVTomatoCake/Pack-Analyzer.git"
},
"devDependencies": {
"@html-eslint/eslint-plugin": "^0.22.0",
"@html-eslint/parser": "^0.22.0",
Expand Down

0 comments on commit d203cfd

Please sign in to comment.