<commit_before>requirejs.config({
  baseUrl: '/js',
  paths: {
    'jquery': '../bower_components/jquery/jquery',
    'social': '../js/lib/socialmedia',
    'localized': '../bower_components/webmaker-i18n/localized',
    'webmaker-auth-client': '../bower_components/webmaker-auth-client/dist/webmaker-auth-client.min',
  }
});
define(['jquery', 'social', 'localized', 'webmaker-auth-client'],
  function ($, SocialMedia, localized, WebmakerAuth) {
    localized.ready(function () {
      var social,
        $body = $("body"),
        $shareBtn = $("#share-btn"),
        $shareContainer = $("#share-container"),
        $likeBtn = $(".make-like-toggle"),
        $likeCount = $(".like-count"),
        $likeText = $(".like-text"),
        $likeNotLoggedInMsg = $("#like-not-logged-in"),
        $reportButton = $("#make-report-toggle"),
        $reportedText = $("#make-reported-text"),
        $reportNotLoggedInMsg = $("#report-not-logged-in"),
        $reportError = $("#make-report-error"),
        $makeReportedMsg = $("#make-reported-message"),
        googleBtn = document.getElementById("google-btn"),
        twitterBtn = document.getElementById("twitter-btn"),
        fbBtn = document.getElementById("fb-btn"),
        url = $body.data("url"),
        csrfToken = $("meta[name='csrf-token']").attr("content"),
        webmakerAuth = new WebmakerAuth({
          csrfToken: csrfToken,
          handleNewUserUI: false
        });

      var socialMessage = localized.get('DetailsShareTwitterMsg');
      social = new SocialMedia({
        message: socialMessage,
        via: "webmaker"
      });

      function shareOnClick() {
        social.hotLoad(twitterBtn, social.twitter, url);
        social.hotLoad(googleBtn, social.google, url);
        social.hotLoad(fbBtn, social.facebook, url);
        $shareBtn.addClass("hidden");
        $shareContainer.removeClass("hidden");
        $shareBtn.off("click", shareOnClick);
      }

      $shareBtn.on("click", shareOnClick);

      function openLogInWindow(actionCallback) {
        function onLogin() {
          webmakerAuth.off("login", onLogin);
          webmakerAuth.off("error", onError);
          actionCallback();
        }

        function onError() {
          webmakerAuth.off("login", onLogin);
          webmakerAuth.off("error", onError);
        }
        webmakerAuth.on("login", onLogin);
        webmakerAuth.on("error", onError);
        webmakerAuth.login();
      }

      function displayTooltip($tooltipElem, delay) {
        var timer;

        function hideTooltip(e) {
          window.removeEventListener("click", clickCallback, false);
          window.clearTimeout(timer);
          $tooltipElem.addClass("hide");
        }

        function clickCallback(e) {
          if (e.target === $tooltipElem.find("a")[0]) {
            return true;
          }
          hideTooltip();
        }

        $tooltipElem.removeClass("hide");
        timer = window.setTimeout(hideTooltip, delay);
        window.addEventListener("click", clickCallback);
      }

      // Like event handlers

      function likeRequest() {
        var makeID = $likeBtn.data("make-id"),
          method;

        if ($likeBtn.hasClass("icon-heart")) {
          method = "/unlike";
        } else {
          method = "/like";
        }

        $.post(method, {<commit_msg>Update details.js<commit_after>requirejs.config({
  baseUrl: '/js',
  paths: {
    'jquery': '../bower_components/jquery/jquery',
    'social': '../js/lib/socialmedia',
    'localized': '../bower_components/webmaker-i18n/localized',
    'webmaker-auth-client': '../bower_components/webmaker-auth-client/dist/webmaker-auth-client.min',
  }
});
define(['jquery', 'social', 'localized', 'webmaker-auth-client'],
  function ($, SocialMedia, localized, WebmakerAuth) {
    localized.ready(function () {
      var social,
        $body = $("body"),
        $shareBtn = $("#share-btn"),
        $shareContainer = $("#share-container"),
        $likeBtn = $(".make-like-toggle"),
        $likeCount = $(".like-count"),
        $likeText = $(".like-text"),
        $likeNotLoggedInMsg = $("#like-not-logged-in"),
        $reportButton = $("#make-report-toggle"),
        $reportedText = $("#make-reported-text"),
        $reportNotLoggedInMsg = $("#report-not-logged-in"),
        $reportError = $("#make-report-error"),
        $makeReportedMsg = $("#make-reported-message"),
        googleBtn = document.getElementById("google-btn"),
        twitterBtn = document.getElementById("twitter-btn"),
        fbBtn = document.getElementById("fb-btn"),
        url = $body.data("url"),
        csrfToken = $("meta[name='csrf-token']").attr("content"),
        webmakerAuth = new WebmakerAuth({
          csrfToken: csrfToken,
          handleNewUserUI: false
        });

      var socialMessage = localized.get('DetailsShareTwitterMsg');
      social = new SocialMedia({
        message: socialMessage,
        via: "webmaker"
      });

      function shareOnClick() {
        social.hotLoad(twitterBtn, social.twitter, url);
        social.hotLoad(googleBtn, social.google, url);
        social.hotLoad(fbBtn, social.facebook, url);
        $shareBtn.addClass("hidden");
        $shareContainer.removeClass("hidden");
        $shareBtn.off("click", shareOnClick);
      }

      $shareBtn.on("click", shareOnClick);

      function openLogInWindow(actionCallback) {
        function onLogin() {
          webmakerAuth.off("login", onLogin);
          webmakerAuth.off("error", onError);
          actionCallback();
        }

        function onError() {
          webmakerAuth.off("login", onLogin);
          webmakerAuth.off("error", onError);
        }
        webmakerAuth.on("login", onLogin);
        webmakerAuth.on("error", onError);
        webmakerAuth.login();
      }

      function displayTooltip($tooltipElem, delay) {
        var timer;

        function hideTooltip(e) {
          window.removeEventListener("click", clickCallback);
          window.clearTimeout(timer);
          $tooltipElem.addClass("hide");
        }

        function clickCallback(e) {
          if (e.target === $tooltipElem.find("a")[0]) {
            return true;
          }
          hideTooltip();
        }

        $tooltipElem.removeClass("hide");
        timer = window.setTimeout(hideTooltip, delay);
        window.addEventListener("click", clickCallback);
      }

      // Like event handlers

      function likeRequest() {
        var makeID = $likeBtn.data("make-id"),
          method;

        if ($likeBtn.hasClass("icon-heart")) {
          method = "/unlike";
        } else {
          method = "/like";
        }

        $.post(method, {
{'fraction_non_alphanumeric': 0.16061013907581875, 'fraction_numerical': 0.0008972633467922835, 'mean_word_length': 2.4157303370786516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '210785', 'n_tokens_mistral': 1908, 'n_tokens_neox': 1907, 'n_words': 308}