Analysis of Yahoo Hong Kong Frontend Initialization Script
This text is not a standard press release, but rather JavaScript code extracted from a Yahoo Hong Kong (hk.yahoo.com) webpage. It consists of the following key functional components:
- **TCF API Initialization**: Defines the `__tcfapi` stub for communicating with the Consent Management Platform (CMP). It complies with GDPR requirements and transmits consent information through message passing between iframes and windows. - **GPP API Initialization**: Defines the Global Privacy Platform (GPP) v1.1 stub. It supports signals for various US state privacy laws (such as California, Virginia, Colorado, etc.), including `tcfeuv2`, `uspv1`, and `uscav1`. - **Request Context (YAHOO.requestContext)**: Defines metadata for the user and server environment. - Language: `zh-Hant-HK` (Traditional Chinese - Hong Kong) - Region: `HK` - Timezone: `Asia/Tokyo` - Device Type: `desktop` - Consent Status: Ads allowed (`allowAds: true`), GDPR not applicable (`gdpr: false`), etc. - **Theme Settings (Dark/Light Mode)**: Reads the user's browser system preference (`prefers-color-scheme: dark`) or saved settings from local storage, dynamically applying `galaxy-dark` or `galaxy-light` classes. - **Ad Rendering Callback (Benji)**: Monitors the successful rendering event for the top-center iframe ad (ID: `sda-top-center-iframe`). Depending on the ad dimensions (`3x1`, `970x110`, `728x90`), it updates the data attributes of the homepage container.
FACT BOX
- Source: PR Times
- Category: News
- Organizations: Yahoo!
- Products / services: Yahoo! Hong Kong Portal / TCF API