Anonymous

MediaWiki:Gadget-BlurImages.js: Difference between revisions

From Jenny Everywhere Wiki
no edit summary
No edit summary
No edit summary
Line 40: Line 40:
});
});
});
});
});
mw.hook('wikipage.content').add(function(){
($(".nsfw-image-page").length) {
    var obj = $(".fullImageLink")
var img = $(obj).find("img");
var width = $(img).width();
var height = $(img).height();
var text = "Click to view. Contains " + $(".nsfw-image-page").data("contains") + ".";
    $(obj).append($("<div></div>").text(text).width(width).height(height).addClass("imagecover").prop("title", "Click image to view").click(function(event){
    $(event.target).parent().find("img").css("filter", "none");
    $(event.target).remove();
    }));
};
});
});
12,457

edits