diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54271b2b0..03d5cbf9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,11 +16,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: HTML5Validator - uses: Cyb3r-Jak3/html5validator-action@master + - name: Validate HTML + uses: anishathalye/proof-html@v2 with: - root: www/ - css: true + directory: www/ - uses: actions/setup-node@v4 with: diff --git a/www/index.css b/www/index.css index 6b688fdbd..296771482 100644 --- a/www/index.css +++ b/www/index.css @@ -82,7 +82,8 @@ header { font-weight: 500; width: 100%; z-index: 1100; - box-shadow: 0em 0.125em 0.25em -0.06em rgba(0, 0, 0, 0.2), + box-shadow: + 0em 0.125em 0.25em -0.06em rgba(0, 0, 0, 0.2), 0em 0.25em 0.3em 0em rgba(0, 0, 0, 0.14), 0em 0.06em 0.625em 0em rgba(0, 0, 0, 0.12); } @@ -119,7 +120,8 @@ header > div { .container > div { padding: 0.625em 20px; text-align: left; - box-shadow: 0em 0.06em 0.19em 0em rgba(0, 0, 0, 0.2), + box-shadow: + 0em 0.06em 0.19em 0em rgba(0, 0, 0, 0.2), 0em 0.06em 0.06em 0em rgba(0, 0, 0, 0.14), 0em 0.125em 0.06em -0.06em rgba(0, 0, 0, 0.12); border-radius: 0.25em; @@ -212,7 +214,8 @@ header > div { letter-spacing: 0.05em; display: inline-flex; align-items: center; - box-shadow: 0em 0.06em 0.3em 0em rgba(0, 0, 0, 0.2), + box-shadow: + 0em 0.06em 0.3em 0em rgba(0, 0, 0, 0.2), 0em 0.125em 0.125em 0em rgba(0, 0, 0, 0.14), 0em 0.19em 0.06em -0.125em rgba(0, 0, 0, 0.12); color: #fff; @@ -321,7 +324,8 @@ header > div { letter-spacing: 0.05em; display: inline-flex; align-items: center; - box-shadow: 0em 0.06em 0.3em 0em rgba(0, 0, 0, 0.2), + box-shadow: + 0em 0.06em 0.3em 0em rgba(0, 0, 0, 0.2), 0em 0.125em 0.125em 0em rgba(0, 0, 0, 0.14), 0em 0.19em 0.06em -0.125em rgba(0, 0, 0, 0.12); color: #fff; diff --git a/www/index.html b/www/index.html index de4a6e572..d4397888a 100644 --- a/www/index.html +++ b/www/index.html @@ -1,12 +1,12 @@ - + - - + + OpenWrt Firmware Selector - - + + @@ -15,7 +15,7 @@
- Logo + Logo
@@ -94,7 +94,7 @@

Download OpenWrt Firmware for your Device

spellcheck="false" autocapitalize="off" autofocus - > + />
@@ -127,9 +127,9 @@

About this build

- - - + + +
diff --git a/www/index.js b/www/index.js index a7c06ab96..c0392a7f7 100644 --- a/www/index.js +++ b/www/index.js @@ -148,7 +148,7 @@ function buildAsuRequest(request_hash) { showStatus( `tr-${mobj.imagebuilder_status || "init"}`, true, - "info" + "info", ); setTimeout(buildAsuRequest.bind(null, mobj.request_hash), 5000); }); @@ -187,8 +187,8 @@ function setupSelectList(select, items, onselection) { (a + (a.indexOf("-") < 0 ? "-Z" : "")).localeCompare( b + (b.indexOf("-") < 0 ? "-Z" : ""), undefined, - { numeric: true } - ) + { numeric: true }, + ), ); for (const item of items) { @@ -498,7 +498,7 @@ function createLink(mobj, image, image_url) { } return htmlToElement( - `${label.toUpperCase()}` + `${label.toUpperCase()}`, ); } @@ -517,7 +517,7 @@ function createExtra(image) { (image.sha256 ? `
sha256sum: ${image.sha256}
` : "") + - "" + "", ); } @@ -564,7 +564,7 @@ function updateImages(mobj) { .replace("{title}", encodeURI($("#models").value)) .replace("{target}", mobj.target) .replace("{id}", mobj.id) - .replace("{version}", mobj.version_number) + .replace("{version}", mobj.version_number), ); setValue( @@ -575,7 +575,7 @@ function updateImages(mobj) { "&target=" + encodeURIComponent(mobj.target) + "&id=" + - encodeURIComponent(mobj.id) + encodeURIComponent(mobj.id), ); images.sort((a, b) => a.name.localeCompare(b.name)); @@ -604,7 +604,7 @@ function updateImages(mobj) { link.onmouseover = function () { links2.childNodes.forEach((e) => - e.firstChild.classList.remove("download-link-hover") + e.firstChild.classList.remove("download-link-hover"), ); link.firstChild.classList.add("download-link-hover"); @@ -633,7 +633,7 @@ function updateImages(mobj) { "&target=" + encodeURIComponent(mobj.target) + "&id=" + - encodeURIComponent(mobj.id) + encodeURIComponent(mobj.id), ); hide("#notfound"); @@ -763,7 +763,7 @@ async function init() { return obj.json(); } else { // .versions.json is optional - return {versions_list: []} + return { versions_list: [] }; } }) .then((obj) => { @@ -773,7 +773,7 @@ async function init() { version.localeCompare("19.07.4", undefined, { numeric: true, sensitivity: "base", - }) >= 0 + }) >= 0, ); if (config.show_snapshots) { @@ -787,8 +787,12 @@ async function init() { }; }); - config.versions ||= upstream_config.versions; - config.default_version ||= upstream_config.default_version; + if (!config.versions) { + config.versions = upstream_config.versions; + } + if (!config.default_version) { + config.default_version = upstream_config.default_version; + } config.overview_urls = {}; config.image_urls = {}; @@ -838,7 +842,7 @@ async function init() { for (let title of getModelTitles(profile.titles)) { if (title.length == 0) { console.warn( - `Empty device title for model id: ${profile.target}, ${profile.id}` + `Empty device title for model id: ${profile.target}, ${profile.id}`, ); continue; } @@ -861,14 +865,14 @@ async function init() { updateImages, (selectList) => { changeModel(version, obj, selectList.value); - } + }, ); // set model when selected version changes setModel( obj, current_device["target"] || url_params.get("target"), - current_device["id"] || url_params.get("id") + current_device["id"] || url_params.get("id"), ); // trigger update of current selected model