소스 검색

add wikia galleries to section embed

Markus-Rost 3 년 전
부모
커밋
b3d41387f0
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      functions/parse_page.js

+ 4 - 1
functions/parse_page.js

@@ -428,7 +428,10 @@ export default function parse_page(lang, msg, content, embed, wiki, reaction, {n
 							'figure.pi-image img',
 							'div.infobox-imagearea img'
 						].join(', ')).toArray(),
-						...sectionContent.find('ul.gallery > li.gallerybox img').toArray()
+						...sectionContent.find([
+							'ul.gallery > li.gallerybox img',
+							'div.wikia-gallery > div.wikia-gallery-item img'
+						].join(', ')).toArray()
 					].filter( img => {
 						let imgURL = ( img.attribs.src?.startsWith?.( 'data:' ) ? img.attribs['data-src'] : img.attribs.src );
 						if ( !imgURL ) return false;