mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 386333 - Extract the mime type from data URI images in Page Info. r=mano
This commit is contained in:
parent
bb15489364
commit
20394f5a36
@ -873,6 +873,13 @@ function makePreview(row)
|
||||
if (!mimeType)
|
||||
mimeType = getContentTypeFromHeaders(cacheEntryDescriptor);
|
||||
|
||||
// if we have a data url, get the MIME type from the url
|
||||
if (!mimeType && /^data:/.test(url)) {
|
||||
var dataMimeType = /^data:(image\/.*);/.exec(url);
|
||||
if (dataMimeType)
|
||||
mimeType = dataMimeType[1];
|
||||
}
|
||||
|
||||
var imageType;
|
||||
if (mimeType) {
|
||||
// We found the type, try to display it nicely
|
||||
|
Loading…
Reference in New Issue
Block a user