AgebypassX

Age/sensitive-media bypass for X.com via initial-state and JSON feature-switch patching (Alt+. toggles the dot indicator; click it for diagnostics)

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

Upphovsman
Saganaki22
Dagliga installationer
55
Totala installationer
7 429
Betyg
12 1 5
Version
2.4.0
Skapad
2025-08-25
Uppdaterad
2026-08-17
Size
23,4 KB
Licens
MIT
Gäller för

🛡️ AgebypassX v2.4.0

A lightweight userscript for X/Twitter which modifies client-side age-verification and sensitive-media feature state directly in the browser.

AgebypassX runs locally and uses multiple application-state interception paths:

  • window.__INITIAL_STATE__
  • Object.assign
  • JSON.parse
  • Response.prototype.json

v2.4.0 does not use webpack interception. The current implementation works by patching application state and parsed response data before X's frontend consumes it.


🚀 Installation

  1. Install Tampermonkey, Violentmonkey, or another compatible userscript manager.
  2. Install AgebypassX.
  3. Open or reload X/Twitter.
  4. A small green status dot should appear in the top-right corner.

The script runs at:

document-start

so its hooks are installed as early as possible.

Press:

Alt + .

to show or hide the status dot.

The visibility preference is stored locally using localStorage.


🔒 Privacy

AgebypassX operates entirely inside your browser.

The script:

  • Does not send browsing data anywhere.
  • Does not contact external APIs.
  • Does not contain analytics.
  • Does not contain telemetry.
  • Does not contain advertisements.
  • Does not modify authentication cookies.
  • Does not directly modify your X/Twitter account.
  • Stores only the indicator visibility preference in localStorage.

There are no external connections required by the userscript.


⚙️ Targeted Feature State

v2.4.0 currently watches for:

rweb_age_assurance_flow_enabled
age_verification_gate_enabled
sensitive_tweet_warnings_enabled
sensitive_media_settings_enabled
grok_settings_age_restriction_enabled
rweb_mvr_blurred_media_interstitial_enabled

Desired states:

{
    rweb_age_assurance_flow_enabled: false,
    age_verification_gate_enabled: false,
    sensitive_tweet_warnings_enabled: false,
    sensitive_media_settings_enabled: true,
    grok_settings_age_restriction_enabled: false,
    rweb_mvr_blurred_media_interstitial_enabled: false
}

The patcher supports several feature formats, including:

{
    feature_name: true
}

wrapped values:

{
    feature_name: {
        value: true
    }
}

and GraphQL-style entries:

{
    feature: "feature_name",
    enabled: true
}

✅ Type-Preserving & Verified Writes

X can represent feature-switch values using different types.

For example:

true
"true"
1

AgebypassX v2.4.0 preserves the existing representation:

boolean → boolean
string  → "true" / "false"
number  → 1 / 0

After changing a target value, the script reads it back to verify that the write actually succeeded.

This detects cases such as:

  • Frozen objects.
  • Non-writable properties.
  • Throwing setters.
  • Setters which silently discard the value.
  • Read-back mismatches.

🎂 Birthdate Handling

Compatible client-side birthdate objects are patched to:

{
    year: 1990,
    month: 1,
    day: 1
}

Birthdate writes are also type-preserving and verified.

Examples:

1995   → 1990
"1995" → "1990"

Birthdate processing has its own diagnostic counters.


🧩 How It Works

1. window.__INITIAL_STATE__

AgebypassX intercepts X's initial application state and patches relevant values before the frontend consumes them.

v2.4.0 also handles late userscript injection.

If window.__INITIAL_STATE__ already exists when AgebypassX starts, the existing state is preserved and patched before the accessor is installed.

If the existing property cannot safely be read, AgebypassX leaves it untouched rather than risking state corruption.

The remaining hooks continue working as fallbacks.


2. Object.assign

AgebypassX wraps:

Object.assign

and checks state-like objects containing structures such as:

featureSwitch
entities
users

Relevant targets are patched after the native assignment completes.


3. JSON.parse

AgebypassX wraps:

JSON.parse

Before performing a recursive walk, the raw JSON text is checked for:

  • Known target feature names.
  • birthdate
  • featureSwitch

Unrelated JSON is returned without a deep scan.


4. Response.prototype.json

Fetch responses parsed using:

response.json()

can bypass an overridden JSON.parse.

AgebypassX therefore also wraps:

Response.prototype.json

Returned objects first go through a lightweight structural scan.

Only potentially relevant responses are passed to the full patcher.


⚡ Performance

AgebypassX is event-driven.

It does not use:

  • Continuous polling.
  • Scroll listeners.
  • Repeating patch timers.
  • Per-tweet loops.
  • Webpack module rewriting.

Recursive patching only occurs after one of the interception gates detects potentially relevant state.

Each patch operation uses its own WeakSet for circular-reference protection.

This also allows the same state object to be patched again later during SPA navigation if X modifies or repopulates it.


🟢 Status Indicator

A small dot appears in the top-right corner.

🟢 ACTIVE

The interception/traversal system is currently operating without a detected hook or traversal error.

🔴 ERROR

A hook installation or recursive traversal operation encountered an error.

Check DevTools Console for:

[Nox]

Important

The status dot represents hook/traversal health.

Individual target-feature write failures are tracked separately in diagnostics.

This means the indicator can remain green while diagnostics show that a specific feature was found but could not be modified.


📊 Diagnostics

Click the status dot to print diagnostics to the browser console.

v2.4.0 reports:

Current ACTIVE / ERROR status
Historical error count
Gate-hit counts
Flags found
Flags changed
Flag process/write failures
Birthdate statistics
Potential related keys
Recent errors

Gate Hits

The script tracks activity from:

state
assign
parse
json

which correspond to:

__INITIAL_STATE__
Object.assign
JSON.parse
Response.json

🎯 Reading Feature Diagnostics

Each known flag has three counters:

found
changed
writeFailed

Working normally

found > 0
changed > 0
writeFailed = 0

The flag was found and successfully changed.

Already correct

found > 0
changed = 0
writeFailed = 0

The flag was found but already had the desired value.

Processing/write problem

found > 0
writeFailed > 0

The flag was encountered, but one or more accesses/writes could not be completed or verified.

Not encountered

found = 0

This is a warning signal, not proof that the flag was removed.

Possible reasons include:

  • Feature rename.
  • Regional differences.
  • Account experiments.
  • Different X configuration.
  • Relevant endpoint not loaded.
  • Feature removed.
  • Configuration moved elsewhere.

🔎 Related-Key Detection

AgebypassX includes a lightweight diagnostic scanner for potentially related keys containing terms such as:

age
birth
minor
sensitive
blur
restrict
verif
interstitial

Potential matches are reported as diagnostic candidates only.

They are not automatically treated as real feature flags.

The scanner only runs inside state that was already reached through a known interception gate, so it cannot guarantee detection of completely renamed structures.


🎂 Birthdate Diagnostics

The diagnostics also report:

birthdate.seen
birthdate.changed
birthdate.failed

seen

Compatible birthdate objects encountered.

changed

Birthdate fields successfully changed and verified.

failed

Birthdate field writes which threw or failed read-back verification.


⌨️ Indicator Hotkey

Press:

Alt + .

to toggle the status indicator.

The preference persists locally across reloads.


🛠️ Troubleshooting

No status dot

Try:

  • Press Alt + .
  • Confirm your userscript manager is enabled.
  • Confirm AgebypassX is enabled.
  • Confirm it has permission to run on:
https://x.com/*
https://twitter.com/*
  • Reload X.

No console messages

Open:

F12 → Console

Search for:

[Nox]

Normal startup messages include:

[Nox] v2.4.0 loaded
[Nox] ready — click the dot for diagnostics

If no messages appear, the userscript is probably not executing.


Red indicator

Check the console for messages such as:

[Nox] Existing state capture failed
[Nox] __INITIAL_STATE__ hook failed
[Nox] State patch failed
[Nox] Object.assign patch failed
[Nox] JSON.parse patch failed
[Nox] Response.json hook failed
[Nox] walk failed

Click the indicator to display the stored diagnostics.


Green indicator but behaviour has not changed

A green indicator means the interception/traversal system is operating.

It does not guarantee that X still uses the same feature names or client-side enforcement.

Click the dot and inspect:

flags found
flags changed
flag process/write failures
birthdate
gate hits

X may have changed:

  • Feature names.
  • Response formats.
  • Experiments.
  • Regional behaviour.
  • State locations.
  • Client-side enforcement.
  • Server-side enforcement.

🌐 Browser Compatibility

AgebypassX is primarily tested on Chromium-based browsers, including:

  • Google Chrome
  • Chromium
  • Microsoft Edge
  • Brave

Tampermonkey and Violentmonkey-compatible environments should generally work, although behaviour may vary between userscript managers.


🐛 Reporting Issues

GitHub:

https://github.com/Saganaki22/AgebypassX/issues

When reporting an issue, please include:

  • Browser and version.
  • Userscript manager and version.
  • AgebypassX version.
  • Status dot state.
  • gate hits.
  • flags found.
  • flags changed.
  • flag process/write failures.
  • Birthdate diagnostics if relevant.
  • Related-key diagnostics if present.
  • Relevant [Nox] errors.
  • Steps to reproduce the problem.

Please remove personal information from screenshots or console output before posting it publicly.


🧑‍💻 Source

GitHub:

https://github.com/Saganaki22/AgebypassX

AgebypassX is open source and licensed under the MIT License.


🔄 What's New in v2.4.0

✅ Type-Preserving Feature Writes

Feature values now preserve their original boolean/string/number representation.

✅ Verified Writes

Assignments are read back after modification to confirm that the new value actually stuck.

📊 Detailed Diagnostics

Added counters for:

found
changed
writeFailed

for every target flag.

🎂 Improved Birthdate Patching

Birthdate values now use type-preserving, verified writes with independent:

seen
changed
failed

counters.

🧠 Improved Status Tracking

The indicator now represents hook/traversal health separately from individual feature-write outcomes.

Unrelated page activity can no longer falsely clear an error state.

🔁 Traversal Failure Propagation

Internal traversal errors now propagate back to the hook which triggered the patch.

🔎 Related-Key Diagnostics

Potential age/sensitive-media-related keys encountered near known state structures are reported for debugging.

🛡️ Safer __INITIAL_STATE__ Hook

AgebypassX now safely handles cases where X populated window.__INITIAL_STATE__ before the userscript started.

Existing state is preserved and patched rather than overwritten.

If the property cannot safely be captured, it is left untouched and fallback hooks continue operating.

🧹 Architecture Cleanup

Current releases use application-state and parsed-response interception.

Webpack interception is not used or required by v2.4.0.


⚠️ Disclaimer

AgebypassX is an independent open-source project and is not affiliated with, endorsed by, or associated with X Corp., Twitter, Tampermonkey, or Violentmonkey.

The project modifies client-side application state only.

X may change its frontend, feature flags, experiments, response structures, or introduce additional server-side enforcement at any time, which may cause some or all functionality to stop working.

Use the software at your own discretion and comply with the laws, platform rules, and age requirements applicable to you.