Vimeo offers plenty of customisation options when embedding its player, but Tumblr’s automated code generator doesn’t respect these, overwriting them with its own defaults. To fix this, I wrote a quick jQuery function to rewrite Tumblr’s default options string for all Vimeo embeds on the current page:
$("object[data^='http://vimeo.com']").each(function() { var vimeoCode = $(this).parent().html(); var defaultOpts = /show_title=1&show_byline=0&show_portrait=0&color=00ADEF/g; var newOpts = "show_title=0&show_byline=0&show_portrait=0&color=55CC55"; vimeoCode = vimeoCode.replace(defaultOpts, newOpts); $(this).parent().html(vimeoCode); });Tweak the
newOptsstring to whatever you prefer — it will work for all embeds except those that have had their options locked by their respective owners. You can see it in action here.Yeah, probably should have tested this in IE. Sigh — will fix.
Another excellent looking Tumblr enhancement by Matthew B.
-
pinkindividu liked this
-
cheap-papers reblogged this from chrisbowler
-
entertech liked this
-
attorney-directory liked this
-
mishagl liked this
-
nutterz13 liked this
-
0049 reblogged this from matthewb
-
designerconfetti liked this
-
jeuxgratos liked this
-
samuelgarcia liked this
-
rileyclem liked this
-
macdiva liked this
-
mkarmstr liked this
-
xionone liked this
-
number13 reblogged this from matthewb
-
firstladypatate liked this
-
thesoftalarm liked this
-
continuum liked this
-
teleute reblogged this from matthewb and added:
IE, gotta love it.
-
chrisbowler reblogged this from matthewb and added:
Another excellent looking Tumblr enhancement
-
matthewb posted this