From 1f44c4f01c7abd9898fb4da8a47ad350731c4584 Mon Sep 17 00:00:00 2001 From: blankie Date: Sat, 22 Oct 2022 12:13:05 +0700 Subject: [PATCH] Loosen criteria for noscript images /stevenuniverse/wiki/Steven_Universe_Future#Gallery /stevenuniverse/wiki/Jasper#Galleries /wiki/The_Cluster#Galleries --- src/page-wiki.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/page-wiki.rkt b/src/page-wiki.rkt index 488886f..33a4df4 100644 --- a/src/page-wiki.rkt +++ b/src/page-wiki.rkt @@ -57,7 +57,7 @@ (data-src "https://static.wikia.nocookie.net/nice-image-thumbnail.png") (class "thumbimage lazyload")))) (noscript - (a (@ (href "https://static.wikia.nocookie.net/nice-image.png") (class "image")) + (a (@ (href "https://static.wikia.nocookie.net/nice-image.png")) (img (@ (src "https://static.wikia.nocookie.net/nice-image-thumbnail.png") (data-src "https://static.wikia.nocookie.net/nice-image-thumbnail.png") (class "thumbimage"))))) @@ -122,8 +122,8 @@ ; remove noscript versions of images because they are likely lower quality than the script versions [(and (eq? element-type 'noscript) (match children - ; either the noscript has a.image as a first child... - [(list (list 'a (list '@ a-att ...) _)) (has-class? "image" a-att)] + ; either the noscript has an a, with attributes and an img as a first child, as a first child... + [(list (list 'a (list '@ _) (list 'img _))) #t] ; or the noscript has img as a first child [(list (list 'img _)) #t] [_ #f]))