From 17a0014b586bace0d0a1263e185f9883bfc5e392 Mon Sep 17 00:00:00 2001 From: relikd Date: Thu, 29 Feb 2024 23:36:28 +0100 Subject: [PATCH] feat: screenshots only for selected device --- index.html | 3 ++- script.js | 5 +++-- style.css | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 5528664d..38e2e84b 100644 --- a/index.html +++ b/index.html @@ -71,7 +71,8 @@
$IMG

$DESCRIPTION

- +
Actions: diff --git a/script.js b/script.js index 0ad8dd53..e1cd679f 100644 --- a/script.js +++ b/script.js @@ -209,12 +209,13 @@ function randomIPA(specificId) { const info = obj.results[0]; const imgs1 = info.screenshotUrls; const imgs2 = info.ipadScreenshotUrls; + const device = document.getElementById('device').value || 255; var imgStr = ''; - if (imgs1 && imgs1.length > 0) { + if (imgs1 && imgs1.length > 0 && device & 1) { imgStr += '

iPhone Screenshots:

' + urlsToImgs(redirectUrl, imgs1); } - if (imgs2 && imgs2.length > 0) { + if (imgs2 && imgs2.length > 0 && device & 2) { imgStr += '

iPad Screenshots:

' + urlsToImgs(redirectUrl, imgs2); } diff --git a/style.css b/style.css index ffa21848..df04bafe 100644 --- a/style.css +++ b/style.css @@ -95,6 +95,8 @@ h4 { .carousel img { max-height: 330px; margin: 8px; + min-width: 100px; + min-height: 100px; } .itunes p { white-space: pre-wrap;