X (Twitter) Age Verification Bypass

No more age verification needed!

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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;
    }
  });
})();