app/assets/javascripts/kf5.turbolinks.js in kf5-0.3.3 vs app/assets/javascripts/kf5.turbolinks.js in kf5-0.4.0

- old
+ new

@@ -1,15 +1,16 @@ -;(function($, undefined) { +(function ($) { var widgets = $(); $(document).on('page:before-unload', function store() { - if(!widgets.length) { + if (!widgets.length) { widgets = $('#kf5-support-123456789'); - if(widgets.length) { + if (widgets.length) { widgets = $([widgets[0], widgets.prev()[0], widgets.prev().prev()[0]]); } } }); + $(document).on('page:load', function (argument) { $('body').append(widgets); }); })(jQuery);