Skip to content

feat(UFC Fight Pass): add activity#10673

Open
quanledg1108-spec wants to merge 1 commit intoPreMiD:mainfrom
quanledg1108-spec:main
Open

feat(UFC Fight Pass): add activity#10673
quanledg1108-spec wants to merge 1 commit intoPreMiD:mainfrom
quanledg1108-spec:main

Conversation

@quanledg1108-spec
Copy link
Copy Markdown

Description

This PR adds a new PreMiD activity for UFC Fight Pass, allowing users to display their Discord Rich Presence while browsing and watching content on the platform.

The activity detects when a user is on the UFC Fight Pass homepage or watching a video and updates Discord accordingly. It includes support for:

Browsing state (homepage / browsing fights)
Watching state with dynamic video title display
Live, replay, and highlights detection
Pause detection with appropriate status update
countdown timestamp support for accurate session duration display
Consistent large image branding for UFC Fight Pass

The presence is designed to provide a smooth and accurate representation of user activity while maintaining performance and stability.

Acknowledgements

Screenshots

Screenshot 2026-04-11 at 10 25 45 PM Screenshot 2026-04-11 at 10 27 05 PM Screenshot 2026-04-11 at 10 27 25 PM Screenshot 2026-04-11 at 10 27 35 PM
  • Detects UFC Fight Pass website activity in real time
  • Supports browsing and watching states
  • Differentiates between LIVE, REPLAY, and HIGHLIGHTS content
  • Displays current video title as presence state
  • Handles pause/resume updates correctly
  • Includes proper large and small image assets for Discord display

Signed-off-by: quanledg1108-spec <[email protected]>
@S1l3ntStr1ke87
Copy link
Copy Markdown

seems like it is AI

@theusaf theusaf changed the title Add files via upload feat(UFC Fight Pass): add activity Apr 13, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this asset from PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove dist folder

"regExp": "^https?://([a-z0-9-]+\\.)*ufcfightpass\\.com/?",
"version": "1.0.0",
"logo": "https://i.imgur.com/hVg7eP2.jpg",
"thumbnail": "https://i.imgur.com/hVg7eP2.jpg",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image should be a landscape promotional image or screenshot. This image is too similar to logo

clientId: "1492178685946499122",
})

const IMAGE_KEY = "fightpassufc"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable appears to be unused


presence.on("UpdateData", async () => {
const now = Math.floor(Date.now() / 1000)
const video = document.querySelector("video") as HTMLVideoElement | null
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use generics for querySelector

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this file from PR

"id": "922677780074881045",
"name": "_y3n"
},
"service": "UFC Fight Pass",
],
"regExp": "^https?://([a-z0-9-]+\\.)*ufcfightpass\\.com/?",
"version": "1.0.0",
"logo": "https://i.imgur.com/hVg7eP2.jpg",
],
"regExp": "^https?://([a-z0-9-]+\\.)*ufcfightpass\\.com/?",
"version": "1.0.0",
"logo": "https://i.imgur.com/hVg7eP2.jpg",
const title = document.title.trim()

const presenceData: PresenceData = {
largeImageKey: "https://i.imgur.com/hVg7eP2.jpg",
Copy link
Copy Markdown

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants