United Trip Summary Renderer

Extracts and displays detailed flight info from /api/myTrips/lookup JSON on united.com after booking lookup completes.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
wangdashuai888
日安装量
0
总安装量
5
评分
0 0 0
版本
1.2
创建于
2025-04-13
更新于
2025-04-13
大小
8.6 KB
许可证
MIT
适用于

🛫 United Trip Summary Renderer (Tampermonkey Script)

This userscript enhances the United Airlines website by extracting detailed booking and flight information from /api/myTrips/lookup and displaying it in a structured summary format.

✨ Features

  • Automatically intercepts and parses booking JSON after PNR lookup
  • Displays a clean summary of:
    • Flight segments
    • Tickets and coupons
    • Passengers and loyalty tier
    • SSRs (Special Service Requests)
    • PNR remarks
  • Toggle button to view the raw JSON for inspection or debugging

🔧 Parsing Reference

The data parsing logic was adapted and inspired by @iangcarroll's pnrsh, which defines a clean schema for flights, passengers, SSRs, and ticket data structures.

🙌 Credits

  • JSON interception idea and JSON sample courtesy of @mrmitchelldevis
  • Script development assisted by ChatGPT (OpenAI)
  • Author: wangdashuai888

▶️ Usage

  1. Install Tampermonkey or a similar userscript manager in your browser.
  2. Add the script united-trip-summary.user.js to your manager.
  3. Visit united.com, enter a valid PNR (booking reference), and perform a lookup.
  4. Upon successful response, a summary box will appear at the top of the page showing detailed flight and ticket information.
  5. Use the "🔄 Toggle: Show Raw JSON" button to inspect the raw data.

📷 Screenshot


Feel free to submit PRs or open issues if you'd like to expand this further (e.g., export to PDF, print view, etc.)