Module: thumbnail

Methods

(static) createThumbnail(rawThumbnail) → {ext.popups.Thumbnail|null}

Creates a thumbnail from the representation of a thumbnail returned by the PageImages MediaWiki API query module.

If there's no thumbnail, the thumbnail is too small, or the thumbnail's URL contains characters that could be used to perform an XSS attack via CSS), then null is returned.

Extracted from mw.popups.renderer.article.createThumbnail.

Parameters:
Name Type Description
rawThumbnail Object
Source:
Returns:
Type
ext.popups.Thumbnail | null

(static) createThumbnailElement(className, url, x, y, thumbnailWidth, thumbnailHeight, width, height) → {JQuery}

Creates the SVG image element that represents the thumbnail.

This function is distinct from createThumbnail as it abstracts away some browser issues that are uncovered when manipulating elements across namespaces.

Parameters:
Name Type Description
className string
url string
x number
y number
thumbnailWidth number
thumbnailHeight number
width number
height number
Source:
Returns:
Type
JQuery