Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
backgroundCropTop = dataCrop.split(', ')[0].split(':')[1]
backgroundCropBottom = dataCrop.split(', ')[1].split(':')[1]
$element
.removeAttr('class')
.removeAttr('data-background-height')
.removeAttr('data-crop')
}
backgroundWidth = parseInt(backgroundWidth.replace('px', '')) * 0.75
backgroundHeight = parseInt(backgroundHeight.replace('px', '')) * 0.75
$(this)
.before(`${helpers.startConditionalTag}
${helpers.endConditionalTag}`)
.removeAttr('class')
.removeAttr('data-background-width')
.removeAttr('data-background-height')
.removeAttr('data-background-url')
})
$('.mj-section-outlook-open').each(function () {
const $columnDiv = $(this).next()
const classes = $columnDiv.attr('data-class') ? $columnDiv.attr('data-class')
.split(' ')
.map(c => `${c}-outlook`)
.join(' ') : false
$(this).replaceWith(`${helpers.startConditionalTag}
<table cellspacing="0" cellpadding="0" border="0" role="presentation">
<tbody><tr>
<td class="${classes}" style="vertical-align:${$columnDiv.data('vertical-align')};width:${parseInt($(this).data('width'))}px;">
${helpers.endConditionalTag}`)
$columnDiv.removeAttr('data-vertical-align')
$columnDiv.removeAttr('data-class')
})
</td></tr></tbody></table>
$('.mj-container-outlook-close').each(function () {
$(this).replaceWith(`${helpers.startConditionalTag}
${helpers.endConditionalTag}`)
})
$('.mj-wrapper-outlook-open').each(function () {
$(this).replaceWith(`${helpers.startConditionalTag}
<table cellspacing="0" cellpadding="0" border="0" role="presentation"><tbody><tr><td style="width:${parseInt($(this).data('width'))}px;">
${helpers.endConditionalTag}`)
})
</td></tr></tbody></table>
$mjHeroContent.each(function () {
const width = $(this).css('width')
const align = $(this).data('align')
const backgroundColor = $(this).data('background-color')
$(this).before(`${helpers.startConditionalTag}
<table style="width:${width};" width="${width.replace('px', '')}" align="${align}" cellspacing="0" cellpadding="0" border="0" role="presentation"><tbody><tr><td style="padding:0;background-color:${backgroundColor};">
${helpers.endConditionalTag}`)
.after(`${helpers.startConditionalTag}
</td></tr></tbody></table>
${helpers.endConditionalTag}`)
.removeAttr('data-background-color')
.removeAttr('data-align')
})
$('.mj-social-outlook-line').each(function () {
$(this).replaceWith(`${helpers.startConditionalTag}
${helpers.endConditionalTag}`)
})