fossasia/loklak_webclient

View on GitHub
iframely/plugins/domains/jsfiddle.net.js

Summary

Maintainability
A
0 mins
Test Coverage
module.exports = {

    re: /(https?:\/\/jsfiddle.net\/(?:\w+\/)?\w+\/).*/i,

    mixins: [
        "html-title",
        "copyright",
        "description",

        "favicon"
    ],

    getLink: function(urlMatch) {
        return {
            href: urlMatch[1].replace(/^http:\/\//i, '//') + "embedded/",
            type: CONFIG.T.text_html,
            rel: CONFIG.R.app
        };
    },

    tests: [
        "http://jsfiddle.net/pborreli/pJgyu/",
        "http://jsfiddle.net/timwienk/LgJsN/",
        {
            noFeeds: true
        }
    ]
};