Skip to content

[FEATURE REQUEST] Remove Sensitive Media / Age Verification Popup #360

@Mathelus

Description

@Mathelus

This "Feature" has recently rolled out with any sensitive labeled media blocked from view without verification, which is also broken. Having dealt with attempting to verify and being unable to view content whilst verified, this is a simple fix for web which can be ported to the tweak. Orca.pet has fixed this via browser extension, with the code below :

How does it work?

The X frontend uses a series of boolean flags, known as "features switches" internally, that control certain parts of its behaviour. They are set in the page HTML on load, on a JavaScript structure called window.INITIAL_STATE.

One such flag is rweb_age_assurance_flow_enabled, which is set if the user should be presented with the age verification prompt for adult images.

Thus it is possible to bypass it by simply ensuring the flag is unset when the page loads, and is exactly what the extension does: it inserts a hook on page start (before any other code has executed), and when the variable is set, it sets an override for the feature flag.

This is literally the entire extension source code:
`
let value;

Object.defineProperty(window, 'INITIAL_STATE', {
configurable: true,
enumerable: true,
set(newValue) {
try {
newValue.featureSwitch.customOverrides['rweb_age_assurance_flow_enabled'] = false;
} catch (e) {}
value = newValue;
},
get() {
return value;
}
});`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions