fossasia/loklak_webclient

View on GitHub
iframely/plugins/links/promo/cloudapp-hosted.js

Summary

Maintainability
A
1 hr
Test Coverage
module.exports = {

    getLink: function(twitter) {

        if (twitter.card === "photo" && twitter.site === '@cloudapp' 
            && twitter.image && /^https?:\/\/f\.cl\.ly\//.test(twitter.image.url || twitter.image.src || twitter.image))  {

            return {
                href: twitter.image.url || twitter.image.src || twitter.image,
                type: CONFIG.T.image,
                rel: CONFIG.R.image
            };
        }

    }
};