United Trip Summary Renderer

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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.)