From 7942db639d1b1acc11b267c4b9f499d318a3a06a Mon Sep 17 00:00:00 2001 From: Steven Crader Date: Sat, 11 Apr 2026 16:29:43 -0700 Subject: [PATCH 1/2] Add options to disable gifts and raid capture --- README.md | 23 ++++++++++++-- package.json | 2 +- src/components/rants/rant.ts | 55 +++++++++++++++++++++------------- src/manifest.json | 2 +- src/pages/options/options.html | 34 +++++++++++++++++---- src/pages/options/options.ts | 8 +++++ src/types/option-types.ts | 10 +++++++ 7 files changed, 103 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index e10fed6..a765635 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,10 @@ **WARNING:** this relies on undocumented features of Rumble. If Rumble changes their site, this may break. -Add support for capturing the paid Rumble Rants for [Rumble.com](https://rumble.com/) livestreams. +Add support for capturing the paid Rumble Rants for [Rumble.com](https://rumble.com/), gifted subscriptions, and raids for livestreams. Rants are shown past their normal expiration date in the chat. -Rants can be shown as a sidebar on the stream page or in a separate window. After a stream ends, cached data can be -viewed by loading the stream page again. +Rants can be shown as a sidebar on the stream page or in a separate window. After a stream ends, cached data can be viewed by loading the stream page again. Additionally, all cached data can be viewed and managed from the Cached Rants page. @@ -124,6 +123,24 @@ Options: - Unchecked: display as sidebar (Default) - Checked: open as popup +**Include Gifts** + +Include gifted subscriptions in the sidebar + +Options: + +- Unchecked: gifted subscriptions are not captured +- Checked: gifted subscriptions are captured (Default) + +**Include Raids** + +Include incoming raids in the sidebar + +Options: + +- Unchecked: incoming raids are not captured +- Checked: incoming raids are captured (Default) + ### Page Links Click "View Cached Rants" to open the Cached Rants page diff --git a/package.json b/package.json index 3a95643..040f55e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rantstats-extension", - "version": "1.5.0", + "version": "1.5.1", "packageManager": "yarn@4.6.0", "description": "Add support for capturing paid Rumble Rants for Rumble.com livestreams.", "main": "output/pages/content/content.js", diff --git a/src/components/rants/rant.ts b/src/components/rants/rant.ts index 577098c..9fc3f06 100644 --- a/src/components/rants/rant.ts +++ b/src/components/rants/rant.ts @@ -1,4 +1,13 @@ -import { cacheMessage, getAllCachedMessageIds, getBadge, getBadges, getUser, updateCachedMessage } from "../../cache" +import { + cacheMessage, + getAllCachedMessageIds, + getBadge, + getBadges, + getOptions, + getUser, + updateCachedMessage, +} from "../../cache" +import { consoleLog } from "../../log" import { CacheBadge, GiftPurchaseNotification, Notification } from "../../types/cache" import { CONSTS } from "../../types/consts" import { SortOrder } from "../../types/option-types" @@ -813,32 +822,38 @@ export const renderMessage = async ( const messageIdNotification = `${messageId}-notification` + const options = await getOptions() + if (isGiftReceiver(text)) { addGiftReceiver(messageId, time, text, realUsername) } else if (raid_notification) { - await renderRaidNotification( - messageId, - time, - text, - raid_notification, - realUsername, - realUserImage, - badges, - read, - cachePage, - ) + if (options?.includeRaids) + await renderRaidNotification( + messageId, + time, + text, + raid_notification, + realUsername, + realUserImage, + badges, + read, + cachePage, + ) + else consoleLog(`Would have included raid from ${realUsername}`) } else if (rant && text !== "") { // subscription may not have a message text so don't render await renderRant(messageId, time, text, rant, realUsername, realUserImage, badges, read, cachePage) } else if (giftPurchaseNotification) { - await renderGiftNotification( - messageIdNotification, - time, - giftPurchaseNotification, - realUsername, - realUserImage, - cachePage, - ) + if (options?.includeRaids) + await renderGiftNotification( + messageIdNotification, + time, + giftPurchaseNotification, + realUsername, + realUserImage, + cachePage, + ) + else consoleLog(`Would have included gift from ${realUsername}`) } else if (notification) { await renderNotification(messageIdNotification, time, notification, realUsername, realUserImage, cachePage) } diff --git a/src/manifest.json b/src/manifest.json index 74665ac..52b0cfb 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "RantStats Extension for Rumble.com", - "version": "1.5.0", + "version": "1.5.1", "description": "Add support for capturing paid Rumble Rants for Rumble.com livestreams.", "icons": { "16": "images/icon-16.png", diff --git a/src/pages/options/options.html b/src/pages/options/options.html index 20c4cf8..7e085c7 100644 --- a/src/pages/options/options.html +++ b/src/pages/options/options.html @@ -1,5 +1,5 @@ - + Options | RantStats Extension for Rumble.com @@ -79,11 +79,7 @@

RantStats Extension Options

-
+ +
+
+ +

Include gifted subscriptions in the sidebar

+
+ +
+ +
+
+ +
+
+ +

Include incoming raids in the sidebar

+
+ +
+ +
+