<commit_before><div class="welcome-text <%= @touch? 'touch' : 'desktop' %>">
  <h1>
    <%= first_word @topic.title %>
    <%= trailing_words @topic.title %>
  </h1>
  <div class="button-right">
    <% if signed_in? %>
        <%= link_to I18n.t("crud_links.edit"), edit_topic_path(@topic), :class => 'btn btn-success' %>
    <% end %>
  </div>
  <div class="right-image">
    <%
      if (!@topic.nil? && !@topic.avatar.nil? && !@topic.avatar.avatar_img.nil?)
        concat image_tag(@topic.avatar.avatar_img.url(:medium))
      end
    %>
  </div>
  <div><p><%= raw @topic.content %></p></div>
  <% if @topic.references.any? %>
  <div class="ref-list">
    <div class="reference-head">
      <h4><%= I18n.t('topics.show.references') %></h4>
    </div>
    <ul class="topic-references">
      <% @topic.references.each_with_index do |ref,i| %>
      <li <% if ref.is_dead_link %>class="dead-link"<% end %>>
        <%= link_to image_tag( ref.reference_type.nil? ? "rt-ukjent-icon.png" : ref.reference_type.icon, :height => 16, :title => ref.title,  :alt => ref.reference_type.try(:name)), ref.url %>
        <%= link_to !ref.title.blank? ? ref.title : ref.url, ref.url,
            :onclick => "window.open(this.href, 'referencewin', 'left=40,top=40,width=1100,height=960,toolbar=1,resizable=1'); return false;",
            :alt => ref.url,
            :title => "#{ref.creator}, #{ref.lang}, #{ref.year},, #{ref.snippet}",
            :style => "color: rgb(53, 166, 65);" %>
         <%= "(#{ref.creator}, #{ref.year})" if ref.creator %>
        </li>
      <% end %>
    </ul>
    <div class='clear'></div>
    <div style="margin: 10px 0 0;">
      <span>
        <strong><%= I18n.t("topics.show.updated", :default => "Last updated:") %></strong>
        <%= @topic.updated_at.strftime('%F %H:%M') %>
      </span>
    </div>
  </div>
  <% end %>
<form accept-charset="UTF-8" action="/topics/" class="edit_topic" id="lat_topic_frm" method="post">
  <input id="lat_hidden" name="lat" type="hidden" value="">
  <input id="lng_hidden" name="lng" type="hidden" value="">
</form>

<% unless @touch %>
<div id="topics-locations">
  <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDKN-34cs1baWHGc8qPX0CKEKCQDasyWFE&callback=mapLoad"></script>
  <script src="//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js" type="text/javascript"></script>

  <script>
    function mapLoad() {
      Gmaps4HistVest.map = new Gmaps4HistVest();
      Gmaps4HistVest.map.initialize();
      $.getJSON('/topics/<%= @topic.id %>/locations.json', function(data) {
        Gmaps4HistVest.map.markers = data;
        Gmaps4HistVest.map.set_zoom(12);
        Gmaps4HistVest.map.create_markers('mouseover');
        Gmaps4HistVest.map.adjust_to_bounds_of_related_locations();
        Gmaps4HistVest.map.clusterize();
      });
    }
  </script>

  <div class="map_container">
    <div id="map" style="position: relative; background-color: rgb(229, 227, 223); overflow: hidden; -webkit-transform: translateZ(0);"></div>
  </div>
</div>
<% end %>

  <div class="admin-table">
    <h4><%= I18n.t("comments.comments") %></h4>
    <div class="social-icon-right">
      <%= render "/shared/shared_buttons", :share_url => (request.url || "histvest.no").gsub("touch.","") %>
    </div>
    <div id="disqus_thread"></div>
    <% unless request.xhr? %>
    <script type="text/javascript">
      /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
      var disqus_shortname = 'historiskevestfold'; // required: replace example with your forum shortname
      /* * * DON'T EDIT BELOW THIS LINE * * */
      (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';<commit_msg>Order of loading map library on topic details page<commit_after><div class="welcome-text <%= @touch? 'touch' : 'desktop' %>">
  <h1>
    <%= first_word @topic.title %>
    <%= trailing_words @topic.title %>
  </h1>
  <div class="button-right">
    <% if signed_in? %>
        <%= link_to I18n.t("crud_links.edit"), edit_topic_path(@topic), :class => 'btn btn-success' %>
    <% end %>
  </div>
  <div class="right-image">
    <%
      if (!@topic.nil? && !@topic.avatar.nil? && !@topic.avatar.avatar_img.nil?)
        concat image_tag(@topic.avatar.avatar_img.url(:medium))
      end
    %>
  </div>
  <div><p><%= raw @topic.content %></p></div>
  <% if @topic.references.any? %>
  <div class="ref-list">
    <div class="reference-head">
      <h4><%= I18n.t('topics.show.references') %></h4>
    </div>
    <ul class="topic-references">
      <% @topic.references.each_with_index do |ref,i| %>
      <li <% if ref.is_dead_link %>class="dead-link"<% end %>>
        <%= link_to image_tag( ref.reference_type.nil? ? "rt-ukjent-icon.png" : ref.reference_type.icon, :height => 16, :title => ref.title,  :alt => ref.reference_type.try(:name)), ref.url %>
        <%= link_to !ref.title.blank? ? ref.title : ref.url, ref.url,
            :onclick => "window.open(this.href, 'referencewin', 'left=40,top=40,width=1100,height=960,toolbar=1,resizable=1'); return false;",
            :alt => ref.url,
            :title => "#{ref.creator}, #{ref.lang}, #{ref.year},, #{ref.snippet}",
            :style => "color: rgb(53, 166, 65);" %>
         <%= "(#{ref.creator}, #{ref.year})" if ref.creator %>
        </li>
      <% end %>
    </ul>
    <div class='clear'></div>
    <div style="margin: 10px 0 0;">
      <span>
        <strong><%= I18n.t("topics.show.updated", :default => "Last updated:") %></strong>
        <%= @topic.updated_at.strftime('%F %H:%M') %>
      </span>
    </div>
  </div>
  <% end %>
<form accept-charset="UTF-8" action="/topics/" class="edit_topic" id="lat_topic_frm" method="post">
  <input id="lat_hidden" name="lat" type="hidden" value="">
  <input id="lng_hidden" name="lng" type="hidden" value="">
</form>

<% unless @touch %>
<div id="topics-locations">
  <script>
    function mapLoad() {
      Gmaps4HistVest.map = new Gmaps4HistVest();
      Gmaps4HistVest.map.initialize();
      $.getJSON('/topics/<%= @topic.id %>/locations.json', function(data) {
        Gmaps4HistVest.map.markers = data;
        Gmaps4HistVest.map.set_zoom(12);
        Gmaps4HistVest.map.create_markers('mouseover');
        Gmaps4HistVest.map.adjust_to_bounds_of_related_locations();
        Gmaps4HistVest.map.clusterize();
      });
    }
  </script>
  <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDKN-34cs1baWHGc8qPX0CKEKCQDasyWFE&callback=mapLoad"></script>
  <script src="//google-maps-utility-library-v3.googlecode.com/svn/tags/markerclustererplus/2.0.14/src/markerclusterer_packed.js" type="text/javascript"></script>
  <div class="map_container">
    <div id="map" style="position: relative; background-color: rgb(229, 227, 223); overflow: hidden; -webkit-transform: translateZ(0);"></div>
  </div>
</div>
<% end %>

  <div class="admin-table">
    <h4><%= I18n.t("comments.comments") %></h4>
    <div class="social-icon-right">
      <%= render "/shared/shared_buttons", :share_url => (request.url || "histvest.no").gsub("touch.","") %>
    </div>
    <div id="disqus_thread"></div>
    <% unless request.xhr? %>
    <script type="text/javascript">
      /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
      var disqus_shortname = 'historiskevestfold'; // required: replace example with your forum shortname
      /* * * DON'T EDIT BELOW THIS LINE * * */
      (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
{'fraction_non_alphanumeric': 0.2065063649222065, 'fraction_numerical': 0.018258968754018258, 'mean_word_length': 3.3525461667599328, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 181, 'https://': 2, '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': '3371941', 'n_tokens_mistral': 3001, 'n_tokens_neox': 2802, 'n_words': 475}