From: Moritz Warning Date: Sun, 2 Feb 2020 03:51:20 +0000 (+0100) Subject: allow matching when key word is at the start of the image string X-Git-Tag: v1.0.0~33 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=09e302dc1e99e0805f117f0800b86d70e521be25;p=web%2Ffirmware-selector-openwrt-org.git allow matching when key word is at the start of the image string --- diff --git a/www/index.js b/www/index.js index 3e754d1..99acb64 100644 --- a/www/index.js +++ b/www/index.js @@ -220,13 +220,13 @@ function updateImages(dllink, model, target, release, commit, prefix, images) { for (var i in images) { var image = images[i]; - if (image.includes('-factory')) { + if (image.includes('factory')) { entries['FACTORY'].push(image); - } else if (image.includes('-sysupgrade')) { + } else if (image.includes('sysupgrade')) { entries['SYSUPGRADE'].push(image); - } else if (image.includes('-kernel') || image.includes('-zImage') || image.includes('-uImage')) { + } else if (image.includes('kernel') || image.includes('zImage') || image.includes('uImage')) { entries['KERNEL'].push(image); - } else if (image.includes('-rootfs')) { + } else if (image.includes('rootfs')) { entries['ROOTFS'].push(image); } else if (image.includes('sdcard')) { entries['SDCARD'].push(image);