Added flag to turn off image featherlight

This commit is contained in:
Jian 2019-10-06 22:32:21 +11:00 committed by Matthew Taylor
parent bed0a6c0d0
commit 3ea5bca755
2 changed files with 15 additions and 2 deletions
static/js

View file

@ -21,8 +21,13 @@ var images = $("div#body-inner img").not(".inline");
// Wrap image inside a featherlight (to get a full size view in a popup)
images.wrap(function(){
var image =$(this);
if (!image.parent("a").length) {
return "<a href='" + image[0].src + "' data-featherlight='image'></a>";
var o = getUrlParameter(image[0].src);
var f = o['featherlight'];
// IF featherlight is false, do not use feather light
if (f != 'false') {
if (!image.parent("a").length) {
return "<a href='" + image[0].src + "' data-featherlight='image'></a>";
}
}
});