stevenspiel
stevenspiel

Reputation: 5999

add parameter to javascript

I need to add a color parameter to this javascript (full script here)

Color should be dd4c23

        vimeo : {
            matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
            params  : {
                autoplay      : 1,
                hd            : 1,
                show_title    : 1,
                show_byline   : 1,
                show_portrait : 0,
                fullscreen    : 1
            },
            type : 'iframe',
            url  : '//player.vimeo.com/video/$1'
        },

Right now the output link is

http://player.vimeo.com/video/65191942?autoplay=1&hd=1&show_title=1&show_byline=1&show_portrait=0&fullscreen=1 

and all it needs is a &color=dd4c23 at the end to make it work.

It would be global, so I don't mind adding the color to the javascript.

(link to website)

Upvotes: 0

Views: 198

Answers (1)

employee-0
employee-0

Reputation: 1041

This should do it:

vimeo : {
    matcher : /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/,
    params  : {
        autoplay      : 1,
        hd            : 1,
        show_title    : 1,
        show_byline   : 1,
        show_portrait : 0,
        fullscreen    : 1,
        color:        : 'dd4c23'
    },
    type : 'iframe',
    url  : '//player.vimeo.com/video/$1'
},

Upvotes: 1

Related Questions