From 6cb6f277fa339d1379f9aa29ef651daab89c7742 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Tue, 1 Jul 2014 22:44:43 +0200 Subject: [PATCH] Support selecting a theme when embedding --- app/views/api/asciicasts/show.js.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/api/asciicasts/show.js.erb b/app/views/api/asciicasts/show.js.erb index c7e5aff..21272e5 100644 --- a/app/views/api/asciicasts/show.js.erb +++ b/app/views/api/asciicasts/show.js.erb @@ -35,6 +35,10 @@ if (autoplay === '1') { params = params.concat(['autoplay=' + autoplay]); } + var theme = script.getAttribute('data-theme'); + if (theme) { + params = params.concat(['theme=' + theme]); + } return '?' + params.join('&'); }