Remove restriction of steam workshop

Unlock adult content of steam for Chinese region users

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        Remove restriction of steam workshop
// @name:zh-CN 移除steam创作工坊限制
// @description Unlock adult content of steam for Chinese region users
// @description:zh-CN 解除steam国区创作工坊内容限制
// @match       https://store.steampowered.com/account/preferences*
// @version     1.0.2
// @author      mokurin000
// @license MIT
// @namespace https://greasyfork.org/users/295326
// ==/UserScript==

window.addEventListener('load', () => {
  // Locate hidden div block of secret control
  const hidden_divs = document.querySelectorAll("div.account_setting_not_customer_facing");
  
  // Make them visible, optional
  for (let div of hidden_divs) {
    div.setAttribute("class", "preference_row");
  }
  
  // Actually enable settings
  for (let id of [4, 3]) {
    for (let suffix of ["store", "community"]) {
      const selector = `input#descriptor_${id}_${suffix}`;
      document.querySelector(selector).click();
    }
  }
}, false);