Skip to content

Commit

Permalink
Detect new class name used for chat list
Browse files Browse the repository at this point in the history
Resolves #11
  • Loading branch information
stevencrader committed Aug 24, 2023
1 parent 5dd8879 commit e13f05b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/rumble/rumble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ import {CHAT_POPUP_REGEX} from "../../types/consts";
*/
export const getVideoID = (): string => {
const m = CHAT_POPUP_REGEX.exec(window.location.pathname)
if (m != null){
if (m != null) {
return m[1]
}

const foundIds = []
const idElements = document.querySelectorAll('[data-id]')
idElements.forEach((element) => {
if (
element.classList.contains("rumbles-vote") &&
(
element.classList.contains("rumbles-vote") ||
element.classList.contains("rumbles-vote-pill")
) &&
element.getAttribute('data-type') === '1'
) {
foundIds.push(element.getAttribute('data-id'))
Expand Down

0 comments on commit e13f05b

Please sign in to comment.