fossasia/loklak_webclient

View on GitHub
iframely/plugins/domains/vox.com/vox.cards.js

Summary

Maintainability
A
0 mins
Test Coverage
module.exports = {

    re: /^https?:\/\/www\.vox\.com\/cards\/([a-z0-9\-]+)/i,

    mixins: [
        "*"
    ],

    getLink: function(urlMatch) {
            
            return {
                template_context: {
                    slug: urlMatch[1]
                },
                type: CONFIG.T.text_html,
                rel: [CONFIG.R.app, CONFIG.R.ssl]
        }
    },

    tests: [
        "http://www.vox.com/cards/iowa-caucus-2016-polls"
    ]
};