diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep
index cc0c816..3fb2202 100644
--- a/templates/default/join.html.ep
+++ b/templates/default/join.html.ep
@@ -353,7 +353,6 @@
%= include 'js_common'
-%= include 'js_room'
- <% my @js = qw(js/jquery-1.11.2.js js/bootstrap.js js/notify-combined.js js/bootstrap-switch.js js/jquery.bootpag.js js/toc.js js/vroom.js); %>
+ <%
+ my @js = qw(js/jquery-1.11.2.js js/bootstrap.js js/notify-combined.js js/bootstrap-switch.js js/jquery.bootpag.js js/toc.js js/vroom.js);
+ if (stash('page') && stash('page') eq 'room'){
+ push @js, qw(js/simplewebrtc.bundle.js js/jquery.browser.js js/sprintf.js js/FileSaver.js js/jquery.tinytimer.js js/etherpad.js);
+ }
+ %>
<%=js @js %>
diff --git a/templates/default/js_room.html.ep b/templates/default/js_room.html.ep
deleted file mode 100644
index 97bcc66..0000000
--- a/templates/default/js_room.html.ep
+++ /dev/null
@@ -1,2 +0,0 @@
- <% my @js = qw(js/simplewebrtc.bundle.js js/jquery.browser.js js/sprintf.js js/FileSaver.js js/jquery.tinytimer.js js/etherpad.js); %>
- <%=js @js %>
diff --git a/vroom.pl b/vroom.pl
index 60c2bee..29cba6c 100755
--- a/vroom.pl
+++ b/vroom.pl
@@ -2080,6 +2080,7 @@ get '/:room' => sub {
}
# Now display the room page
return $self->render('join',
+ page => 'room',
moh => $self->choose_moh(),
video => $video,
etherpad => ($ec) ? 'true' : 'false',