mirror of
https://github.com/a2nt/meta-lightbox.git
synced 2024-10-22 17:05:53 +02:00
IMPR: add meta-offline class to mark unavalable links
This commit is contained in:
parent
d2ea383925
commit
0303ba5e45
@ -292,8 +292,10 @@ const MetaLightboxUI = (($) => {
|
|||||||
|
|
||||||
const $iframe = ui.loadIframe(src, classTerm);
|
const $iframe = ui.loadIframe(src, classTerm);
|
||||||
if (!$iframe) {
|
if (!$iframe) {
|
||||||
|
$link.addClass('meta-offline');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$link.removeClass('meta-offline');
|
||||||
|
|
||||||
// Set the title
|
// Set the title
|
||||||
const title = $link.data('title')
|
const title = $link.data('title')
|
||||||
@ -352,9 +354,11 @@ const MetaLightboxUI = (($) => {
|
|||||||
|
|
||||||
const $iframe = ui.loadIframe(href, 'meta-lightbox-iframe-content');
|
const $iframe = ui.loadIframe(href, 'meta-lightbox-iframe-content');
|
||||||
if (!$iframe) {
|
if (!$iframe) {
|
||||||
|
$link.addClass('meta-offline');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$link.removeClass('meta-offline');
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user