<commit_before>// ==UserScript==
// @name        Steam Force Language
// @namespace   localhost
// @description Forces language to English on Steam
// @include     http://store.steampowered.com/*?l=french
// @include     http://store.steampowered.com/*?l=french#*
// @include     https://store.steampowered.com/*?l=french
// @include     https://store.steampowered.com/*?l=french#*
// @include     http://steamcommunity.com/*?l=french
// @include     http://steamcommunity.com/*?l=french#*
// @include     https://steamcommunity.com/*?l=french
// @include     https://steamcommunity.com/*?l=french#*
// @version     1
// @grant       none
// ==/UserScript==

var langs = document.getElementById("language_dropdown").children[0].children;

if(langs.length == 0)
    langs = document.querySelector("#language_dropdown .popup_body").children;

for(var i = 0; i < langs.length; i++)
{
    var lang = langs[i];
    if(lang.href.indexOf("english") != -1)
    {
        lang.click();
        break;
    }
}<commit_msg>SteamForceLang: changed clicking to directly modifying current location<commit_after>// ==UserScript==
// @name        Steam Force Language
// @namespace   localhost
// @description Forces language to English on Steam
// @include     http://store.steampowered.com/*?l=french
// @include     http://store.steampowered.com/*?l=french#*
// @include     https://store.steampowered.com/*?l=french
// @include     https://store.steampowered.com/*?l=french#*
// @include     http://steamcommunity.com/*?l=french
// @include     http://steamcommunity.com/*?l=french#*
// @include     https://steamcommunity.com/*?l=french
// @include     https://steamcommunity.com/*?l=french#*
// @version     1
// @grant       none
// ==/UserScript==

var langs = document.getElementById("language_dropdown").children[0].children;

if(langs.length == 0)
    langs = document.querySelector("#language_dropdown .popup_body").children;

for(var i = 0; i < langs.length; i++)
{
    var lang = langs[i];
    if(lang.href.indexOf("english") != -1)
    {
        window.location.href = lang.href;
        break;
    }
}
{'fraction_non_alphanumeric': 0.1819047619047619, 'fraction_numerical': 0.004761904761904762, 'mean_word_length': 3.103515625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '5740921', 'n_tokens_mistral': 705, 'n_tokens_neox': 690, 'n_words': 122}