diff --git a/.github/workflows/minify.yml b/.github/workflows/minify.yml index f6da78d..5b9fc68 100644 --- a/.github/workflows/minify.yml +++ b/.github/workflows/minify.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v3 - name: HTML/CSS/JS Minifier - uses: docker://devatherock/minify-js:1.0.3 + uses: devatherock/minify-js@v3.0.0 with: add_suffix: false diff --git a/timezone.js b/timezone.js index c7f0c5f..1a3e5b7 100644 --- a/timezone.js +++ b/timezone.js @@ -2,7 +2,7 @@ // so what's here might not be amazing // but it should be fine -function getTZName(type) { +const tzName = (type) => { const DTFormat = new Intl.DateTimeFormat([], { "timeZoneName": type }); const tzName = DTFormat .formatToParts(Date.now()) @@ -10,8 +10,6 @@ function getTZName(type) { return tzName.value; } -document.getElementById("timezone").innerText = "Your time zone is: " + getTZName("short") -document.getElementById("fullname").innerText = "Full name: " + getTZName("long") - -const ianaName = new Intl.DateTimeFormat().resolvedOptions().timeZone; -document.getElementById("iananame").innerHTML = "IANA name: " + ianaName; \ No newline at end of file +document.getElementById("timezone").innerText = "Your time zone is: " + tzName("short") +document.getElementById("fullname").innerText = "Full name: " + tzName("long") +document.getElementById("iananame").innerHTML = "IANA name: " + (new Intl.DateTimeFormat().resolvedOptions().timeZone); \ No newline at end of file