<commit_before><header id="flinders-sticky">
    <div>
        <%= image_tag "flinders.png", { :class => "logo" } %>
        <h1>Welcome to <%= @building.name %> <small>(<%= @building.code %>)</small> <small>(<%= @term_date.week %>)</small></h1>
    </div>
</header>

<div id="slider" class="flexslider">
    <ul class="slides container-fluid">
      <li id="bookings-slide" class="slide slide-live" data-url="<%= url_for :controller => 'signage', :action =>  'bookings', :id => @building.id %>"></li>
      <li id="news-slide" class="slide slide-live" data-url="<%= url_for :controller => 'signage', :action =>  'news', :id => @building.id %>"></li>
      <li id="tonsley-feed-slide" class="slide"><%= render 'signage/tonsley_feed' %></li>
    </ul>
</div>

<script>
    $.fn.refresh = function() { this.load(this.data('url')); }

    $(document).ready(function() {
        function updateLiveSlides(){
            $('.slide-live').refresh()
        }

        updateLiveSlides();

        $('#slider').flexslider({
            animation: "fade",
            controlNav: false,
            slideshowSpeed: 10000,
            directionNav: false,
            end: function() {
                updateLiveSlides()
            }
        });
    });
</script><commit_msg>Fixed bug in JS caused by carelessness in a previous commit. Bug meant that .refresh was called on both slide-lives using Booking's data-url<commit_after><header id="flinders-sticky">
    <div>
        <%= image_tag "flinders.png", { :class => "logo" } %>
        <h1>Welcome to <%= @building.name %> <small>(<%= @building.code %>)</small> <small>(<%= @term_date.week %>)</small></h1>
    </div>
</header>

<div id="slider" class="flexslider">
    <ul class="slides container-fluid">
      <li id="bookings-slide" class="slide slide-live" data-url="<%= url_for :controller => 'signage', :action =>  'bookings', :id => @building.id %>"></li>
      <li id="news-slide" class="slide slide-live" data-url="<%= url_for :controller => 'signage', :action =>  'news', :id => @building.id %>"></li>
      <li id="tonsley-feed-slide" class="slide"><%= render 'signage/tonsley_feed' %></li>
    </ul>
</div>

<script>
    $.fn.refresh = function() {
        this.load(this.data('url'));
    }

    $(document).ready(function() {
        function updateLiveSlides(){
            $('.slide-live').each(function() {
                $(this).refresh();
            });
        }

        updateLiveSlides();

        $('#slider').flexslider({
            animation: "fade",
            controlNav: false,
            slideshowSpeed: 10000,
            directionNav: false,
            end: function() {
                updateLiveSlides()
            }
        });
    });
</script>
{'fraction_non_alphanumeric': 0.20461200585651537, 'fraction_numerical': 0.005124450951683748, 'mean_word_length': 2.5725490196078433, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2206686', 'n_tokens_mistral': 899, 'n_tokens_neox': 848, 'n_words': 182}