Mailspring/internal_packages/message-autoload-images/lib/autoload-images-extension.es6
Ben Gotow 3fc6582718 es6(*): convert 20+ source files used in example packages to ES2016
There could be a few lurking bugs. Please test!
2016-02-29 18:47:22 -08:00

12 lines
440 B
JavaScript

import AutoloadImagesStore from './autoload-images-store';
import {MessageViewExtension} from 'nylas-exports';
export default class AutoloadImagesExtension extends MessageViewExtension {
static formatMessageBody = ({message})=> {
if (AutoloadImagesStore.shouldBlockImagesIn(message)) {
message.body = message.body.replace(AutoloadImagesStore.ImagesRegexp, (match, prefix)=> {
return `${prefix}#`;
});
}
}
}