Skip to content

Commit

Permalink
update for shareplay
Browse files Browse the repository at this point in the history
  • Loading branch information
steveseguin committed Jan 10, 2024
1 parent 2b71aa4 commit ae34de6
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
10 changes: 10 additions & 0 deletions dock.html
Original file line number Diff line number Diff line change
Expand Up @@ -2277,6 +2277,12 @@
if (urlParams.has("fadeout")){
fadeout = true;
}


var hideNumbers = false;
if (urlParams.has("hidenumbers")){
hideNumbers = true;
}

if (urlParams.has("swiperight")){
transitionType.push("swiperight");
Expand Down Expand Up @@ -4825,6 +4831,10 @@
return;
}

if (hideNumbers && data.chatmessage && !data.contentimg && !data.hasDonation && (data.chatmessage === parseFloat(data.chatmessage))){
return;
}

if (data.textonly){ // should be legacy compatible, since textonly is new.
chatmessage = escapeHtml(chatmessage); // lets escape any < > ' " or other special characeters, since it would be dangerous as HTML.
}
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Social Stream Ninja",
"description": "Powerful tooling to engage live chat on Youtube, Twitch, Zoom, and more",
"manifest_version": 2,
"version": "1.67.15",
"version": "1.67.16",
"homepage_url": "http://socialstream.ninja/",
"icons": {
"128": "icons/icon-128.png"
Expand Down
6 changes: 6 additions & 0 deletions popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,12 @@ <h2 class="streaming_chat_title"><span data-translate="streaming-chat-dockable">
<span class="slider round"></span>
</label><span data-translate="hide-messages-marked-as-questions">❔ Hide messages marked as questions
</span></div>
<div>
<label class="switch">
<input type="checkbox" data-param1="hidenumbers">
<span class="slider round"></span>
</label><span data-translate="hide-messages-numbers-only">🔢 Hide messages that are numbers only
</span></div>
<div title="HTML is removed from messages, donations, and names for this dock only.">
<label class="switch">
<input type="checkbox" data-param1="striphtml">
Expand Down
9 changes: 6 additions & 3 deletions shareplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@
}

if (!name){
name = escapeHtml(document.querySelector(".chat--content--heading").innerText);
try {
name = escapeHtml(ele.querySelector(".chat--content--heading").innerText);
}catch(e){
// console.log(e);
}
}

var msg = "";
Expand All @@ -92,8 +96,6 @@
chatimg = "";
}



var data = {};
data.chatname = name;
data.chatbadges = "";
Expand All @@ -108,6 +110,7 @@
data.type = "shareplay";


//console.log(data);

if (!name && !msg){return;}

Expand Down

0 comments on commit ae34de6

Please sign in to comment.