mirror of https://github.com/requarks/wiki
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
348 B
14 lines
348 B
const ImageOverlay = require('./components/ImageOverlay')
|
|
|
|
module.exports = {
|
|
init($, config) {
|
|
|
|
// wrap images
|
|
$('p > img').each((i, element) => {
|
|
const src = $(element).attr('src');
|
|
$(element).wrap(`<a class="ty-image-wrapper" href="${src}" target="_blank"></a>`)
|
|
$(element).parent().append(ImageOverlay)
|
|
})
|
|
}
|
|
}
|