Skip to content

Commit fabb620

Browse files
authored
Merge pull request #578 from steveseguin/beta
Beta
2 parents 7402e1d + 0b76fb1 commit fabb620

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Social Stream Ninja",
33
"description": "Powerful tooling to engage live chat on Youtube, Twitch, Zoom, and more.",
44
"manifest_version": 3,
5-
"version": "3.26.6",
5+
"version": "3.26.8",
66
"homepage_url": "http://socialstream.ninja/",
77
"icons": {
88
"128": "icons/icon-128.png"

sources/twitch.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,8 @@
354354
var subscriber = "";
355355
var subtitle = "";
356356
var eventtype = "";
357+
var crossChat = "";
358+
357359
try {
358360
ele.querySelectorAll(SELECTORS.chatBadges).forEach(badge => {
359361
if (badge.alt && badge.alt.includes("Subscriber")){
@@ -387,6 +389,13 @@
387389
subscriber = "구독자";
388390
}
389391

392+
if (badge.alt && badge.alt.includes(", ")){
393+
let name11 = badge.alt.split(", ").pop();
394+
if (name11){
395+
crossChat = "https://api.socialstream.ninja/twitch/?username=" + encodeURIComponent(name11);
396+
}
397+
}
398+
390399
if (badge.srcset) {
391400
let bb = badge.srcset.split("https://").pop();
392401
if (bb) {
@@ -435,6 +444,10 @@
435444
}
436445
} catch (e) {}
437446

447+
let crossChatChannelIcon = ele.querySelector(".tw-image-avatar[src]");
448+
if (crossChatChannelIcon){
449+
crossChatChannelIcon = crossChatChannelIcon.src;
450+
}
438451

439452
var contentimg = ele.querySelector("img[src].chat-line__message--emote-gigantified") || "";
440453

@@ -542,8 +555,6 @@
542555
return;
543556
}
544557
}
545-
546-
547558

548559
try {
549560
if (!donations) {
@@ -708,6 +719,13 @@
708719
if (brandedImageURL) {
709720
data.sourceImg = brandedImageURL;
710721
}
722+
if (crossChat){
723+
data.sourceImg = crossChat;
724+
}
725+
if (crossChatChannelIcon){
726+
data.sourceImg = crossChatChannelIcon;
727+
}
728+
711729
if (data.hasDonation){
712730
data.title = getTranslation("cheers", "CHEERS");
713731
}

0 commit comments

Comments
 (0)