Commit 37ff6ea7 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

defer script loading

parent 178d8322
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -919,6 +919,7 @@ sub handle_request {
			hide_opts        => $hide_opts,
			hide_low_delay   => $hide_low_delay,
			show_realtime    => $show_realtime,
			load_marquee     => ($template eq 'single' or $template eq 'multi'),
		);
	}
	return;
+8 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
% if ($force_mobile == 1 or ($self->browser->mobile and $force_mobile != 0)) {
	%= stylesheet '/static/mobile.css'
% }
	%if (stash('load_marquee')) {
	%= javascript '/static/jquery-1.10.2.min.js'
	%= javascript '/static/jquery-ui.min.js'
	%= javascript '/static/autocomplete.js'
@@ -23,8 +24,14 @@
	%= javascript begin
	$(function () {  $('marquee').marquee() });
	% end
	% } else {
	%= javascript '/static/jquery-1.10.2.min.js', defer => undef
	%= javascript '/static/jquery-ui.min.js', defer => undef
	%= javascript '/static/autocomplete.js', defer => undef
	%= javascript '/static/collapse.js', defer => undef
	% }
	% if (stash('with_geolocation')) {
	%= javascript '/static/geolocation.js'
	%= javascript '/static/geolocation.js', defer => undef
	% }
</head>
<body style="<%= (stash('hide_opts') ? 'margin: 0; padding: 0;' : q{}) %>