Skip to content
プロジェクト

概要

Twitter/X の年齢制限を回避してセンシティブなメディアを閲覧できるようにします(検閲法が厳しい国向け)。

その他のプロジェクト

この数値の測り方

計測したスター増加

24時間
+2
7日間
+3
15日間
+10
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

🛡️ AgebypassX v2.5.1

English | 简体中文

Last updated: December 2, 2026

A lightweight Tampermonkey userscript designed to modify X/Twitter's client-side age and sensitive-media state directly in the browser.

💜 Support future development

If AgebypassX is useful to you, please consider supporting the work that keeps it working. Donations through any of these let me keep maintaining this project:

Really appreciate you all. We are doing this to fight censorship.

What's new in 2.5.1: quoted posts that X withholds

2.5.1 adds one capability that is a different kind of work from everything else in this script, so it is documented on its own. It is on by default; see the opt-out below.

What it tackles

When a post quotes another post and the quoted author is labelled sensitive, X does not send the quoted post in the timeline at all. Where the quote card should be, the payload contains an empty quoted_status_result (or a tombstone), and X's own card reads "This post is unavailable." Opening the quoted post directly still works (the permalink is served normally), so the post exists and your account can see it. X simply withholds it from timelines until you navigate to it yourself.

Users were working around this by clicking every quoted post and going back, which made X's own store fill the card in. The 2.5.0 mechanisms cannot help here, and no passive patch can: there is nothing in the payload to un-label. The data has to be fetched.

Why it is documented on its own

Everything else in AgebypassX is passive. It edits data X already sent and never makes a request of its own. The resolver is active: it asks X's API for the missing post, using your signed-in session. That is a real change in kind: it costs requests against your account, it is the part most exposed to X changing its API, and it is not something every user should be opted into without knowing. Hence this notice, an opt-out, and the limits listed below.

What it does

  1. Detects every quote that arrived withheld (empty result, null, missing field, or a tombstone) and remembers which parent post it belongs to. The notice is replaced at once with a neutral "Loading…" label so the card never looks broken while it resolves.
  2. Learns the request from the page itself. X's current build issues GraphQL over XMLHttpRequest. The resolver watches the page's own calls and records the exact shape of the two queries it needs, TweetResultByRestId and TweetDetail, including the query id and feature set, which X rotates, and the authorisation headers. Nothing about them is hard-coded.
  3. Replays that request with only the tweet id swapped, runs the result through the normal patcher (so any interstitial or blur on the fetched post is cleared like everywhere else), and renders a card where the notice was. If the first query comes back empty it falls back to TweetDetail (the request X itself makes when you click through), which is what tells a withheld post apart from a deleted one.
  4. Remembers the result across reloads (one day, up to 150 posts, only the fields the card renders) so a refresh does not re-fetch everything, and so the cards are put straight back when X rebuilds the timeline on in-app navigation.

The cards are built to match X's own, because the point is that you should not be able to tell:

  • Header: avatar, bold name with verified badge, and @handle · date on its own line. Avatar, name and handle go to the author's profile; the space around them opens the post. Name underlines on hover; the handle stays plain.
  • Text: #hashtags, @mentions and URLs are real links, located by X's own entity ranges so an emoji before a hashtag does not shift it. Clicking the text itself opens the post.
  • Video: X's player rather than the browser's: a centred play button on the poster, then a seek bar, play/pause, elapsed / total, mute with a volume slider on hover, a settings menu that opens below the gear (playback speed, this video's own quality options, download when the post allows it), picture-in-picture, and fullscreen. Nothing loads until play, so there is no buffering spinner on the timeline.
  • Original poster overlay: for a video that was reposted from someone else, the unhovered player shows the running time and the original author in one dark box, exactly as X does; hovering raises the chip above the bar and shows the pill only when the pointer is on it. Before play the chip is already there, with no counter.
  • GIF: loops muted under X's overlay: play/pause, a GIF tag, and the original poster's avatar, name and badge.

Politeness and safety

  • At most 3 requests in flight, spaced 200 ms apart, capped at 60 per page. A 429 stops the resolver for the rest of that page load, and anything still waiting is given X's own text back rather than left on "Loading…".
  • The only things stored are non-secret build details (the query id and feature set, and the trimmed post data). No authorisation header or cookie is ever written to storage; those are re-learned from X's own traffic on every load.
  • Deleted posts, suspended accounts and protected posts all come back empty from X. They are counted as unavailable, not as failures: they are not something the script can or should show.
  • Opt out with localStorage['nox-experimental-quotes'] = '0'. The console's startup line then ends without experimental quotes: on.

Limits

  • It is a DOM overlay. Nothing is injected into X's own store; X is never made aware of these cards, and a rebuild of the timeline re-renders them from cache.
  • It depends on what X's page happens to request. On a cold timeline load X does not call TweetResultByRestId, so the resolver uses the shape it learned on an earlier load; if X rotates the query id, a stale shape is discarded on the first 4xx and re-learned from the next real call.
  • It does not bypass anything a permalink cannot show. If X will not serve the post to your account, the card stays "This post is unavailable.", correctly.

What's new in 2.5.0

This release moves from feature-flag patching to per-content media patching, verified live on X's current build. It also adds an on-page diagnostics panel.

Media opens without a View click

X now labels individual posts rather than relying on the feature switches earlier versions targeted. AgebypassX 2.5.0 patches that per-post data before the frontend renders it:

  • Removes the age-verification interstitial (blurred_image_interstitial, the "Age-restricted adult content" gate with a Show button) from posts and media entries whenever the response already contains usable X media.
  • Clears the sensitive-content blur (the "The following media includes potentially sensitive content" warning with a View button) by setting the account preference display_sensitive_media to true and a post's legacy.possibly_sensitive to false.

Both apply inline in the timeline, in the photo viewer (/photo/N permalinks), and to content loaded through in-app navigation, with no refresh needed. Warnings are preserved when X withholds the media itself, and the separate profile warning on user accounts is deliberately left alone.

Diagnostics panel

Click the status dot to open an on-page diagnostics panel; Escape or the corner ✕ dismisses it. The full counters also print to the console, now including media warnings removed and content blur cleared. (Since 2.5.1 the panel updates itself live; see Diagnostics inside How It Works below.)

Verified live on December 1, 2026

On the current X build, with wire-level confirmation of what the server sends:

Scenario Result
/photo/N permalink, cold load Image visible; no Show, no View
Inline in the post Media rendered directly; no blur
In-app navigation to a profile timeline 4 of 4 streamed posts unblurred; no refresh
Multiple account and region verification Verified

The server sends the full media URL marked Available alongside an AgeVerificationPrompt interstitial (the content is labeled, not withheld), which is exactly the case this release handles. The simulated-browser suite grew from 29 to 50 tests, all passing. See the test report for the earlier release's environment and limits.

A note on maintenance

This project is getting harder to maintain. X does not disclose how it decides to restrict content, and that decision is no longer a single feature switch. Based on what we observe, we suspect a combination of factors influences it:

  • Geopolitics: which country the request comes from.
  • Account age estimation: how old X believes the account or its owner is. X can also estimate age from other signals, including the email address and the phone number on the account.
  • IP address: network origin and reputation.
  • Cookies: session and tracking state.

Because none of this is documented, every X build can change the picture, and fixes have to be re-verified against live traffic each time. The diagnostics panel and counters exist so that when something breaks, reports can pinpoint which path stopped working.


AgebypassX v2.5.1 uses a multi-layer state interception system covering:

  • window.__INITIAL_STATE__
  • Object.assign
  • JSON.parse
  • Response.prototype.json
  • TanStack page-hydration references (window.$R.tsr)

On every one of those paths it applies two kinds of patches: the legacy feature-flag writes described below, and the per-content media writes that do most of the work on the current build.

The script runs entirely inside your browser. It does not send data to external servers, include analytics or tracking, or directly modify your X/Twitter account. The quoted-post resolver is the one exception to "never makes a request": it calls X's own API, as the session you are already signed in as, and nothing else.

Note: Current versions do not use webpack chunk interception. Modern AgebypassX releases work by intercepting and patching application state and parsed response data before X's frontend consumes it.


Installation

Recommended Setup

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

The script runs at:

document-start

so its hooks are installed as early as possible.


Privacy

AgebypassX is designed to operate entirely locally.

The script:

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

Everything happens inside the browser through the userscript.

The full source code is available for inspection.


How It Works

Modern X/Twitter pages receive application configuration and feature information through several different state and response paths.

AgebypassX hooks those paths and patches selected client-side values before the frontend uses them.

Expand: patching, interception layers, diagnostics, indicator, troubleshooting and tests

Targeted Feature Flags

The legacy mechanism 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

The current desired values are:

{
    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
}

AgebypassX supports multiple feature-state shapes.

Direct properties:

{
    sensitive_media_settings_enabled: true
}

Wrapped values:

{
    sensitive_media_settings_enabled: {
        value: true
    }
}

GraphQL-style feature entries:

{
    feature: "sensitive_media_settings_enabled",
    enabled: true
}

The patcher searches relevant state objects with an iterative depth-first walk and a per-patch WeakSet. Deep state does not consume the JavaScript call stack, and circular references are visited only once per patch. There is no arbitrary nesting-depth cutoff on a full patch.

On the current X build (December 2026), five of these six flags are no longer observed at all: only sensitive_media_settings_enabled still appears. They remain in the script for older builds and experiments, but the per-content patching below is what actually unlocks media today.

Per-Content Media Patching

X's current build labels individual posts instead of relying on those switches. AgebypassX 2.5.1 patches that data directly.

The age-verification gate (the Show button):

media_visibility_results: {
    blurred_image_interstitial: { interstitial_action: "AgeVerificationPrompt" }
}

This is removed from the post wrapper and from media entries whenever every media entry in the post has a usable X CDN URL.

The one-click sensitive-content blur (the View button). Two display flags are flipped, type-preserving like the feature flags:

display_sensitive_media : "false"  →  "true"     (account preference)
legacy.possibly_sensitive : true   →  false      (per post)

Both are display flags only: the server already sends the media URL marked Available. Two deliberate limits apply. A post whose media X actually withheld keeps its warning, so nothing renders broken. And possibly_sensitive is changed only on a post's legacy object. The same key on a user object drives the separate "Caution: this profile may include sensitive content" warning, which is left exactly as X sent it.


Type-Preserving Feature Writes

X may represent feature-switch values using different types.

For example, a value may appear as:

true

or:

"true"

or occasionally:

1

AgebypassX v2.5.1 preserves the original representation when applying the desired boolean state.

Examples:

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

This avoids breaking frontend code which performs strict comparisons against the original value type.


Verified Writes

Feature writes are verified instead of assuming that assignment succeeded.

Target-feature modifications use a verified write process:

Read current value
        ↓
Determine correctly typed desired value
        ↓
Attempt assignment
        ↓
Read value back
        ↓
Verify that the new value actually stuck

This catches cases such as:

  • Frozen objects.
  • Non-writable properties.
  • Throwing setters.
  • Setters which accept a value but silently discard it.
  • Unexpected application-state behaviour.

Successful writes are recorded separately from failed writes in the diagnostics.


Birthdate Handling

AgebypassX also patches compatible client-side birthdate objects to an adult date:

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

Birthdate writes are:

  • Type-preserving.
  • Verified after assignment.
  • Independently counted in diagnostics.

Existing numeric values remain numbers:

1995 → 1990

Existing string values remain strings:

"1995" → "1990"

Missing birthdate fields are filled using numeric values.


Interception Layers

1. __INITIAL_STATE__

AgebypassX installs an accessor on:

window.__INITIAL_STATE__

When X assigns its initial application state, the object is patched before the frontend consumes it.

Late-Injection Protection

Although the script runs at document-start, userscript injection timing can occasionally vary.

AgebypassX therefore checks whether:

window.__INITIAL_STATE__

already exists before installing the hook.

If an existing state object is found:

  1. Its current value is preserved.
  2. The existing object is patched.
  3. The accessor is installed using that preserved value.

This avoids replacing already-populated application state with undefined.

If reading an existing __INITIAL_STATE__ property itself throws, AgebypassX does not replace it.

Instead, Hook 1 is left untouched and the remaining interception layers continue operating.


2. Object.assign

Some application state is created or updated dynamically after initial page load.

AgebypassX wraps:

Object.assign

and checks state-like targets containing structures such as:

featureSwitch
entities
users

Relevant objects are patched after the native assignment completes. Class instances, arrays, custom prototypes, null-prototype objects and objects from other realms remain supported; the hook does not restrict state to plain objects.


3. JSON.parse

Some application state is created from JSON strings.

AgebypassX wraps:

JSON.parse

Before walking the parsed object, the original JSON text is checked using a single regular-expression gate.

The gate looks for:

  • Known target feature names.
  • birthdate
  • featureSwitch
  • Media-warning and content-blur fields.

If nothing relevant is present, the object is returned without a deep traversal.


4. Response.prototype.json

Modern X code frequently uses:

fetch(...)

followed by:

response.json()

Browser-native Response.json() parsing can bypass an overridden page-level JSON.parse.

AgebypassX therefore also wraps:

Response.prototype.json

Returned objects are inspected using a lightweight structural scan before the full patcher runs.

The current structural pre-scan depth is:

5

A full patch only occurs when potentially relevant state is detected, including GraphQL entries whose known flag name appears in feature and whose value appears in enabled. Prototype names such as constructor and toString do not count as known flags.

The depth-five limit applies only to the structural pre-scan. A response whose only relevant marker lies deeper than that can still be skipped. Once a gate matches, the full patch has no depth cutoff.


5. TanStack Page-Hydration References

When a post link is opened directly, X's page scripts store API results in Seroval's tsr reference table, including chunks delivered after the first paint.

AgebypassX watches:

window.$R.tsr

and patches media fields in those results before the router or the stream reads them. On the December 2026 X build this path is not exercised, but the support is kept for builds that use it.


Performance

AgebypassX is designed to avoid blindly scanning everything X creates.

Version 2.5.1 retains the iterative traversal introduced in 2.4.1; no real-world speed improvement has been measured. Hook counters show how often patching is attempted, not how much CPU time it takes.

Raw JSON Gate

Before walking data returned through JSON.parse, the script performs a single regex search for:

  • Target feature names.
  • birthdate
  • featureSwitch
  • Media-warning and content-blur fields.

If none are present, no full patch is performed.

Fetch Response Gate

Objects returned through Response.json() use a depth-limited structural scan before the full patcher runs.

Event-Driven Architecture

AgebypassX does not use:

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

Patching occurs only when one of the hooked data paths is triggered.


SPA Navigation Support

X is a Single Page Application.

Large parts of the application can change without a traditional page reload.

AgebypassX creates a new:

WeakSet

for every patch operation.

This gives cycle protection during one traversal while still allowing the same state object to be patched again later if X repopulates or modifies it.


Native Function Compatibility

AgebypassX wraps several native JavaScript functions.

To reduce compatibility problems, replacement functions preserve the original function's:

.name
.length

For example:

JSON.parse.name

continues to behave like:

parse

and:

Object.assign.name

continues to behave like:

assign

AgebypassX intentionally does not currently add more aggressive anti-detection or Function.prototype.toString spoofing.

There is no evidence that this is required for current functionality, and avoiding unnecessary interception keeps the implementation simpler and more maintainable.


Status Indicator

AgebypassX displays a small status indicator in the top-right corner.

Green Dot

ACTIVE

The current interception and traversal system is operating without a detected traversal/hook error.

A successful later gated patch can restore the indicator to green after a transient error.

Red Dot

ERROR

A hook installation or object traversal operation encountered an error.

Check the browser console for messages beginning with:

[Nox]

Important

The dot represents hook/traversal health.

Individual feature writes which fail or do not stick are tracked separately in diagnostics and do not automatically turn the dot red.

This distinction allows the script to report:

Hooks operational

while separately showing:

Specific feature write failed

Diagnostics

Click the green or red dot to open the diagnostics panel. It shows what explains a miss on the current X, and keeps itself up to date while open: there is no Refresh button because none is needed. The same counters, and more detail, print to the browser console.

The panel shows, for the current page load:

Status                      Active, or Error with the count
Media warnings removed      age-verification interstitials taken off posts
Content blur cleared        sensitive-content blurs removed
Quoted posts                N seen · N shown · N unavailable · N failed   (2.5.1)
Last error                  the most recent real failure, or None

"unavailable" is not a failure. X returns nothing for a deleted post, a suspended account or a protected one; those are counted as unavailable and the card correctly keeps X's own "This post is unavailable." text. "failed" is reserved for requests that were refused or came back broken (a rate-limit, a 4xx, a non-JSON body), and only those set Last error.

When there is a last error it appears in full in a code block that scrolls sideways rather than overflowing. Click it to copy the exact text, so a bug report can paste precisely what happened.

The console adds:

Gate-hit counters
Feature flags found / changed / failed
Birthdate statistics
Media warnings removed
Content blur cleared
Experimental quoted-post counters and the last error
Potential related/unknown keys
Recent errors

Media Counters

Two counters track the per-content patching:

media warnings removed

How many age-verification interstitials and per-media warnings were removed because usable X media was present in the response.

content blur cleared

Split into possiblySensitive (posts whose legacy.possibly_sensitive was cleared) and displaySetting (times the display_sensitive_media preference was turned on). On the current build these are the numbers that matter most: if media is still blurred, check whether they are moving.

Gate Counters

AgebypassX tracks how many relevant patch attempts came from:

state
assign
parse
json

These correspond to:

__INITIAL_STATE__
Object.assign
JSON.parse
Response.json

This helps identify which interception paths are actually being used by the current X frontend.


Feature Diagnostics

Three counters are tracked for every known target flag.

found

How many times the feature was encountered.

changed

How many times its value needed changing and the new value was successfully verified after assignment.

writeFailed

How many times the feature could not be completely processed or written.

This can include:

  • Property reads which throw.
  • Assignment failures.
  • Non-writable properties.
  • Read-back mismatches.
  • Setters which discard the requested value.

Reading the Counters

found > 0
changed > 0
writeFailed = 0

Means:

Working normally.

found > 0
changed = 0
writeFailed = 0

Means:

The flag was found but already had the desired value.

found > 0
writeFailed > 0

Means:

The flag exists, but one or more processing/write attempts did not complete successfully.

found = 0

Means:

The flag was not encountered during this session.

This is a warning signal, not proof of removal.

Possible explanations include:

  • X renamed the feature.
  • The feature is region-specific.
  • The account is not part of the relevant experiment.
  • The endpoint containing the feature was never loaded.
  • X removed the feature.
  • X moved the configuration elsewhere.

Birthdate Diagnostics

Birthdate handling has its own counters:

seen
changed
failed

seen

Number of compatible birthdate objects encountered.

changed

Number of individual birthdate fields successfully changed and verified.

failed

Number of individual birthdate field writes which threw or failed read-back verification.


Related-Flag Discovery

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

age
birth
minor
sensitive
blur
restrict
verif
interstitial

Potential matches are logged once per session.

These keys are displayed as:

related keys seen near known structures (NOT verified flags)

Limitation

This is not a complete automatic feature-renaming detector.

The scanner only runs while traversing state that was already reached through one of AgebypassX's known gates.

If X completely renames both a feature and the surrounding structure, the scanner may never encounter it.

The found = 0 counters remain an important signal when investigating possible frontend changes.


Diagnostics Example

Click the status dot and open DevTools Console.

You may see something similar to:

[Nox] diagnostics v2.5.1

status: ACTIVE | total errors: 0

gate hits:
{
    state: 1,
    assign: 4,
    parse: 2,
    json: 7
}

flags found:
{
    rweb_age_assurance_flow_enabled: 2,
    age_verification_gate_enabled: 0,
    sensitive_tweet_warnings_enabled: 3,
    sensitive_media_settings_enabled: 3,
    grok_settings_age_restriction_enabled: 1,
    rweb_mvr_blurred_media_interstitial_enabled: 0
}

flags changed:
{
    ...
}

flag process/write failures:
{
    ...
}

birthdate:
{
    seen: 2,
    changed: 3,
    failed: 0
}

media warnings removed: 35

content blur cleared:
{
    possiblySensitive: 25,
    displaySetting: 2
}

Actual values depend on:

  • Account configuration.
  • Region.
  • Experiments.
  • Which X pages were visited.
  • Which API responses were loaded.

Indicator Hotkey

Press:

Alt + .

to show or hide the indicator.

The preference is stored locally using:

localStorage

and persists across page reloads.

No external server receives this setting.


🛡️ Defensive Indicator Mounting

Because the userscript runs at:

document-start

the page DOM may not yet exist when execution begins.

Hooks install immediately. The indicator waits for document.body, mounts the dot inside the body, and places its stylesheet in the head when available.

A MutationObserver watches direct children of the document, root, head and body. It restores a removed dot or stylesheet and reattaches to replacement containers during page updates. It does not observe every descendant mutation in the timeline, and no polling timer is required.


Troubleshooting

No Indicator Appears

Try:

  • Press Alt + . in case the indicator was previously hidden.
  • Confirm Tampermonkey is enabled.
  • Confirm AgebypassX is enabled.
  • Confirm the script has permission to run on:
https://x.com/*
https://twitter.com/*
  • Reload the page.

No [Nox] Messages in Console

Open DevTools:

F12 → Console

Search for:

[Nox]

You should normally see a [Nox] v2.5.1 loaded line, followed by a [Nox] ready line that points you to the dot for diagnostics. While the quoted-post resolver is on, the second line also ends with experimental quotes: on.

If there are no AgebypassX messages at all, the userscript may not be executing.

Check the userscript manager and site permissions.


Red Indicator

A red indicator means the hook/traversal system encountered an error.

Possible console messages include:

[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 dot to print the full recent-error diagnostics.

Include relevant messages when opening a bug report.


Green Indicator but Behaviour Has Not Changed

A green indicator does not guarantee that every target flag still exists or that X still relies on client-side enforcement.

In the console, data observed distinguishes a healthy hook from data the script saw on this load. initialStateObject becomes true after the script receives an initial-state object. knownFlags becomes true after it encounters a known flag through any hook. These fields describe observations in this session. They cannot identify X's build or establish account eligibility.

Click the indicator and inspect:

media warnings removed
content blur cleared
flags found
flags changed
flag process/write failures
birthdate
gate hits

X may have:

  • Renamed a feature flag.
  • Changed its response format.
  • Moved configuration to another state path.
  • Region-gated a feature.
  • Added or changed experiments.
  • Added server-side enforcement.
  • Changed how the frontend consumes feature state.
  • Estimated your age from other signals, including the email address and phone number on the account.

The diagnostic counters are designed to make these cases easier to identify. The last one is decided on X's side, from the account's own details, so nothing in the browser can change it.


Browser Compatibility

AgebypassX has primarily been tested with Chromium-based browsers.

Examples include:

  • Google Chrome
  • Chromium
  • Microsoft Edge
  • Brave

Tampermonkey and Violentmonkey-compatible environments should generally work, but userscript-manager behaviour can differ between browsers.

The script safely guards its use of:

GM_info

and falls back to the hardcoded script version if unavailable.


Simulated Browser Tests

Development requires Node.js 20.19+, 22.13+, or 24+ within the supported major-version ranges in package.json.

npm ci --ignore-scripts
npm run check
npm test

The suite executes the complete userscript in isolated jsdom windows and tests its public hooks, DOM and click-to-print diagnostics. A per-window subclass of Node's native Response supplies real JSON parsing and body-consumption behavior because jsdom does not implement fetch.

Coverage includes 20,000-level state, cycles, shared references, typed flag and birthdate writes, custom-prototype targets, throwing/frozen objects, parsing errors, response feature arrays, status recovery, document-start, indicator/style restoration, container replacement and the visibility hotkey. A timeline simulation verifies that 1,000 nested DOM insertions do not trigger the indicator observer. Per-content patching is covered for timeline, direct-post and TanStack hydration payloads, the /photo/N permalink shape, every type form of display_sensitive_media and possibly_sensitive, withheld-media guards, the user-object exclusion, and the diagnostics panel.

Version 2.5.1 (82 tests) adds the quoted-post resolver: learning both requests through XMLHttpRequest and fetch, replaying with only the id swapped, the TweetDetail fallback, the 429 stop, the no-relaunch guard, cross-reload caching, the race where an article is in the DOM before its card is painted, the rebuild on in-app navigation, tombstone shapes, and the "unavailable, not failed" distinction. The card itself is covered for header links, the stretched post link, entity links located by code point, the verified badge, the X-style player (controls, settings menus with this video's own qualities, the attribution overlay and its hover states), and the GIF overlay.

These tests do not establish live X compatibility, visual rendering, userscript-manager injection behavior or any performance improvement on a real timeline. The userscript itself has no npm/runtime dependency; jsdom is used only for development tests.


Debugging

Open DevTools and filter for:

[Nox]

Script Startup

[Nox] v2.5.1 loaded

The userscript has started executing. A [Nox] ready line follows once hook installation code has completed; while the quoted-post resolver is on it ends with experimental quotes: on.

Errors

Errors use messages such as:

[Nox] JSON.parse patch failed

The diagnostics retain up to the most recent:

20

errors.

Console warning output is rate-limited to avoid excessive spam.


Reporting Issues

Bug reports are welcome.

Open an issue and fill in the form:

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

It asks for your browser and userscript manager, the AgebypassX version, the status indicator, and the diagnostics from the console (click the dot to print them), together with a description of what happened and the steps to reproduce.

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


Source Code

AgebypassX is open source.

Repository:

https://github.com/Saganaki22/AgebypassX

The complete userscript can be inspected before installation.


License

AgebypassX is licensed under the MIT License.

You are free to inspect, modify, fork, and redistribute the project under the terms of the license.

https://opensource.org/licenses/MIT


Support & Contributions

Feedback, bug reports, pull requests, and improvements are welcome.

If you would rather support the project financially, see 💜 Support future development at the top of this README; every donation helps keep the script working as X changes.

GitHub:

https://github.com/Saganaki22/AgebypassX

If X changes its frontend architecture or feature configuration, reports containing the diagnostic counters can help identify what changed.


Version History

Expand version history (v2.5.1–v1.0)

v2.5.1: current release

  • Resolve quoted posts that X withholds from timelines: learn the page's own TweetResultByRestId / TweetDetail requests from its XMLHttpRequest traffic, replay them per quote with only the id swapped, patch the result, and render an X-matching card in place of "This post is unavailable." Falls back from the first query to the second, which tells a withheld post apart from a deleted one.
  • Cards match X: header with profile links (avatar, name, handle) and a stretched link to the post; verified badge; #hashtags, @mentions and URLs as real links; X-style video player (seek, time, mute with volume, settings with playback speed / per-video quality / download, picture-in-picture, fullscreen, original-poster overlay); X-style GIF overlay with play/pause and the original poster.
  • Politeness: at most 3 requests in flight, 200 ms apart, 60 per page, stop on 429; results cached across reloads (one day, up to 150 posts); only non-secret request shapes are stored. Opt out with localStorage['nox-experimental-quotes'] = '0'.
  • Diagnostics panel rewritten: live-updating, no Refresh button; shows media warnings removed, blur cleared, quoted posts seen / shown / unavailable / failed, and the last real error in a click-to-copy code block.
  • Simulated-browser suite grew from 50 to 82 tests.

v2.5.0

  • Remove the age-verification interstitial (blurred_image_interstitial) from posts and media entries when the response already contains usable X media; covers timeline JSON, direct-post responses, native X API Response.json payloads and TanStack hydration references.
  • Clear the one-click sensitive-content blur by turning on the display_sensitive_media preference and clearing a post's legacy.possibly_sensitive, so media opens inline, in the photo viewer and on in-app navigation without a View click.
  • Add an on-page diagnostics panel behind the status dot, with a data observed console field and media warnings removed / content blur cleared counters.
  • Document that five of six legacy feature flags are no longer observed on the current X build, and record a live verification from December 1, 2026.
  • Grow the simulated-browser suite from 29 to 50 tests.

v2.4.1

  • Replace recursive patch traversal with an iterative walk, retaining deep-state and cycle coverage.
  • Preserve all existing state-object types handled by Object.assign.
  • Recognize GraphQL feature-array entries in the fetch-response gate and use own-property checks for known flag names.
  • Avoid repeatedly scanning shared/cyclic response branches while preserving shorter-path coverage.
  • Mount the indicator only after the body exists; restore the dot and stylesheet after removal or container replacement.
  • Add simulated-browser regression tests and keep native function compatibility limited to names and arities.

v2.4.0

Type-Preserving Feature Writes

Feature modifications now preserve X's existing representation.

Supported forms include:

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

This improves compatibility with feature-switch structures that use strict type comparisons.

Verified Writes

Target-feature assignments are now read back after modification.

The script separately tracks:

found
changed
writeFailed

so diagnostics can distinguish between:

  • A feature not being present.
  • A feature already having the desired value.
  • A successful modification.
  • A modification which threw or did not stick.

Advanced Diagnostics

Clicking the indicator now prints detailed diagnostics to the browser console.

Diagnostics include:

Current health
Historical errors
Per-hook gate counts
Per-flag found counts
Per-flag changed counts
Per-flag processing/write failures
Birthdate statistics
Potential related keys
Recent errors

Known feature counters are pre-seeded with 0, making features which were not encountered immediately visible.

Verified Birthdate Patching

Birthdate handling now uses:

  • Type-preserving scalar conversion.
  • Verified assignment.
  • Read-back validation.

The script tracks:

birthdate.seen
birthdate.changed
birthdate.failed

Improved Status Model

The indicator now separates:

Hook/traversal health

from:

Individual feature-write outcomes

A transient hook/traversal error can recover to green after a genuinely successful gated patch.

Unrelated JSON.parse, Object.assign, or response activity cannot falsely clear an error state.

Patch Failure Propagation

Recursive traversal now propagates internal traversal failures back to the originating hook.

A hook only reports successful recovery when its gated patch completed without a traversal error.

Related-Key Diagnostics

Added heuristic discovery of potentially related keys containing terms such as:

age
birth
minor
sensitive
blur
restrict
verif
interstitial

This helps investigate X frontend changes while clearly distinguishing candidates from verified feature flags.

🛡️ Late __INITIAL_STATE__ Protection

If AgebypassX starts after X has already populated:

window.__INITIAL_STATE__

the existing value is captured and patched before the accessor is installed.

If capturing the existing property fails, AgebypassX leaves it untouched rather than risking state corruption.

Hooks 2–4 remain operational as fallback interception paths.

Metadata Cleanup

The current implementation is described accurately as application-state and parsed-response interception.

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


v2.3.0

Indicator Hotkey

Added:

Alt + .

to show or hide the status indicator.

The preference persists locally across reloads.

Performance Gate

Added a single-pass regular-expression gate for raw JSON payloads.

Deep recursive walks are only performed when potentially relevant feature names are detected.

Smarter Fetch Inspection

Response.json() results use a lightweight depth-limited structural scan before the full object patcher runs.

This substantially reduces unnecessary traversal of unrelated responses.


v2.2.0

Response.json Hook

Added interception for:

Response.prototype.json

because browser-native fetch response parsing can bypass an overridden JSON.parse.

Re-Patch Support

Cycle detection became scoped to individual patch operations.

State objects can therefore be patched again if X repopulates them after SPA navigation.

🛡️ Defensive Indicator

Improved indicator mounting for document-start.

The indicator is automatically restored if the page removes it.

Native Function Compatibility

Wrapped native functions preserve their original:

.name
.length

values.

GraphQL Feature Arrays

Added support for:

{
    feature: "feature_name",
    enabled: true
}

v2.1.0

Multi-Hook Architecture

Introduced interception through:

__INITIAL_STATE__
Object.assign
JSON.parse

Status Indicator

Added the green/red status indicator.

🛡️ Hardened Patching

Improved protection against:

  • Circular object graphs.
  • Throwing getters.
  • Non-writable properties.
  • Unexpected application objects.
  • DOM objects.
  • Browser globals.

v1.3.0: Webpack Edition

Webpack Architecture

Introduced webpack chunk interception for the X frontend architecture used at the time.

Enhanced Detection

Added targeting for sensitive-media-related frontend modules and queries.

Advanced Status

Added improved debugging and status information.

Multiple Fallbacks

Added additional interception strategies for network and GraphQL-related paths.

UI Improvements

Expanded the status indicator and debugging interface.

Improved Debugging

Added additional console information and debugging tools.

The architecture introduced in v1.3.0 should not be confused with modern AgebypassX releases. v2.x now uses application-state and response interception instead of webpack chunk interception.


v1.2: Enhanced Edition

  • Added configuration and state-management improvements.
  • Added multiple patching strategies.
  • Improved user interface behaviour.
  • Improved SPA navigation handling.

v1.1: Reliability Update

  • Added fallback patching methods.
  • Improved error handling.
  • Expanded patch targets.

v1.0: Original

  • Initial release.
  • Basic client-side age-state patching.
  • Basic status indicator.

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.

関連プロジェクトを探す

読み込み中…