<commit_before>define(['jquery', '/bower/webmaker-ui/ui.js', 'sso-ux'],
  function ($, WebmakerUI, localized) {
    "use strict";
    var lang = $('html').attr('lang');

    navigator.idSSO.app.onlogin = function (user) {
      if (document.referrer.indexOf('events') !== -1) {
        window.location = "/" + lang + "/events";
      } else {
        window.location = "/" + lang;
      }
    };
    navigator.idSSO.app.onnewuser = function () {
      window.location = "/" + lang + "/new";
    };

    var langSelector = document.querySelector("#lang-picker");
    // URL redirector for language picker
    WebmakerUI.langPicker(langSelector);
  });<commit_msg>Fix bug 914333: Login URL memory - Redirect user back to page they where at after before clicking like button<commit_after>define(['jquery', '/bower/webmaker-ui/ui.js', 'sso-ux'],
  function ($, WebmakerUI, localized) {
    "use strict";
    var lang = $('html').attr('lang');

    navigator.idSSO.app.onlogin = function (user) {
      var rdomain = document.referrer.split("\/")[2];
      if (rdomain === "webmaker.org" || rdomain === "makes.org") {
        window.location.replace(document.referrer);
      } else {
        window.location = "/" + lang;
      }
    };
    navigator.idSSO.app.onnewuser = function () {
      window.location = "/" + lang + "/new";
    };

    var langSelector = document.querySelector("#lang-picker");
    // URL redirector for language picker
    WebmakerUI.langPicker(langSelector);
  });
{'fraction_non_alphanumeric': 0.17417619367854742, 'fraction_numerical': 0.005379959650302623, 'mean_word_length': 2.875, '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': '4476657', 'n_tokens_mistral': 475, 'n_tokens_neox': 473, 'n_words': 95}