From e5aa5833fd114c1773a5d9bccfa7ae467dad4004 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Thu, 21 Apr 2016 16:44:43 +0200 Subject: [PATCH] Don't preload embeds by default --- app/assets/javascripts/widget.js | 2 +- app/presenters/bare_asciicast_page_presenter.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/widget.js b/app/assets/javascripts/widget.js index 93db347..b400765 100644 --- a/app/assets/javascripts/widget.js +++ b/app/assets/javascripts/widget.js @@ -13,7 +13,7 @@ } } - var options = ['size', 'speed', 'autoplay', 'loop', 'theme', 't']; + var options = ['size', 'speed', 'autoplay', 'loop', 'theme', 't', 'preload']; return '?' + options.map(format).filter(Boolean).join('&'); } diff --git a/app/presenters/bare_asciicast_page_presenter.rb b/app/presenters/bare_asciicast_page_presenter.rb index 330ed00..1b6236a 100644 --- a/app/presenters/bare_asciicast_page_presenter.rb +++ b/app/presenters/bare_asciicast_page_presenter.rb @@ -6,7 +6,8 @@ class BareAsciicastPagePresenter decorated_asciicast = asciicast.decorate playback_options = { - 'theme' => decorated_asciicast.theme_name + 'theme' => decorated_asciicast.theme_name, + 'preload' => false }.merge(playback_options) new(decorated_asciicast, EmbedPlaybackOptions.new(playback_options))