#developers
1 messages · Page 3 of 1
FFZ click to mute or pause also fails with extensions active 
as does twitch's own native double click to fullscreen
there's no way to know if an extension consumed a click event
expecially for overlay extensions
because the entire video is covered by a cross domain iframe
so there are only two options, either always let the extension have it
or always consume it ourselves
which would break clicking on extensions at all
you by design cannot selectively absorb click elements above iframes
expecially cross origin ones
I will make a note in the settings about this
you can also add an option
ffz takes this approach
an option that just prevents mouse interaction with overlays
described as such
I think they use css to hide/remove the extension element
only if the user has requested that
that obveously also hides the entire overlay visually as well
ok yea there's two ways
unless you uBlock that annoying f*cker 
||ext-twitch.tv
twitch.tv##.extension-panel, .extension-container, .extensions-dock__layout, .extensions-video-overlay-size-container

ForsenE
so are we using Stylelint now ? https://gyazo.com/20e1a7383f89625406e8d23fd017cc0d
was thinking of fixing my PRs
we had been using stylelint before but the configuration was rather scuffed
i finally fixed it yesterday
so that it actually shows in vscode and the rules arent weird mismatches between local and ci
hey, Anatole, I have a question: why is the tokenizer initialized for each chat message?
as opposed to using a single tokenizer for all msgs
that's a bit of a merger with legacy code i think
for one it doesnt need to be a class
it was like this in the beginning i believe because initially we didnt have a message type
that needs to be reworked to be functional + add modularity so that custom tokenization steps can be added (ie by addons)
yeah one area where we're missing out on performance is actually the UserMessage.vue component
this one is built inefficiently
it's too bloated
due to how vue reactivity works, basically anytime something changes it triggers a cascading update that ends up rerendering the entire thing
it needs to be broken up into logical components
i.e timestamp, author, message body,, etc, anything that relies on reactive data actually needs to be inside its own component
quick off-topic question, why do you have react and vue, isn't it just supposed to be one big framework?
twitch uses react
ah gotcha
we don't use react though, where do you see that? 
we dont even import any react libraries
no we only hook into twitch's react instance, in order to efficiently replace specific things
yea that was probably what i meant, but i'm just donk
@sharp topaz but yes the tokenizer is not the most efficient. ive said this before that there is a massive amount of performance to gain still, in many areas, so feel free to contribute wherever you see fit 
the main faults right now i believe are,
- component reactivity layout
- emote data logic
- settings logic
- shared worker
yeah i have been working on it and that's when i happened to notice that it's initialized for every chat msg
beyond that there is a large amount of micro-improvements to be done, mostly trivial things but will ultimately add up to a nice boost once all is done
im testing bunch of wild stuff

that wont be a pr
yeah i've merged it
theres also like a lot of things that need to be unified
might try to make a list and add it to the project tracker

if there is a tracker i would love to help with some things
this just lists the current issues right now but im gonna start moving our internal tracker over
ah okay, i will see if i can do some, but i'm just not familiar with typescript and vue 
PRs updated 

what are the chances we could get account creation date added to the user cards as well?
@hasty kernel is the new usercard still WIP or can i already make a PR for an Issue i fixed?
looks like it was though?
it's in your inventory, the other claim button is about connecting it to the game
i clicked claim drop and now i got it
iirc it just disappears if you never click that
well itwould disappear if you dont claim it by may 21 i guess
but its not like having autoclaim functionality would do this either anyway
thatd still be manual even if the first button was clicked
i think it would be useful but if there's some reason you don't want to add it its fine
how would it be useful to implement something that doesnt actually have any reason to exist?
if it's never claim it disappears
if there is an autoclaim
it doesnt
seems pretty useful for me
it disappears because you don't have a connection to the game
no
an autoclaim isnt going to solve that for you
that's not true

uh idk
if someone wanted to PR this sure but im probably not gonna do it myself
seems mostly useless
fix the user card 
what about it
yeah its fine just click the twitch logo top right
i dont think these buttons are too useful
its only for like gifting a sub to someone
there is mod icon
i'm not sure what you guys think but you can click the user's name inside of the user card and a new user card appears
i'm not sure if this should happen
also the font is still too small
- the usercard still disappears in faster chats when the message no longer on screen
this is correct
claim just takes the drop
the other claim ties it to your twitch account
if you had the game actually connected it would do it automatically
but you can keep drops indefinately if you dont with the second claim
otherwise they'll go away
except there is just one claim
nah
you always have to do the second one
unless your account is already connected
alright pr it if you care and are so correct
nobody here will do it
as already stated
i don't care but you don't have to make false statements about it
false statements that two people independently came to the conclusion to
lil bro is so pressed 😭
im crying and in pain
the more likely explanation is that this was just a misunderstanding
and you're counting 1 vs 2 differently
I really don't understand how this media player works, the "state" doesn't seem be be reactive at all
this is despite hooking directly into the properties they then become reactive ???
how come 7tv.io/v3/users/twitch/<id> responds 301 Moved Permanently but the location header points to the exact same place?
is that expected behaviour?
doesnt give a 301 for me
nvm it was because i had a / at the end of the URL
and it was redirecting it to the same thing just without the trailing /
Some components have a debounced watcher, is this essentially a small delay before performing the callback?
anyone have opinions on how they want this to look css wise?
I'm not a css guru
It is a tooltip for reference
I would align the Titles like Video to the left and maybe the numbers aligned to the right?
I would if the "titles" were roughly the same length
also the "numbers" are different sizes as well (and updating)
yea you're probably right. How about having different colors for the 2 columns
maybe the twitch purple for the numbers?
I'd say to get rid of the "p" in the resolution. That's only used when describing a standard resolution using only the height. i.e. "480p"
(No one on the internet uses interlaced video)
also have to consider light mode (this is just an example)
Text looks a bit thinner in light mode, but that is often just a browser thing
browsers sometimes don't know how to handle gamma for text when not using subpixel font smoothing

I can't wait to have a latency indicator
it's literally the single most useful stat
I personally like being able to see both the buffer size and the "latency to broadcaster" statistics
because when the buffer is just barely hitting 0, then I know I'm as close to live as I can get
even if latency to broadcaster is bad for a given streamer
playing faster to reduce delay sounds really nice
this is twitch's auto speed up by default
I think I saw another GH issue asking to set a variable speed up
I never noticed that
nor did it ever catch up for me
or is it just too little of a speedup?
but then wouldn't it be smarter to not show that line?
because it kinda gives the impression that it does something when it basically doesnt really 
it's just the playback rate of the stream 
maybe I just add that as seperate line

i kinda like the way its separated in ffz 
I mean I wanted to provide the same thing without copying them too much 
yeah fair enough
except sports broadcasts restreamed from tv
😬
@frosty bronze The most important feature of FFZ's button to me was to be able to click it as a shortcut top open/close twitch's native playback statistics
because that shows more info than 99% of users will ever need to see
Yea I have an idea of what needs to be done with that, but that’s a separate component hook I would need to create
I dunno what’s better, adding all the video player features at once or adding them one by one later

This seems like bad placement of the user card
@sharp topaz Regarding the automatic acceptance of drops, I studied the issue a little yesterday. Now the main difficulty is that it is difficult to test. I have not found anyone to test the drops mechanism to properly check the operation of automatic acceptance.
Also, for some reason, I do not have a block with an acceptance button in the chat when I was sitting on the broadcast. Three times I tried to understand him, to find out what parameters he has in order to monitor him. With and without the extension enabled.
Hello everyone. I wanted to try to make this task.
https://github.com/SevenTV/Extension/issues/613
Not so long ago in a project, I'm trying to do something. I still don't fully understand how the mechanisms for finding the right "react components" work to get some native functions.
I tried to look for the logic that is responsible for the output of modal windows of reports and blocking. Debag is done through developer tools for react components. It seems to have found where they are, but the problem is that this logic is located next to the button (three dots), and it can only appear when we have opened the native user card. And I need to get it at the moment when I open the 7tv cards. How to be in such cases?
How to solve this problem correctly. Get the logic of opening modal windows and implement this dropdown, or try to transfer the native button directly to the 7tv user card?
I've added this 
but the button doesn't look like a button
also I think sidebar previews breaks sometimes:
yeah i had this issue
big refactor merging, apologies to open PRs 
PRs updated 
am I allowed to ask something about the 7ttv website here when it comes to emotes I did upload
?
FYI with the new update the sidebar previews after some time
Better than crashing
wouldnt it be better to just disable the highlights icon by default 
since its pretty much useless with the extension
so some PRs have been open for over a month waiting for a review...
is that normal?
I suspect just busy with other things 


I just got the 7tv extension working in safari on iPad
I am willing to work with the devs to get the app on to the app store. just let me know if its something you guys want to get done.
start by submitting a pull request for now, we'll see from there
try to add make it compatible with CI also
Just for my dumbass what is CI?
continuous integration
does things like checks, tests, and automatically compiles into artifacts from code pushed to the repository
can you even do that?
arent safari extensions just regular web extensions packaged through apple's own proprietary tools
@hasty kernel can we make the chat input focusable after a user copies message?
🤜 🔔
are there plans to have some sort of SDK that developers can implement in their own sites?
like if i just want to add 7tv to my chat, not twitch related
@ruby ginkgo https://7tv.io/ you could just implement 7tv by fetching in the emotes via our api to show on your website.
7TV Developer Portal.
forsenScoots
i tried this, https://7tv.io/v3/emotes?query=RoxyPotato, but nothing is returned
i see now, gotta use gql, thanks anyway
Same way as any other implementation
Global: 7tv.io/v3/emote-sets/global
Channel: 7tv.io/v3/users/kick/:id
Definitely do not use search to do that lol.
Yeah I was on no sleep
Thought isn't this going to get everyone's emotes
And then found the emote sets endpoint
Ty 😀
Is there a way to get my kick chatbox in #7tv-tools ? (No Perms)
ah, thanks
just a little simple explanation of your app is needed
and links and git repo if open source if possible
is v2 dead 
is there some dev role so i can get pinged
i dont see how this will help
you didnt even mention a role in the announcement
cuz i forgor lol
anyways um
where raffle
Got 7tv for kick working for my overlay, thxs too all that contributed earlier in this thread, i grabbed a few tips
this is for my chat fusion bot i'll be requesting to add soon for 7tv tools
can you elaborate on this a bit more, where can i find the event api?
suspicious name
no worries he has one y less
uhh good question

i guess you could try annoying melonify for docs

thats pretty cool do you have a link for that
Hey @streamer, Any tech enthusiasts here? Let's geek out over the latest gadgets!
chatgpt generated messages 🙂
i'll have a link tomorrow. still working on a few other things with it
Yeah I actually kinda thought they were. lol
@boreal grove Try these instead 
im planning on updating them again anyways because i need to add preview with twitch and youtube chat and with the 7tv emotes
whats the endpoint for twitch user emote sets?
i know kick is https://7tv.io/v3/users/kick/kickUserID
ok maybe the person i checked didn't have 7tv set up... thx
i shoulda tried a few id's
https://kicktools.ayybabz.com/fusion_chat/
still in beta. But I wanted to get it out asap for kick streamers so they had 7tv emote support on screen. still need to add twitch ones (already have the code written for it just need to port it in) And a few other features needed to add. But its functional
Chat Fusion is a custom chat overlay designed for live streamers of Kick.com, Twitch.tv and YouTube live using OBS, Streamlabs, Prism, and other streaming software. Enhance your stream by displaying your chat on-screen with personalized themes, animated emotes, and 7tv emotes. With a wide range of customization options, streamer tools, and engag...
Seems like your bot doesn't take aliases in count
Aliases for????
I’ll have to look into it when I wake up, just layed down. I didn’t even know aliases were a thing 🙂 thank you for pointing it out to me
enjoy your rest
great tool btw
bik retart extension
While it’s on my mind before I sleep. Is the Alias an alt emote name. For instance if I wanted kekw to come up if I typed KeKEmote or something like that. Just so I know what I’m looking for
yes
was that the only emote you had with an alias, i jus tlooked through yours and didn't see any others that I noticed. Just trying to double checkt he data and see where its different
If you go check my kick set you can see those little blue tags, that means they've got an alias https://7tv.app/emote-sets/647406d0ed95d7040ee1677b
i saw the forsenKEK one but how can it have the same alias, i think thats where i got confused
the original name is guraLaugh
the aliases are forsenKEK and LULE
so if someone types guraLaugh neither one will come up
ok i got it, simple change, was just getting the name from the wrong object. i'll upload the update later today
@boreal grove yeah its also a little strange to me that you have to define the height?
why's that
you can use an intersectionobserver btw
if you wanna dynamically delete messages that go offscreen
no matter the container height
Yeah it’s not about messages deleting after, it’s about people using it on their overlay and not sizing it properly then stretching it with obs etc. it’s to prevent bad habits. It’s default 1080 so no need to choose a height. I’ve played with auto etc thousands of times and always see less tech support questions at the end .
In my years of experience people generally don't understand overlays in their streaming software and they end up manually resizing the window with the mouse and it stretches the overlay and causes it to render improperly with the wrong aspect ratio. I can go around to 100s of streams and show examples. Its really just a reason for people to make a conscious desision in sizing to they don't skew the text afterwords. But since you bring it up what I can do is make an option to enable custom height, and if they don't check it, the height will just be default 100VH
yeah its just a bit annoying if you set it up in a streamelements overlay
in a custom widget, where the size can just be changed without stretching
OK I see what your saying, so your putting the source in a custom widget, not as a browser source. Yeah I mean NGL your in the minority doing that, but I totally get. Like I said I'm gonna add option now to either have custom or it will just be 100vh, so no need to change anything and it will take in effect the container it is in
thats what I hate about OBS browser sources, when you resize them it scales it instead of changing the container size, unless you manually do it
But thanks for feedback, your the first to ever mention that to me, but I want my widgets / tools to be accessible for all 🙂
You can hold control or alt or something while resizing something in OBS to crop it instead of resizing
I forget which key it is
It's not obvious but very useful
doesn't improve performance or anything but still better than stretching
Yes I know this it’s great for cropping but not up or down scaling.
oh i didnt know this
ty
uh ... m... so
wa/ u guys devloping?..
7TV
Last month, we had a chance to meet up with Sebastian “Forsen” Fors for an interview. In an hour-long conversation we dug deep to cover what makes Forsen, well, Forsen. We covered nearly everything. From how Sebastian did in school to his favorite way to make steak. We talked about how he thinks about stress and what are his tools and methods t...

crippling depression
@pseudo rivet Hey Melon do you plan on updating the FFZ add-on? Live emote updates seem to no longer work etc
oh no no no kick chat brokn
was reverse engineering their websocket connection for their chat and found how they handle emotes
if you type "[emote:37221:EZ]" it will appear as a emote
you can change the name of the emote like this "[emote:37221:MAAAAAAAAAAAAAAAAAAATIN]"
yeah thats been a thing since the start
so bad lol
emotes are a bit weird
i think that means you can use your own uploaded emotes everywhere

is anyone working on better name colors for kick chat
there’s too many colors and the pastel look is horrendous
right now paints works if you use the extension and are subbed 
make sure your account is linked and it should work
i’m thinking about updating the ui on 7tv.io again
super buggy rn and i don’t think it’s very adaptable for new stuff
yes simply link your account. There are no issues with that at the moment

you can use bttv globals on kick but its not in the emote picker
just a bug
ansonx10 feels well rested:
💤 (9h, 23m ago)
(extremely based bug that should not be fixed anytime soon)
we shold d÷vlop mor antidepressan
What is this space?
Any ideas on how to make 7TV work in an embed twitch chat? I apologise if this is not the right chat to ask this in.
Hello, good morning. I have a question: 7TV has any API? If so, how do I get it?
7TV Developer Portal.
So i been looking around. No where in the users data is the paint used? no reference? I have to look at the badge and paint endpoint to find if the user is in that data and which badge and paint they are using?
you can get the user's paint id with this query
but you'd have to do another query with the paint ID to see what it is
Pizza stop being helpful. You're not a developer. You're not supposed to know how to use the API

nvm found a better way
user(id: $id) {
id
username
display_name
style {
paint{
id
kind
name
}
badge {
id
kind
name
}
}
}
}```
what are you trying to use this data for?
you should not be querying for users in chat
there's an eventapi topic for chat users
you will get relevant data pushed to you when messages are sent
Is this clear?
I submitted a new issue #723
If there's any missing information I'll provide asap
thx, this will work perfect, i mapped out all the paints earlier. (I know that they are stored as a numerical rbga, but I got bored) LMAO
yeah I've seen the event api, and the documents are a kinda meh, so i been having trouble with them. I'm an amateur dev and still pretty new to all this so it takes me a bit longer to decipher wth i'm doing 
fyi, you can check here what does the user data stores/ relates to:
https://github.com/SevenTV/API/blob/1c759c94db0f4ce05a70db5de633ff3c66a493b5/internal/api/gql/v3/schema/users.gql#L31
The 7TV API | https://7tv.io/v3. Contribute to SevenTV/API development by creating an account on GitHub.
thank you. 🙂
@boreal grove Badges/Namepaints/Personal Emotes (collectively "cosmetics") are event-driven, needs to set up a few extra subscriptions on entering channels, namely
entitlement.*cosmetic.*emote_set.*
With the condition
{
"ctx": "channel",
"platform": "TWITCH" // TWITCH | YOUTUBE | KICK
"id": "123456" // user id on platform
}
To signal a presence you can make a POST on message send
// POST /v3/users/:id/presences
// where id is a 7TV User ID (not platform).
{
kind: 1,
passive: false, // if true it will emit presence data to the current user only
session_id: "" // eventapi session id, needed for passive presences
data: {
platform: "TWITCH",
id: "123456" // twitch user id
}
}
do not make a request for every message
for paints you will need to dynamically build out your text rendering, hardcoding is not an option
refactoring code 
how to disable style lint here?
.video-player .extensions-dock__layout, /* stylelint-disable-line selector-class-pattern */
$ stylelint **/*.{vue,scss,css} --ignore-path .gitignore
src/site/twitch.tv/modules/hidden-elements/HiddenElementsModule.vue
253:16 ✖ Expected class selector selector-class-pattern
".extensions-dock__layout" to be kebab-case
1 problem (1 error, 0 warnings)
alright, I just surrounded the whole thing with
/* stylelint-disable */
.video-player .extension-taskbar,
.video-player .extension-container,
.video-player .extensions-dock__layout,
.video-player .extensions-notifications,
.video-player .extensions-video-overlay-size-container {
display: none !important;
}
/* stylelint-enable */
why would you request the presence api I don’t understand what it does, if I am listening to a chat websocket how would i get a users badge and paint cosmetics when they send a message?
presences are how you do this
you subscribe to the topics like he said above
which will push to you data when a presence is created in the chat you've subscribed to
you also then send a self presence if you need your own data, with passive: true
or when sending messages send a non passive presence like said above
which will push your data to others
hmm okay
the difference here is
you dont request anything
that part is skipped, in the paradigm
because everyone in a chat will always be requesting for every message
and theres no reason to do that
it would also have massive server load implications
so instead you just tell the system that you want data from this chat
ahhhhhhh i think i understand now
and it will push it to you
when relevant
but you dont need to ask for anything
the data is long lasting though
you should keep it as long as the server hasnt told you to drop it
it wont push for every message
just when new data is relevant
and when old data is no longer
you could make it work, however it'd be kind of scuffed
something like .top-nav__menu > div:last-child div:has(div[data-a-target="tw-core-button-label-text"]) could work
yea I was using .top-nav__menu > *:nth-child(3) > *:nth-child(6) as a test
another thing is some of the selectors mess up the spacing in the top bar, but that's not as important
kind of what I mean with the bits button
if you want to remove it, remove it directly or just hide it using display: none it should keep the spacing intact
so what's happening is the red elements are being hidden whereas instead we should be hiding the teal element
I see
this spacing seems alright
.top-nav__menu > div:last-child div:has(button[data-a-target="top-nav-get-bits-button"]) for the bits, this selects the teal element you're referring to
a pr would be fine for both, no?
i'll leave it up to you, you found it first after all ;)
Someone should just make a ublock origin blocklist tbh lul
or put them in a doc with labels so people can choose which ones to cvpaste into their own ublock origins
can 7tv install into ublock? 
I agree, but it'd be more user friendly I guess lmfao
7tv is very user-friendly
but most 7tv-ers will have ublock origin too
(they just don't know how to use it)
yeah I meant having it inside of 7tv would be more user friendly, but you're not completely wrong I suppose
Yeah I know what you meant
this unfortunately is not a suitable selector
:has is not supported in all browsers
only chrome
hahaa
i figured compatibility would be an issue after suggesting making it part of 7tv 😭
Anyone know why vite only reacts to changes for files in the root dir for the extension project? It doesn't react to changes in src/
?? it should
it doesnt for me 
how did you start the dev server?
the yarn script
yarn start
im running it through WSL and i have read that the file watcher sometimes doesnt work with it, but since it's able to watch for some files i figure it cant be bc of that
was thinking it was a misconfig in the viteconfig file but then everyone would have run into issues
so it's left me confused
I'm running through WSL as well and haven't run into issues
unless you changed something in the viteconfig or you haven't run make deps then I'm not sure
maybe check WSL version?
running wsl2
@hasty kernel regarding my 2 PRs https://github.com/SevenTV/Extension/pull/514 and https://github.com/SevenTV/Extension/pull/516
Are they going to be looked at still or do I close them?
why would a predicate like this not work?
predicate: (n) => n.props && n.props.children && n.props.name === "TopNav__TurboButton_Available"
I'm not understanding how to be more specific here
there are many components like this and hooking into them causes the extension to crash
even if I specify a parentSelector as well it seems to pull any and every component with a name and children props
are these not actually "components"?
why can we not specify a limit for useComponentHook? awaitComponents function calls findComponentChildren which supports a limit argument
if we could specify a limit, then using the predicate I mentioned above won't run recursively
like it makes no sense to me at the moment, this is the same if not similar code that is returning hooked instances
document.querySelectorAll(".top-nav__menu").forEach((el) => {
const node = getVNodeFromDOM(el);
if (node) {
findComponentChildren(node, (n) => n.props && n.props.children && n.props.name, 50).forEach((c) => {
console.log(c.props)
});
}
});
This returns the following instances
This code howewer
useComponentHook<Twitch.TopNavMenuComponent>(
{
parentSelector: ".top-nav__menu",
predicate: (n) => n.props && n.props.children && n.props.name,
maxDepth: 50,
},
{
trackRoot: true,
hooks: {
update(inst) {
console.log(inst.component.props.name);
},
// render(inst, current) {
// console.log(inst.component.props.name);
// return current
// },
}
},
);
Starts printing all of this
something is happening during the hooking process that is returning more instances than what was specified
??
i mean, it's doing exactly as you'd expect
specify a vague predicate get vague results
I understand its vague
however
in awaitComponent
is it expected to start a Observer? always?
const instances = new Set<T>();
if (criteria.parentSelector) {
document.querySelectorAll(criteria.parentSelector).forEach((el) => {
const node = getVNodeFromDOM(el);
if (node) {
findComponentChildren<T>(node, criteria.predicate, criteria.maxDepth).forEach((c) => instances.add(c));
}
});
} else {
const root = getRootVNode();
if (root)
findComponentChildren<T>(root, criteria.predicate, criteria.maxDepth).forEach((c) => instances.add(c));
}
if (instances.size < 1) {
return new ObserverPromise<Set<T>>(
Why would instances.size become 0 if the parentSelector branch of the if statement returns instances
ok it's not starting an observer
I got .top-nav__menu instances size 13 for that parentSelector inside awaitComponent
I think I've isolated it to trackRoot: true
@frosty bronze you're likely hooking this wrong then
the predicates only match the FIRST component
it then switches to class based tracking
I beleive you are hooking layout elements
which are a single component
shared throughout the entire site
you cannot hook them
because if you did, you'd hook ALL of them
because they are the same component
your predicate doesnt matter
once its found one
ah ok, yes it is a Layout component
so if they can't be hooked directly...then what's the alternative?
find some other component and traverse the tree right?
or can I skip the hooking and use the findComponentChildren manually? (this is probably not ideal since it wouldn't update if there were changes)
hook the real component
layout components should be treated like functional ones
whatever parent owns them
is what you should hook
got it
Anyone know why this is happening? Sometimes when I parse the name paint the name paint covers the name :/
i swear i follow exactly how the extension does it
WebkitBackgroundClip: "text"
WebkitTextFillColor: "transparent"
@frosty bronze did u figure it out?
lol no
css4 spec is the only thing that contains :has psuedo selector
and that would be perfect for this
and somehow FF is being stupid with it
and hooking into the component that renders the top nav breaks the 7tv settings button
so...I'm SOL at the moment
wdym, does it just not work anymore?
hooking forces the component to re-render
the way that the settings button is currently inserted into the page doesn't re-render along with it
then why not fix the way the settings menu button is inserted 
it's definitely an overdue fix which a PR would be welcome for
yea was thinking about it
I see, yeah the approach I tried would work, it would however be kinda scuffed. Also because of the way it works it also messes with the 7TV button lol
it would allow you to hide more things though
are you using a hook or is it pure css?
I'm hooking it but I'm using findComponentParents
I can tell you what I did, mayb u can come up with a better approach
as far as I understand findComponentParents (actually isn't used anywhere) and findComponentChildren aren't actually hooking, but used to find the components which then can be hooked in useComponentHook
which I mean sure...
I can use findComponentChildren on the .top-nav__menu class and perform manual dom operations and call it a day, but probably isn't what the team is looking for
yeah neither of them hook themselves, they just get the node
the reason I used findComponentParents was because useComponentHook forces you to use findComponentChildren and my POC was built around it traversing to it's parents
the method I used was based on some parent component of the nav which exposed a few methods that are used to render the components seen in the GIF
it's kind of hacky but it worked
then that's the component that should be hooked
yeah but finding it would require you to start from the root
that's why I just traversed upwards lol
which I must be god awful at finding components
but yeah, that would work too
nah, you're fine lol, it was kind of annoying to find this
anyway, to finish this up, just overide those methods (and I guess keeping a reference to restore them) and force a re-render and voila
use defineFunctionHook
you're right.. yeah my bad I'm not too familiar with the codebase yet lol
I wasted like a day because all my console logging was being filtered 
unlucky
qq I haven't explored kick that much, but is it also using react? so hooking into components would still apply?
Kick uses Vue

There is no hooking vue
anyway to create emote sets for a specific set of users and programmatically update who can use them?
Seems not but had an interesting thought, haha.
you mean like a specific set of user using the same emote set?
So I just made a POC to auto claim moments & drops however I'm not too keen on the approach. Although it should technically work as expected, it might break in certain situations.
Using useComponentHook wouldn't work in my attempts so this was done using useMutationObserver with a ref. I'm sure it's still possible to do through a hook however.
I’ve had hit or miss with the drops pop up appearing
Like it shows sometimes and doesn’t others
Idk if it has to do with 7tv hooking into the chat, but I suspect there is something happening
Similar to how “share subscription” pop up stays open even after timer ends
Also claiming moments isn’t really needed anymore since twitch just gives it to you if you were watching
yeah I think this might be related to callouts still being registered after they either get dismissed or don't render at all. I noticed that while doing these mock drops too.. might need some more digging
yeah, true. I just added it since it's handled by the same thing anyway
ya ie 100 viewers using a emote set, but only accessible to them. ofc everyone can see it.
https://github.com/SevenTV/API/blob/1c759c94db0f4ce05a70db5de633ff3c66a493b5/internal/api/gql/v3/schema/emotes.gql
was looking here and seems like individual users aren't stored in emotes.
The 7TV API | https://7tv.io/v3. Contribute to SevenTV/API development by creating an account on GitHub.
just a heads up im gonna be busy until july 11th or so, dealing with twitchcon stuff. likely no work nor PR reviews on the extension from my end
that means I’m on vacation too
Bro just called me dealing with setting up a booth at twitchcon a "vacation" 
imagine going to Paris for a vacation
🤓 it was the "too" in your previous statement that introduced the confusion about whom you believed to be "on vacation" in addition to yourself
7TV foam pit when?

i would jump head first into it
guy's we dont need a bi... 
marcfryd
hello any nerds here
i need somone to help me tell me where is the 7tv kick channel emotes api endpoints
lwe are working on xtra-kick
@quick ibex can you help aniki
@naive mesa sory for bing but I'm in a hurry
thx
Do https://7tv.io/v3/users/<7tv user id>
Look for the kick connection
The linked set id is in there

me when my website has one h1 and one p tag
hey @frosty bronze I forgot to mention, there's a slight caveat with the renderTurboButton. If a user has turbo, it's turned into a normal button (see image).
If it’s the same function, then overriding the function should still work regardless of the user has turbo or not
This just appears to be a stylistic change (which could be more problematic if we were using css selectors)
The PR I’ve been working on avoids css altogether
yeah it was more so to make sure you're aware and that it would remove the "turbo" button altogether as opposed to the "Get Ad-Free" button
Thanks for sharing what it looks like with turbo enabled 
ye np
that's called the "dead spider"
blood
Oh I realized I posted this in the wrong channel. It's suppose to be in #meme-general
I'm such a clumsy idiot
pre production poggers
no beta 
oh damn
they improved the way the player looks
the chat is fucked up and the scrolling bar isn't colored
and the player doesn't actually display video
but its kick
hello, what is the channel emotes endpoint?
I was using https://api.7tv.app/v2/users/${channelName}/emotes but now it returns 404.
it do be lookin better
i hope they fix the fucking volume slider
i hate that its vertical instead of horizontal
thanks

Is there any other extension functionality I should research this weekend? 
Is this supposed to work ? i'm so lost idk why it doesnt
https://7tv.io/v3/emotes?query=Susge
damn spent so much time wondering why i couldnt get it to work
can i inquire what is the use case for this?
I don't have any real use right now , I was just looking at the API but I don't know where to get the id of the emote so I wanted to do it like that
I hope I'm not flooding a channel made only for developers working on 7tv
but i didn't find any noob friendly channel
You can use gql to search emote: #developers message
wait
is that an icon or just a letter
cause ideally it should be this https://fontawesome.com/icons/xmark?f=sharp&s=solid
and i think you can reuse it cause this icon already exists in the extension iirc
if it is... it's not called xmark
do you know the other instance the icon is used?
lol
ah yes the close icon
I just changed height/width

okay so I made another POC to automatically expand followed channels, this was probably the weirdest one.
would not recommend the experience 
Has anyone gotten Local Overrides working? I'm trying to debug the production version lol
nvm each reload is a unique hash
Were you utilizing a hook for this?
Or just automatically “clicking” the “show more”?
I found the hooks for the sidebar sections and already got showing/hiding working (will replace the css selector method with this)
Just exploring how to expand all
Even hiding offline channels should be fairly straightforward too
local what?
why
you can run vite in production mode while still watch building
There’s an issue with the sidebar previews that I haven’t been able to replicate while deving
So I wanted to see what the state of the hook was (whilst in the broken state), but it’s not really possible
Essentially after a while the sidebar previews fail to render anything
It’s not the same as the sidebar crashing, but each tooltip fails to render the contents
I guess I should try if it happens on other browsers too
There’s reports of features not working on opera (I don’t use it), but idk 
yeah I used a hook
the approach was kind of unstable so I was still experimenting with it
Can someone point me in the right direction of getting the correct events for follow/report/block a user. I'm looking at this https://github.com/SevenTV/Extension/issues/613
Probably related to onShowViewerCard in useChatTools
I think the methods used to report / block a user are under the native user card, so you can't actually access them. You could however replicate the GQL request and send it directly, you just wouldn't be able to display the modal, unless made yourself
sounds like a hassle
yeah it's definitely more annoying than just hooking into it.
it can be hooked but it only hooks when the native cards pops up
So basically what pimothy said yea

Yes, but it’s about the same as just manually clicking the button
And tbh you may only want it expanded once
If you follow hundreds of streamers and they’re all live your follow list will be massive
I agree, mine originally had a clamp too but I just removed it.
see https://github.com/SevenTV/Extension/pull/767 if you want to view proposed changes
neat, it looks good to me
@lethal jackal
never gonna happen
kick chat client
written in rust. no emotes yet 
kickerino 
the font and the color scheme and everything is heavily implying that its egui
egui 
I was gonna write one to replace chatterino, but I didn’t see a good gui framework at the time
Iced and slint were promising, but I haven’t checked them out recently
hmm might try iced
iced is pretty nice(d) but keep in mind you're gonna have huge long files full of ui component code
the code is easily understandable and there's pretty much nothing wrong with it but its just long
can i use emotes on https://7tv.app/emotes in personal projects? mostly for fun, tiny chance of profit
Well I'd be wary of any profit, as the emotes uploaded to 7TV are not necessarily cleared for copyright.
should i contact the creator(s)?
I mean, you can try
but the uploaders may not own the copyright either
(and usually don't)
(and usually the person they stole it from didn't own the copyright either)
However, most of my emotes are my own work and I own the copyright for.
Some other creators like EsperDG and Zhark make their own emotes too
there are many creators that make most of their own emotes
idk
I'm not a lawyer
as far as using 7TV's service for profit
I'm not sure if that would be allowed or frowned upon
oh, yeah i wouldn't be using the 7TV service or whatever
to be specific, i just want to make a gif out of the peepoTalk emote and use it as a logo/icon + "peepoTalk" as the codename for the project
i believe it was made by @grand zealot
i'd probably change it to something else eventually, but for now it's just a little meme project i want to play around with
huh
you made this right? https://7tv.app/emotes/62f9c8cf00630d5b2acd66d1
Yeah, it was a remake of https://betterttv.com/emotes/5f71b705c2f3a70b1ae58709
Using the original peepo emote
i want to use it as the codename + icon of a project i'm playing around with
just want to make sure i'm not stepping on any toes
I don't mind but I don't actually own the original emote
so idk if I'm able to give permission 
yeah. Just wait until you get a call from a lawyer
(you won't)
Everything will be fine
🤓 erm I made knaDyppaHopeep and I will now bring Anatole to court

ayo bois quick question, what does the "MERGE" button do? I think I know but I don't want to accidentally mess something up
It became available to everyone when they removed me from being a trial moderator. It's hardcoded that my role (whichever role I currently have) has access to the merge tool. The only fix is to make me a moderator again.
ah kk thanks for the info! 👍
if we wanted to retain deleted chat messages on kick, we would need to re-render them?
the extension?
well based on what anatole said, there's no hooks because website is using vue
it's not rendered, but edited after the fact I think
yeh
how do you auth with the rust client?
rather how does the user auth to the websocket
I'm not really sure how much of a performance gain one would get with replacing the chat
if your thinking about sending messages, they are done using a authed post request.
oh i already made a extension that replaces the chat, it is faster.
oh nice
are you planning to open a PR or keep it seperate?
ah. i wrote the extension in react sooooooo. no
oh xdd
hmm maybe I can look into it for vue
I feel like I have too many open PRs for twitch lol
so gonna wait for those to merge or get nixed before doing other features

Matin, do you do any auth for sending kick messages or you just re-use the cookie token?
I havent tried doing any auth
there's some that are like 3 months old lol
yeah
and they all have changes requested
prs with changes requested that are stale will be closed soon though
rly? ones I checked had done the requested changes and requested another review
the api site says you can search users by username or channel name on /users as a query but i'm not seeing how to do this, guessing i'm not using the right query parameter?
cant do that with REST api, gotta do it with GQL
Search users
Search emote
yes
thanks for explaining and also showing!
so if u want to know how to do the query, u can check the developer console in chrome
same goes for search users, but that needs login, which means u have to put your 7tv token in the header
@paper plover why aren't you a contributor or something yet?
i havent made any contribution to the website yet
my 1 pull request is still waiting for approval 
speaking of
APROOOOOVE https://github.com/SevenTV/Website/pull/976
but you're so helpful in discord
i mean that's how that role works
gotta actually contribute to the website or the extension
the website is getting rewritten anyway 
v4
tbh it would be cool if the site would be basically restyled to be more like the current extension style 
thats the plan
i contributed to that
I can get contributor baj now?
i want a cumtributor baj
same
nice badge melonify 
is the badge tied to discord or is that a manual thing?
and I undid all your contributions 
they were ugly

anyways
you should not ever be searching
for users
on 7tv
unless you have a very very specific usecase
but I cant think of one
its locked behind authentication for a reason
if you need a user by username
use the twitch api first
then request the /users endpoint with their id
is there another way to find a user's ID from twitch name/username?
oh is it the same as the twitch ID?
oh ok
well no the 7tv id is different
but if you request /users/twitch/twitchid
you'll get the user with that twitch id
ohh ok cool
thanks!
i wasn't sure what Get User Connection was, but it's what you're talking about right now, right?
yeah
a user connection ties the user data to a channel on twitch,youtube or kick
you'll also get the full user object attached to that
in addition to connection specific information you probably also want
like what set is attached to that channel
and the emotes in it
so there is a bug with kick tab autocompletion: specifically https://github.com/SevenTV/Extension/blob/master/src/site/kick.com/modules/chat/ChatAutocomplete.vue#L144-L148
in the case of equal length text
it will auto complete to the previous match
actually I'm not sure exactly which part is failing 
but basically to reproduce with global emotes
type pepepls -> tab -> erase -> type teatime -> tab -> shows pepepls
yes this has been happening to me too, very annoying.
I wanted to piggyback off of the Video Stats and Player Click Events PR after it was merged to try implementing scroll wheel volume, as a way to learn a bit. But I feel totally lost when trying to figure out how you add a listener for scroll wheel events. I see the code for the click event handlers, but I don't know where to even look/read to find out how you'd handle something else.
Any guidance for starting? Or is this deeper than I think and should look for something else to implement?
looks like they're going to open up the API soon: https://developers.kick.com/

isn't the name "C" for a programming language already taken?
I'm trying to develop a Chrome extension that needs to replace the whole value of the user's chat input on Twitch. After a few hours I figured that someone here might be able to help me.
"replacing the whole value of the user's chat input" is a bit vague
there's a number of ways to get the input text, but which one you need will depend on your use case (also if any other extensions change the chat input such as 7tv)
lets say that user typed anything into their chat input box. Then I will take the text content of the chat input.
const chatInput = document.cquerySelector("[data-a-target='chat-input']");
const userInput = chatInput.textContent
console.log(userInput) // -> "Some user input"
// ^ this output is fine because my extension works only on text and emotes can be safely ignored
Simplyfied Application lifecycle: When pressing somekind of keybind (for example CTRL + SPACE) I would get the text input as shown above and process it. After processing I want to replace the whole chat input with the result that will be just one string (only text, no emotes)
setUserChatInput(processUserInput(userInput.textContent));
After some digging in 7tv source code for my answer I have stumbled on dead end right before getting answered. Could anyone from the dev team explain to me or give me implementation details on
// located in src/types/twitch.d.ts:526
Twitch.ChatSlate.apply(operation: object) => void
for specific use-case in
// located in src/site/twitch.tv/modules/chat-input/ChatInput.vue:268
slate.apply({ type: "insert_text", path: cursorLocation.path, offset: wordStart, text: replacement });
I cant get any further because when I try to bring up ```typescript
Twitch.ChatSlate.apply
(I'm not very familiar how Vue or React works, since I only worked in vanilla JS or TS)
It's a function from twitch. See https://github.com/SevenTV/Extension/blob/97f75e38204cdcc747e60e380eb68056df041d8e/src/common/ReactHooks.ts#L64-L100 and https://github.com/SevenTV/Extension/blob/97f75e38204cdcc747e60e380eb68056df041d8e/src/site/twitch.tv/modules/chat-input/ChatInputModule.vue#L31-L46 and https://github.com/SevenTV/Extension/blob/97f75e38204cdcc747e60e380eb68056df041d8e/src/site/twitch.tv/modules/chat-input/ChatInput.vue#L172-L174 on how to find it. It can be simplified to
const findReact = dom => {
for (const key in dom) {
if (key.startsWith("__reactInternalInstance$")) {
return Reflect.get(dom, key); // or dom[key]
}
}
};
const walk = (root, predicate) => {
let node = root;
for (let step = 0; node && step < 42; step++) {
if (node.stateNode && !(node.stateNode instanceof Element)) {
if (predicate(node.stateNode)) {
return node;
}
}
node = node.child;
}
};
walk(findReact(document.querySelector('.chat-input__textarea')), x => 'providers' in x).stateNode.componentRef.state.slateEditor
Thank you so much ❤️ I have been digging through the old commits trying to find working solutions. Right as you pasted the message I have found working solution but this is way cleaner.
I dislike twitch's recent change to detect if you're watching a stream (like if the video is covered). It's most apparent when trying to get drops
I feel like they've actually been doing that a while
maybe, but I've only just noticed it 
well, what I THINK might be happening is Chrome detects windows that are completely covered (or if it's very aggressive, detecting individual frames/elements that are covered) and suspending them
it already does that for tabs
but to prevent the auto-suspending of streams, I will put them at the bottom of the screen beneath the translucent task bar so that they're still "visible"
(even works on linux)
so it might not be twitch checking for that
twitch might only be checking to see if the stream is actually playing
its not tabs
is there a twitch event api to detect when a user types in chat
wanted to try something like change 7tv name paint after every time i typed
sure, stress the 7tv servers further 
you can use tmi.js to listen for chat messages
🎸 🥁
🎹
🎷
🪕
🎺 🎤
@topaz crown
🤜🔔
hi
if using js use @kararty/dank-twitch-irc over tmi.js imo

if you want help setting it up just dm me or ask in my twitch chat
i get 404 on this request. did the url change, what is the new one? https://api.7tv.app/v2/users/discostofftv/emotes
thank you
Is there a userscript available for 7TV yet? I know it was mentioned that it was possibly in the works
not yet
I think the team is focused on the website re-write and backend infra in general
extension is in a "good state" at the moment and probably don't want to unnecessarily introduce new bugs
dam i want the coom badge 
Hello developers. I'm developing an NLP (natural language processing) app to analyze my chat (I'm a streamer). I want to study the most common used sentences and words, and their sentiment throu a neural network. In order to do so, I'd need to scrape out the emotes... so I'd need a complete list of 7tv emotes (just the names, not the actual icons). Is there any API endopoint or something similar that would provide me with that=
Thank you.
I found this portal: https://7tv.io/ but i cannot seem to have any call working.
7TV Developer Portal.
so basically right now only the gql api works
to get only the names of the emotes
you can send this query
to the https://7tv.io/v3/gql gql endpoint
oh! perfect. I've never used gql, i guess it's a good time to experiment with it
with the id being the id for the emote set
of the channel
keep in mind that that query will return the names of the emotes as they are on the channel
even better for my purpose
so if any emotes are renamed they will already be renamed in the response
one last question (and thanks for the assistance)
how do i get an emote-set name from a streamer name?
is there a 1:1 correlation, or one can rename it as it pleases, etc?
or maybe is there a "super" emote set, including all emotes?
mkay I can search the creator from the website and see its/her emotes set. Coolio.
uhhh i'm not totally sure on what's the correct way to do something like this because to search for the users you need authentication(?)
Well it isn't something I need to do from code. Since its gonna be one or two users at most (me and maybe some of my colleagues) i can just do it by hand
nevertheless, this works
ah, lmao
perfecto!
what editor are you using to test your gql queries? any suggestions?
i have no clue where you can get the bearer key from but i just got it from the headers in my browser xd
that is "insomnia"
slick design, I like it
well thanks so much for the assistance! I see u are doing amayzing work here 😄
you can also use something like postman though, it's pretty nice too
ah, ye, I've used that for REST APIs
but nowadays i just plug stuff in code and hope it works, i've never been much of a serious software developer, I mostly develop scripts for AI at my university. I'd say i'm a decent coder, but not really the same enviorment as an actual working project used by 10k people or smt
I'll not be stealing more of your time, thank you so much @solemn widget
🙂
@steady ledge: this isn't true, we have a REST API available. The correct endpoint for getting a user's active emotes is /v3/users/{connection.name}/{connection.id} where name is i.e twitch, kick, etc. and id is a user's ID on the platform.
The GQL API is internal and may be phased out entirely later this year so i do not recommend its use.
wait wat
You can find some documentation for REST endpoints at https://7tv.io/
7TV Developer Portal.
it doesn't work "too", it's the intended way
anything other than that is technically an invalid implementation and prone to breaking
gql phased out? 
it was never for public usage anyways
but yeah when the new website goes up it will probably just be dropped completely
since its not a public api, theres no reason to keep it around
v3.1
i assume the rest api is also changed/upgraded?
like be able to search emote and users
moving away from mongo 
REST will receive all functionality gql has currently and then some more


so, for now, there's no way to add and remove emotes from sets using API?
I think for now there's no way to do a lot of things using the API, there's even some documented endpoints that aren't actually implemented yet 
so uh, why does this happen
...updating from node 19 to node 20 fixed it for whatever reason
even though im using axios in my application 
what is this github discussion???
idk the one about the extension

WAYTOODANK
anyways
thats null and void
the creator of that service personally denounced any support with or in conjunction with 7tv
the other pronouns service for example
does support working along side our extension
that guy just doesnt like 7tv for some reason

urm extensions should extend, not change elements
Not integrated = Hiding 
on a separate note, when do you think you'll be able to look at/merge PRs again?
arent PRs ignored since they are rebuiliding the stuffs?
but i do think they should look at the minor-problem-solving ones like disabling delete button in personal emote
FeelsDonkMan that was merged 3 weeks ago
well it was merged

)









FF









