Gallery typo

This commit is contained in:
Zixaphir 2015-01-12 22:12:30 -07:00
parent b78bcc2488
commit de49f1b78f
3 changed files with 4 additions and 4 deletions

View File

@ -11205,7 +11205,7 @@
$.rmClass(el, 'gal-highlight');
}
$.addClass(thumb, 'gal-highlight');
elType = /\.webm$/.test(thumb.href) ? 'video' : /\.pdf$/.test(thumb.href) ? 'iframe' : 'image';
elType = /\.webm$/.test(thumb.href) ? 'video' : /\.pdf$/.test(thumb.href) ? 'iframe' : 'img';
$[elType === 'iframe' ? 'addClass' : 'rmClass'](doc, 'gal-pdf');
file = $.el(elType, {
title: name.download = name.textContent = thumb.title

View File

@ -11242,7 +11242,7 @@
$.rmClass(el, 'gal-highlight');
}
$.addClass(thumb, 'gal-highlight');
elType = /\.webm$/.test(thumb.href) ? 'video' : /\.pdf$/.test(thumb.href) ? 'iframe' : 'image';
elType = /\.webm$/.test(thumb.href) ? 'video' : /\.pdf$/.test(thumb.href) ? 'iframe' : 'img';
$[elType === 'iframe' ? 'addClass' : 'rmClass'](doc, 'gal-pdf');
file = $.el(elType, {
title: name.download = name.textContent = thumb.title

View File

@ -137,7 +137,7 @@ Gallery =
else if /\.pdf$/.test(thumb.href)
'iframe'
else
'image'
'img'
$[if elType is 'iframe' then 'addClass' else 'rmClass'] doc, 'gal-pdf'
file = $.el elType,
@ -146,7 +146,7 @@ Gallery =
Gallery.error file, thumb
file.src = name.href = thumb.href
$.extend file.dataset, thumb.dataset
$.extend file.dataset, thumb.dataset
nodes.current.pause?() unless nodes.current.error
$.replace nodes.current, file
if elType is 'video'