-
Notifications
You must be signed in to change notification settings - Fork 1
/
Steam_-_Force_language.user.js
32 lines (29 loc) · 1.06 KB
/
Steam_-_Force_language.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// ==UserScript==
// @name Steam - Force language
// @author Tailszefox
// @namespace localhost
// @description Forces language to English on Steam
// @icon https://i.imgur.com/3GYdiAO.png
// @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.0
// @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;
}
}