‘);
$(‘.tpu-fancybox-wrap’).css(‘maxWidth’, maxWidth);*/
instance.$refs.stage.on(‘transitionend’, function() {
updateButtonPos(instance);
});
},
onUpdate: updateButtonPos,
afterShow: function(instance, slide) {
updateButtonPos(instance);
instance.$refs.inner.find(‘.fancybox-tpu-nav’).show();
},
beforeClose: function(instance, slide) {
instance.$refs.inner.find(‘.fancybox-tpu-nav’).hide();
},
afterClose: function(instance, slide) {
$(‘.tpu-fancybox-wrap’).contents().unwrap();
$(‘body’).removeClass(‘tpu-fancybox-body-wrap’)
},
baseTpl: ‘
” +
‘
‘
‘ +
‘‘ +
‘‘ +
‘‘ +
‘
‘ +
” +
” +
‘
‘ +
‘
‘,
});
});
}
loadjs.ready([‘jquery’, ‘fancybox’], function() {
attachLightbox(function() {
return $(‘.text a:has(>img)’).filter(function(i, el) {
return $(this).attr(‘href’).match(/.(jpg|gif|png)(?=$|[?#])/) != null;
});
});
});
loadjs.ready([‘jquery’], function() {
$(‘.review’).on(‘click’, ‘.spoiler > a’, function(e) {
e.preventDefault();
$(this).next(‘div’).toggle();
});
$(‘.review’).on(‘click’, ‘.ispoiler’, function(e) {
e.preventDefault();
$(this).find(‘div’).css(‘filter’, ”);
$(this).removeClass(‘ispoiler’);
});
var prevPageUrl = ‘/review/acemagic-retro-x3/10.html’;
var nextPageUrl = ‘/review/acemagic-retro-x3/12.html’;
$(document).on(‘keydown’, function(e) {
if (e.ctrlKey || e.altKey || e.metaKey) return;
var el = document.activeElement;
if (el.matches(‘input, textarea, select, [contenteditable=”true”]’)) return;
if ($(‘.fancybox-container’).length) return;
if (e.key === ‘ArrowLeft’ && prevPageUrl) {
window.location.href = prevPageUrl;
} else if (e.key === ‘ArrowRight’ && nextPageUrl) {
window.location.href = nextPageUrl;
}
});
});
loadjs.ready([‘jquery’], function() {
$(‘table.tputbl.sort-header’).find(‘th[scope=col]’).css(‘cursor’, ‘pointer’).on(‘click’, function(e) {
var header=$(this)
header.parents(‘table’).find(‘th[scope=col]’).removeClass(‘sort-active’);
header.addClass(‘sort-active’);
var idx=header.parents(‘tr’).find(‘th[scope=col]’).index(this);
header.parents(‘table’).find(‘td, th[scope=row]’).filter(function() {
return $(this).index() == idx;
}).sortElementsTPU(function(a, b) {
a=$(a).text(); b=$(b).text();
if (header.hasClass(‘sort-force-number’)) {
a=parseInt(a, 10);
b=parseInt(b, 10);
}
if (header.hasClass(‘sort-nan-is-zero’)) {
if (isNaN(a))
a=0;
if (isNaN(b))
b=0;
}
try {
var result=a.localeCompare(b, undefined, { numeric: true, sensitivity: ‘base’ });
return result;
} catch(e) {
if (a>b) return 1;
if (a
Story via the original publisher. Read the original article
































