X (Twitter) Age Verification Bypass

No more age verification needed!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         X (Twitter) Age Verification Bypass
// @namespace    http://tampermonkey.net
// @version      1.0
// @description  No more age verification needed!
// @author       LucsDude
// @match        https://x.com*
// @match        https://twitter.com*
// @icon         https://google.com
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function () {
  'use strict';

  let value;
  Object.defineProperty(window, '__INITIAL_STATE__', {
    configurable: true,
    enumerable: true,
    set(newValue) {
      try {
        // Disables the age assurance/verification feature switch
        if (newValue && newValue.featureSwitch && newValue.featureSwitch.customOverrides) {
          newValue.featureSwitch.customOverrides['rweb_age_assurance_flow_enabled'] = false;
        }
      } catch (e) {
        console.error("Failed to bypass age assurance:", e);
      }
      value = newValue;
    },
    get() {
      return value;
    }
  });
})();