IMPR: add meta-offline class to mark unavalable links

This commit is contained in:
Tony Air 2020-09-11 05:01:18 +07:00
parent d2ea383925
commit 0303ba5e45
1 changed files with 4 additions and 0 deletions

View File

@ -292,8 +292,10 @@ const MetaLightboxUI = (($) => {
const $iframe = ui.loadIframe(src, classTerm);
if (!$iframe) {
$link.addClass('meta-offline');
return false;
}
$link.removeClass('meta-offline');
// Set the title
const title = $link.data('title')
@ -352,9 +354,11 @@ const MetaLightboxUI = (($) => {
const $iframe = ui.loadIframe(href, 'meta-lightbox-iframe-content');
if (!$iframe) {
$link.addClass('meta-offline');
return false;
}
$link.removeClass('meta-offline');
return true;
}