fossasia/loklak_webclient

View on GitHub
iframely/plugins/domains/dailymail.co.uk/dailymail.galleryvideo.js

Summary

Maintainability
A
0 mins
Test Coverage
module.exports = {

    re: [        
        /https?:\/\/www\.dailymail\.co\.uk\/video\/\w+\/video\-(\d+)\//i
    ],

    provides: 'dailymailVideoID',

    mixins: ['*'],

    getData: function(urlMatch, og) {

        if (og.video && og.video.url && /_(\d+)\.mp4$/i.test(og.video.url)) {
            return {
                dailymailVideoID: 'v-' + og.video.url.match(/_(\d+)\.mp4$/i)[1]
            }
        }
    },    

    tests: [
        "http://www.dailymail.co.uk/video/news/video-1284607/Heart-rending-scenes-child-marriage-ceremonies-India.html"
    ]
};