PageSourceSearch

https://pressthink.org/j/rosen-archive/frontend/services/privacyRoute.js?v=3.8.36

js pressthink.org collected 2026-10-02 04:26:12 UTC 1,087 bytes, 22 lines download raw bytes

1// Privacy disclosure routing lives outside viewState.js for one release
2// boundary. A returning visitor can still have the pre-disclosure view-state
3// module in an old service-worker cache, so new entry points must not require
4// named exports that module did not provide.
5
6import { resolveSitePath } from '../utils/pathResolver.js?v=3.8.36';
7
8export const ABOUT_PRIVACY_HASH = 'about/privacy';
9export const ABOUT_PRIVACY_SECTION = 'privacy-and-browser-storage';
10
11export const isPrivacyDetailsHash = (hash = '') =>
12  hash.replace(/^#/, '').split('?')[0] === ABOUT_PRIVACY_HASH;
13
14// Start from the deployed site root so a privacy entry point never inherits
15// stale record or filter parameters from the current archive URL.
16export const getPrivacyDetailsHref = (host) =>
17  `${resolveSitePath('', host)}#${ABOUT_PRIVACY_HASH}`;
18
19// The previous view-state parser treats #about/privacy as unknown and returns
20// the archive route. Keep the destination usable while that module ages out.
21export const resolvePrivacyRoute = (route, hash) =>
22  isPrivacyDetailsHash(hash) ? 'about' : route;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.